X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_samode.cpp;h=3dcd48ca5e872260f075a944240b65fab8a60887;hb=8c2d96013084de950e3a63be4ae6ed626c4093ab;hp=2b8ae9b4fbe1df38d8cf7f01b89d66d4753acc4b;hpb=c2957516bca0fe70622c7668a12ade68576ddab2;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_samode.cpp b/src/modules/m_samode.cpp index 2b8ae9b4f..3dcd48ca5 100644 --- a/src/modules/m_samode.cpp +++ b/src/modules/m_samode.cpp @@ -39,21 +39,17 @@ class CommandSamode : public Command std::deque n; irc::spacesepstream spaced(ServerInstance->Modes->GetLastParse()); - std::string one = "*"; + std::string one; while (spaced.GetToken(one)) n.push_back(one); - Event rmode((char *)&n, NULL, "send_mode"); - rmode.Send(ServerInstance); - - n.clear(); - n.push_back(std::string(user->nick) + " used SAMODE: " + ServerInstance->Modes->GetLastParse()); - Event rmode2((char *)&n, NULL, "send_opers"); - rmode2.Send(ServerInstance); + std::string channel = n[0]; + n.pop_front(); + ServerInstance->PI->SendMode(channel, n); /* XXX: Yes, this is right. We dont want to propagate the * actual SAMODE command, just the MODE command generated - * by the send_mode + * by the Protocol Interface */ return CMD_LOCALONLY; }