]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
In 1.1, place all FJOIN parameters in the last parameter of the FJOIN - if there...
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 21 Aug 2006 12:17:55 +0000 (12:17 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 21 Aug 2006 12:17:55 +0000 (12:17 +0000)
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

src/modules/m_spanningtree.cpp
src/modules/m_swhois.cpp

index fde13ef980f0423ad691c8d3551154b10cde32e1..abd07d17071fc94b4f132f402472575763219517 100644 (file)
@@ -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;
index e98f87ffbafa5826a850e570fe179c88ad1c160e..3103e7a5698377eb3fcbe8c38a1563f22a72272a 100644 (file)
@@ -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>";