summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-04 20:47:45 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-04 20:47:45 +0000
commitccea6c12cd10e26c3ccacc91fdc16897d00582de (patch)
treeb2bb31f975784cd9c1f574f4a05dcfb54c1b0f32 /src/modules/m_spanningtree
parent6fb9db23fb74c2b172fd628191cc3bcb7b22de55 (diff)
See this brain
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9336 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/netburst.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/modules/m_spanningtree/netburst.cpp b/src/modules/m_spanningtree/netburst.cpp
index 75f9b8e5b..c61211ff9 100644
--- a/src/modules/m_spanningtree/netburst.cpp
+++ b/src/modules/m_spanningtree/netburst.cpp
@@ -86,8 +86,9 @@ void TreeSocket::SendFJoins(TreeServer* Current, Channel* c)
size_t dlen, curlen;
dlen = curlen = snprintf(list,MAXBUF,":%s FJOIN %s %lu +%s",this->Instance->Config->GetSID().c_str(),c->name,(unsigned long)c->age, c->ChanModes(true));
- int numusers = 1;
+ int numusers = 0;
char* ptr = list + dlen;
+ bool looped_once = false;
CUList *ulist = c->GetUsers();
std::string modes;
@@ -98,6 +99,8 @@ void TreeSocket::SendFJoins(TreeServer* Current, Channel* c)
// The first parameter gets a : before it
size_t ptrlen = snprintf(ptr, MAXBUF, " %s%s,%s", !numusers ? ":" : "", this->Instance->Modes->ModeString(i->first, c, false).c_str(), i->first->uuid);
+ looped_once = true;
+
curlen += ptrlen;
ptr += ptrlen;
@@ -113,7 +116,9 @@ void TreeSocket::SendFJoins(TreeServer* Current, Channel* c)
}
}
- if (numusers)
+ // Okay, permanent channels will (of course) need this \r\n anyway, numusers check is if there
+ // actually were people in the channel (looped_once == true)
+ if (!looped_once || numusers > 0)
buffer.append(list).append("\r\n");
int linesize = 1;