X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_sakick.cpp;h=afca49e251ba17b3294670277915a5f17b8b0bd5;hb=a5d110282a864fd2e91b51ce360a977cd0643657;hp=2cb1f2a0449f1f521e7e8c69c34b4eb19a5b5f66;hpb=46a39046196f55b52336e19662bb7bac85b731ac;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_sakick.cpp b/src/modules/m_sakick.cpp index 2cb1f2a04..afca49e25 100644 --- a/src/modules/m_sakick.cpp +++ b/src/modules/m_sakick.cpp @@ -39,7 +39,7 @@ class CommandSakick : public Command Channel* channel = ServerInstance->FindChan(parameters[0]); const char* reason = ""; - if (dest && channel) + if ((dest) && (dest->registered == REG_ALL) && (channel)) { if (parameters.size() > 2) { @@ -63,20 +63,12 @@ class CommandSakick : public Command if (IS_LOCAL(dest)) { channel->KickUser(ServerInstance->FakeClient, dest, reason); - - Channel *n = ServerInstance->FindChan(parameters[1]); - if (n && n->HasUser(dest)) - { - /* Sort-of-bug: If the command was issued remotely, this message won't be sent */ - user->WriteServ("NOTICE %s :*** Unable to kick %s from %s", user->nick.c_str(), dest->nick.c_str(), parameters[0].c_str()); - return CMD_FAILURE; - } } if (IS_LOCAL(user)) { /* Locally issued command; send the snomasks */ - ServerInstance->SNO->WriteGlobalSno('a', std::string(user->nick) + " SAKICKed " + dest->nick + " on " + parameters[0]); + ServerInstance->SNO->WriteGlobalSno('a', user->nick + " SAKICKed " + dest->nick + " on " + parameters[0]); } return CMD_SUCCESS; @@ -105,7 +97,11 @@ class ModuleSakick : public Module ModuleSakick() : cmd(this) { - ServerInstance->AddCommand(&cmd); + } + + void init() + { + ServerInstance->Modules->AddService(cmd); } virtual ~ModuleSakick()