From ddbd88314157ac990382deb4eb5d34e38097c96a Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 12 Nov 2006 15:44:54 +0000 Subject: 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 --- src/modules/m_samode.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3