From: brain Date: Sun, 12 Nov 2006 15:44:54 +0000 (+0000) Subject: Needs testing: SAMODE doesnt send the actual SAMODE text any more, instead it sends... X-Git-Tag: v2.0.23~6671 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=ddbd88314157ac990382deb4eb5d34e38097c96a;p=user%2Fhenk%2Fcode%2Finspircd.git Needs testing: SAMODE doesnt send the actual SAMODE text any more, instead it sends a server-origin MODE git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5705 e03df62e-2008-0410-955e-edbf42e46eb7 --- diff --git a/src/modules/m_samode.cpp b/src/modules/m_samode.cpp index 5fa694ddd..34278101e 100644 --- a/src/modules/m_samode.cpp +++ b/src/modules/m_samode.cpp @@ -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 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;