summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-21 12:17:55 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-21 12:17:55 +0000
commit0e79977c1e1f468ee27ac9d0a3b81df8818fb4d3 (patch)
treec138bd22821c7757cef4cd7d5454b9808e4782e3 /src/modules/m_spanningtree.cpp
parent8cd26c0ff3ce079e1c8f6dbb8f0567706abc6284 (diff)
In 1.1, place all FJOIN parameters in the last parameter of the FJOIN - if there is more than one user joining, prefix with a colon.
This way we're not limited to ~12 users per FJOIN command. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4988 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree.cpp')
-rw-r--r--src/modules/m_spanningtree.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index fde13ef98..abd07d170 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -1375,15 +1375,19 @@ class TreeSocket : public InspSocket
ServerInstance->Log(DEBUG,"FJOIN detected, our TS=%lu, their TS=%lu",ourTS,TS);
+ irc::tokenstream users(params[2]);
+ std::string item = "";
+
/* do this first, so our mode reversals are correctly received by other servers
* if there is a TS collision.
*/
+ params[2] = ":" + params[2];
DoOneToAllButSender(source,"FJOIN",params,source);
- for (unsigned int usernum = 2; usernum < params.size(); usernum++)
+ while ((item = users.GetToken()) != "")
{
/* process one channel at a time, applying modes. */
- char* usr = (char*)params[usernum].c_str();
+ char* usr = (char*)item.c_str();
/* Safety check just to make sure someones not sent us an FJOIN full of spaces
* (is this even possible?) */
if (usr && *usr)
@@ -1623,7 +1627,8 @@ class TreeSocket : public InspSocket
n = "+";
}
- size_t ptrlen = snprintf(ptr, MAXBUF, " %s%s", n, i->second->nick);
+ // The first parameter gets a : before it
+ size_t ptrlen = snprintf(ptr, MAXBUF, " %s%s%s", !numusers ? ":" : "", n, i->second->nick);
curlen += ptrlen;
ptr += ptrlen;