- if ((!strcmp(parameters[0],username.c_str())) && (!strcmp(parameters[1],pass.c_str())))
- {
- if (mask != "")
- {
- Srv->SendServ(user->fd,"NOTICE "+std::string(user->nick)+" :Setting your VHost: " + mask);
- Srv->ChangeHost(user,mask);
- return;
- }
- }
- }
- Srv->SendServ(user->fd,"NOTICE "+std::string(user->nick)+" :Invalid username or password.");
- }
+
+ if ((!strcmp(parameters[0],username.c_str())) && (!strcmp(parameters[1],pass.c_str())))
+ {
+ if (!mask.empty())
+ {
+ user->WriteServ("NOTICE "+std::string(user->nick)+" :Setting your VHost: " + mask);
+ user->ChangeDisplayedHost(mask.c_str());
+ return CMD_LOCALONLY;
+ }
+ }
+ }
+
+ user->WriteServ("NOTICE "+std::string(user->nick)+" :Invalid username or password.");
+ return CMD_FAILURE;
+ }