From 59ca4eec57a9c8b37e79e3031c74b59d4803fc28 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 4 Apr 2008 13:12:10 +0000 Subject: Make all our modules use the new stuff rather than the send_ events git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9301 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_samode.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/modules/m_samode.cpp') diff --git a/src/modules/m_samode.cpp b/src/modules/m_samode.cpp index 2b8ae9b4f..84540b117 100644 --- a/src/modules/m_samode.cpp +++ b/src/modules/m_samode.cpp @@ -39,21 +39,19 @@ 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); + std::string channel = n[0]; + n.pop_front(); + ServerInstance->PI->SendMode(channel, n); - n.clear(); - n.push_back(std::string(user->nick) + " used SAMODE: " + ServerInstance->Modes->GetLastParse()); - Event rmode2((char *)&n, NULL, "send_opers"); - rmode2.Send(ServerInstance); + ServerInstance->PI->SendOperNotice(std::string(user->nick) + " used SAMODE: " + ServerInstance->Modes->GetLastParse()); /* 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; } -- cgit v1.3.1-10-gc9f91