* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * Inspire is copyright (C) 2002-2004 ChatSpike-Dev.
+ * InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
* E-mail:
* <brain@chatspike.net>
* <Craig@chatspike.net>
/* $ModDesc: Provides support for the SETHOST command */
-Server *Srv;
+static Server *Srv;
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] != '.'))