]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Needs testing: SAMODE doesnt send the actual SAMODE text any more, instead it sends...
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 12 Nov 2006 15:44:54 +0000 (15:44 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 12 Nov 2006 15:44:54 +0000 (15:44 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5705 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/m_samode.cpp

index 5fa694ddd14eb17aa804ff6927a7b37c8ed8cacc..34278101eb1b3749f5b895a2b17a9669ed9bf4f2 100644 (file)
@@ -62,7 +62,21 @@ class cmd_samode : public command_t
                if (ServerInstance->Modes->GetLastParse().length())
                {
                        ServerInstance->WriteOpers(std::string(user->nick)+" used SAMODE: "+ServerInstance->Modes->GetLastParse());
-                       return CMD_SUCCESS;
+
+                       std::deque<std::string> n;
+                       irc::spacesepstream spaced(ServerInstance->Modes->GetLastParse());
+                       std::string one = "*";
+                       while ((one = spaced.GetToken()) != "")
+                               n.push_back(one);
+
+                       Event rmode((char *)&n, NULL, "send_mode_explicit");
+                       rmode.Send(ServerInstance);
+
+                       /* XXX: Yes, this is right. We dont want to propogate the
+                        * actual SAMODE command, just the MODE command generated
+                        * by the send_mode_explicit
+                        */
+                       return CMD_FAILURE;
                }
 
                return CMD_FAILURE;