#include "inspircd.h"
-/* $ModDesc: Provides masking of user hostnames via traditional /VHOST command */
-
/** Handle /VHOST
*/
class CommandVhost : public Command
syntax = "<username> <password>";
}
- CmdResult Handle (const std::vector<std::string> ¶meters, User *user)
+ CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE
{
ConfigTagList tags = ServerInstance->Config->ConfTags("vhost");
for(ConfigIter i = tags.first; i != tags.second; ++i)
std::string pass = tag->getString("pass");
std::string hash = tag->getString("hash");
- if (parameters[0] == username && !ServerInstance->PassCompare(user, pass, parameters[1], hash))
+ if (parameters[0] == username && ServerInstance->PassCompare(user, pass, parameters[1], hash))
{
if (!mask.empty())
{
user->WriteNotice("Setting your VHost: " + mask);
- user->ChangeDisplayedHost(mask.c_str());
+ user->ChangeDisplayedHost(mask);
return CMD_SUCCESS;
}
}
{
}
- void init()
- {
- ServerInstance->Modules->AddService(cmd);
- }
-
- virtual Version GetVersion()
+ Version GetVersion() CXX11_OVERRIDE
{
return Version("Provides masking of user hostnames via traditional /VHOST command",VF_VENDOR);
}