diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_spanningtree.cpp | 11 | ||||
-rw-r--r-- | src/modules/m_swhois.cpp | 2 |
2 files changed, 9 insertions, 4 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; diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp index e98f87ffb..3103e7a56 100644 --- a/src/modules/m_swhois.cpp +++ b/src/modules/m_swhois.cpp @@ -28,7 +28,7 @@ class cmd_swhois : public command_t { public: - cmd_swhois (InspIRCd* Instance) : command_t(Instance,"SWHOIS",'o',2) + cmd_swhois (InspIRCd* Instance) : command_t(Instance,"SWHOIS",'o',2) { this->source = "m_swhois.so"; syntax = "<nick> <swhois>"; |