syntax = "<username> <password>";
}
- void Handle (const char** parameters, int pcnt, userrec *user)
+ CmdResult Handle (const char** parameters, int pcnt, userrec *user)
{
for (int index = 0; index < Conf->Enumerate("vhost"); index++)
{
{
user->WriteServ("NOTICE "+std::string(user->nick)+" :Setting your VHost: " + mask);
user->ChangeDisplayedHost(mask.c_str());
- return;
+ return CMD_FAILURE;
}
}
}
user->WriteServ("NOTICE "+std::string(user->nick)+" :Invalid username or password.");
+ return CMD_FAILURE;
}
};
ModuleVHost(InspIRCd* Me) : Module::Module(Me)
{
- Conf = new ConfigReader;
+ Conf = new ConfigReader(ServerInstance);
mycommand = new cmd_vhost(ServerInstance);
ServerInstance->AddCommand(mycommand);
}
virtual void OnRehash(const std::string ¶meter)
{
DELETE(Conf);
- Conf = new ConfigReader;
+ Conf = new ConfigReader(ServerInstance);
}
virtual Version GetVersion()