}
}
- if (len > 64)
+ if (len > ServerInstance->Config->Limits.MaxHost)
{
user->WriteNotice("*** SETHOST: Host too long");
return CMD_FAILURE;
}
- if (user->ChangeDisplayedHost(parameters[0].c_str()))
+ if (user->ChangeDisplayedHost(parameters[0]))
{
ServerInstance->SNO->WriteGlobalSno('a', user->nick+" used SETHOST to change their displayed host to "+user->dhost);
return CMD_SUCCESS;
{
}
- void init() CXX11_OVERRIDE
- {
- OnRehash(NULL);
- ServerInstance->Modules->AddService(cmd);
- Implementation eventlist[] = { I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
- }
-
- void OnRehash(User* user) CXX11_OVERRIDE
+ void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE
{
std::string hmap = ServerInstance->Config->ConfValue("hostname")->getString("charmap", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-_/0123456789");