From 78c0bcf17cf5eb569558e167de2784f640843616 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 7 May 2007 14:56:08 +0000 Subject: A bit more debug in here git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6902 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/treesocket1.cpp | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp index a6f8ee42d..31efa286a 100644 --- a/src/modules/m_spanningtree/treesocket1.cpp +++ b/src/modules/m_spanningtree/treesocket1.cpp @@ -1138,6 +1138,8 @@ void TreeSocket::SendFJoins(TreeServer* Current, chanrec* c) char list[MAXBUF]; std::string individual_halfops = std::string(":")+this->Instance->Config->ServerName+" FMODE "+c->name+" "+ConvToStr(c->age); + Instance->Log(DEBUG,"Sending FJOINs for %s", c->name); + size_t dlen, curlen; dlen = curlen = snprintf(list,MAXBUF,":%s FJOIN %s %lu",this->Instance->Config->ServerName,c->name,(unsigned long)c->age); int numusers = 0; @@ -1159,6 +1161,7 @@ void TreeSocket::SendFJoins(TreeServer* Current, chanrec* c) if (curlen > (480-NICKMAX)) { + Instance->Log(DEBUG,"Flushing FJOIN buffer: %s", list); buffer.append(list).append("\r\n"); dlen = curlen = snprintf(list,MAXBUF,":%s FJOIN %s %lu",this->Instance->Config->ServerName,c->name,(unsigned long)c->age); ptr = list + dlen; @@ -1167,26 +1170,12 @@ void TreeSocket::SendFJoins(TreeServer* Current, chanrec* c) } } - if (numusers) - buffer.append(list).append("\r\n"); + Instance->Log(DEBUG,"%d users remaining to be flushed", list); - /* Sorry for the hax. Because newly created channels assume +nt, - * if this channel doesnt have +nt, explicitly send -n and -t for the missing modes. - */ - bool inverted = false; - if (!c->IsModeSet('n')) - { - modes.append("-n"); - inverted = true; - } - if (!c->IsModeSet('t')) - { - modes.append("-t"); - inverted = true; - } - if (inverted) + if (numusers) { - modes.append("+"); + Instance->Log(DEBUG,"Flushing final FJOIN buffer: %s", list); + buffer.append(list).append("\r\n"); } buffer.append(":").append(this->Instance->Config->ServerName).append(" FMODE ").append(c->name).append(" ").append(ConvToStr(c->age)).append(" +").append(c->ChanModes(true)).append("\r\n"); @@ -1279,6 +1268,7 @@ void TreeSocket::SendChannelModes(TreeServer* Current) std::deque list; std::string n = this->Instance->Config->ServerName; const char* sn = n.c_str(); + Instance->Log(DEBUG,"Sending channels and modes, %d to send", this->Instance->chanlist->size()); for (chan_hash::iterator c = this->Instance->chanlist->begin(); c != this->Instance->chanlist->end(); c++) { SendFJoins(Current, c->second); -- cgit v1.2.3