X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_sethost.cpp;h=eb2196c92d7f7966d4ec6433bbb337491d23a171;hb=3a7023f2c595d14778b3f1f7e53d3914698dd500;hp=0894e8f24c3588c2aaab5e8090a6127524281335;hpb=2e2d1fae4844088f7e0b9a71116e0eb3e149e4cc;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_sethost.cpp b/src/modules/m_sethost.cpp index 0894e8f24..eb2196c92 100644 --- a/src/modules/m_sethost.cpp +++ b/src/modules/m_sethost.cpp @@ -2,7 +2,7 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * Inspire is copyright (C) 2002-2004 ChatSpike-Dev. + * InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev. * E-mail: * * @@ -25,7 +25,7 @@ using namespace std; /* $ModDesc: Provides support for the SETHOST command */ -Server *Srv; +static Server *Srv; class cmd_sethost : public command_t { @@ -35,8 +35,13 @@ class cmd_sethost : public command_t this->source = "m_sethost.so"; } - void Handle (char **parameters, int pcnt, userrec *user) + void Handle (const char** parameters, int pcnt, userrec *user) { + if (strlen(parameters[0]) > 64) + { + WriteServ(user->fd,"NOTICE %s :*** SETHOST: Host too long",user->nick); + return; + } for (unsigned int x = 0; x < strlen(parameters[0]); x++) { if (((tolower(parameters[0][x]) < 'a') || (tolower(parameters[0][x]) > 'z')) && (parameters[0][x] != '.'))