X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_saquit.cpp;h=aa6aa01809f238bef392d11659576ca6b99c70fa;hb=90abe2cd475c8ca2e81626f565d173e9f56d1251;hp=30bae5c0e42b10917a098205e37d306aefadef86;hpb=23e8bba13c55d33ce89d505780da36c9589e300a;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_saquit.cpp b/src/modules/m_saquit.cpp index 30bae5c0e..aa6aa0180 100644 --- a/src/modules/m_saquit.cpp +++ b/src/modules/m_saquit.cpp @@ -21,8 +21,6 @@ #include "inspircd.h" -/* $ModDesc: Provides support for an SAQUIT command, exits user with a reason */ - /** Handle /SAQUIT */ class CommandSaquit : public Command @@ -31,17 +29,17 @@ class CommandSaquit : public Command CommandSaquit(Module* Creator) : Command(Creator, "SAQUIT", 2, 2) { flags_needed = 'o'; Penalty = 0; syntax = " "; - TRANSLATE3(TR_NICK, TR_TEXT, TR_END); + TRANSLATE2(TR_NICK, TR_TEXT); } CmdResult Handle (const std::vector& parameters, User *user) { User* dest = ServerInstance->FindNick(parameters[0]); - if ((dest) && (!IS_SERVER(dest))) + if ((dest) && (!IS_SERVER(dest)) && (dest->registered == REG_ALL)) { - if (ServerInstance->ULine(dest->server)) + if (dest->server->IsULine()) { - user->WriteNumeric(ERR_NOPRIVILEGES, "%s :Cannot use an SA command on a u-lined client",user->nick.c_str()); + user->WriteNumeric(ERR_NOPRIVILEGES, ":Cannot use an SA command on a u-lined client"); return CMD_FAILURE; } @@ -79,16 +77,10 @@ class ModuleSaquit : public Module { } - void init() - { - ServerInstance->Modules->AddService(cmd); - } - - virtual Version GetVersion() + Version GetVersion() CXX11_OVERRIDE { return Version("Provides support for an SAQUIT command, exits user with a reason", VF_OPTCOMMON | VF_VENDOR); } }; MODULE_INIT(ModuleSaquit) -