*/
class CommandSethost : public Command
{
- private:
char* hostmap;
+
public:
CommandSethost(Module* Creator, char* hmap) : Command(Creator,"SETHOST", 1), hostmap(hmap)
{
{
if (!hostmap[(const unsigned char)*x])
{
- user->WriteServ("NOTICE "+user->nick+" :*** SETHOST: Invalid characters in hostname");
+ user->WriteNotice("*** SETHOST: Invalid characters in hostname");
return CMD_FAILURE;
}
}
if (len > 64)
{
- user->WriteServ("NOTICE %s :*** SETHOST: Host too long",user->nick.c_str());
+ user->WriteNotice("*** SETHOST: Host too long");
return CMD_FAILURE;
}
{
CommandSethost cmd;
char hostmap[256];
+
public:
ModuleSetHost()
: cmd(this, hostmap)
hostmap[(unsigned char)*n] = 1;
}
- virtual ~ModuleSetHost()
- {
- }
-
virtual Version GetVersion()
{
return Version("Provides support for the SETHOST command", VF_VENDOR);
}
-
};
MODULE_INIT(ModuleSetHost)