X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_samode.cpp;h=932ed88b65c2215f76813ab6dad8d8b9a329fec7;hb=fcafba14c5408360ec725ed1649ede75b7ae52c1;hp=6cf7a5fbcb53ae895e962f097164c966095d877a;hpb=b817341e2149af163011cce47605ae17b4f67eeb;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_samode.cpp b/src/modules/m_samode.cpp index 6cf7a5fbc..932ed88b6 100644 --- a/src/modules/m_samode.cpp +++ b/src/modules/m_samode.cpp @@ -2,8 +2,8 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2008 InspIRCd Development Team - * See: http://www.inspircd.org/wiki/index.php/Credits + * InspIRCd: (C) 2002-2009 InspIRCd Development Team + * See: http://wiki.inspircd.org/Credits * * This program is free but copyrighted software; see * the file COPYING for details. @@ -37,25 +37,14 @@ class CommandSamode : public Command { ServerInstance->SNO->WriteToSnoMask('A', std::string(user->nick) + " used SAMODE: " + ServerInstance->Modes->GetLastParse()); - std::deque n; - irc::spacesepstream spaced(ServerInstance->Modes->GetLastParse()); - std::string one; - while (spaced.GetToken(one)) - n.push_back(one); + std::string channel = parameters[0]; + ServerInstance->PI->SendMode(channel, ServerInstance->Modes->GetLastParseParams(), ServerInstance->Modes->GetLastParseTranslate()); - 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 Protocol Interface - */ return CMD_LOCALONLY; } else { - user->WriteServ("NOTICE %s :*** Invalid SAMODE sequence.", user->nick); + user->WriteServ("NOTICE %s :*** Invalid SAMODE sequence.", user->nick.c_str()); } return CMD_FAILURE; @@ -69,19 +58,19 @@ class ModuleSaMode : public Module ModuleSaMode(InspIRCd* Me) : Module(Me) { - + mycommand = new CommandSamode(ServerInstance); ServerInstance->AddCommand(mycommand); } - + virtual ~ModuleSaMode() { } - + virtual Version GetVersion() { - return Version(1, 2, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION); + return Version("$Id$", VF_COMMON | VF_VENDOR, API_VERSION); } };