X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_vhost.cpp;h=53910fdbe5c6f65e14f82fd76feb7ecda9fe7b5f;hb=f9fd78c01623514a060c607534fc52cb73140200;hp=623c2662d22296770c538152aaa1b4c70e10e652;hpb=8790551dc182cd8804ee7d8ef89ccb31067cc2a4;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_vhost.cpp b/src/modules/m_vhost.cpp index 623c2662d..53910fdbe 100644 --- a/src/modules/m_vhost.cpp +++ b/src/modules/m_vhost.cpp @@ -22,8 +22,6 @@ #include "inspircd.h" -/* $ModDesc: Provides masking of user hostnames via traditional /VHOST command */ - /** Handle /VHOST */ class CommandVhost : public Command @@ -45,18 +43,18 @@ class CommandVhost : public Command 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->WriteServ("NOTICE "+user->nick+" :Setting your VHost: " + mask); - user->ChangeDisplayedHost(mask.c_str()); + user->WriteNotice("Setting your VHost: " + mask); + user->ChangeDisplayedHost(mask); return CMD_SUCCESS; } } } - user->WriteServ("NOTICE "+user->nick+" :Invalid username or password."); + user->WriteNotice("Invalid username or password."); return CMD_FAILURE; } }; @@ -70,12 +68,7 @@ class ModuleVHost : public Module { } - 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); }