X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_sanick.cpp;h=ba265fddd29acaeb2d9e7059f2d2d074634e081d;hb=3ccf0065d43db80f31c6404aeac4d65551481508;hp=98b4c1eb9754e4da947e7f6a40af1dae7a2e07c1;hpb=c25a59d9036444872d831a126c6326f3d8be5e74;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_sanick.cpp b/src/modules/m_sanick.cpp index 98b4c1eb9..ba265fddd 100644 --- a/src/modules/m_sanick.cpp +++ b/src/modules/m_sanick.cpp @@ -21,8 +21,6 @@ #include "inspircd.h" -/* $ModDesc: Provides support for SANICK command */ - /** Handle /SANICK */ class CommandSanick : public Command @@ -42,9 +40,9 @@ class CommandSanick : public Command /* Do local sanity checks and bails */ if (IS_LOCAL(user)) { - if (target && ServerInstance->ULine(target->server)) + if (target && target->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; } @@ -66,7 +64,7 @@ class CommandSanick : public Command { std::string oldnick = user->nick; std::string newnick = target->nick; - if (target->ChangeNick(parameters[1], true)) + if (target->ChangeNick(parameters[1])) { ServerInstance->SNO->WriteGlobalSno('a', oldnick+" used SANICK to change "+newnick+" to "+parameters[1]); } @@ -98,11 +96,6 @@ class ModuleSanick : public Module { } - void init() CXX11_OVERRIDE - { - ServerInstance->Modules->AddService(cmd); - } - Version GetVersion() CXX11_OVERRIDE { return Version("Provides support for SANICK command", VF_OPTCOMMON | VF_VENDOR); @@ -110,4 +103,3 @@ class ModuleSanick : public Module }; MODULE_INIT(ModuleSanick) -