X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_sanick.cpp;h=6c07d08cec55140a43826fb04f23ab08c29beeac;hb=c4458ecc70025aeac7ca87115ed0a698e7bbcdad;hp=618b3226b56df91a245f87bcef2e281c28928695;hpb=1383dba43e463f292aea094d01f62f355946049d;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_sanick.cpp b/src/modules/m_sanick.cpp index 618b3226b..6c07d08ce 100644 --- a/src/modules/m_sanick.cpp +++ b/src/modules/m_sanick.cpp @@ -3,13 +3,13 @@ * +------------------------------------+ * * InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev. - * E-mail: - * - * + * E-mail: + * + * * * Written by Craig Edwards, Craig McLure, and others. * This program is free but copyrighted software; see - * the file COPYING for details. + * the file COPYING for details. * * --------------------------------------------------- */ @@ -24,7 +24,7 @@ using namespace std; /* $ModDesc: Provides support for SANICK command */ -Server *Srv; +static Server *Srv; class cmd_sanick : public command_t { @@ -34,11 +34,16 @@ class cmd_sanick : public command_t this->source = "m_sanick.so"; } - void Handle (char **parameters, int pcnt, userrec *user) + void Handle (const char** parameters, int pcnt, userrec *user) { userrec* source = Srv->FindNick(std::string(parameters[0])); if (source) { + if (Srv->IsUlined(source->server)) + { + WriteServ(user->fd,"990 %s :Cannot use an SA command on a u-lined client",user->nick); + return; + } if (Srv->IsNick(std::string(parameters[1]))) { // FIX by brain: Cant use source->nick here because if it traverses a server link then