+ if (InUse->registered != REG_ALL)
+ {
+ /* change the nick of the older user to its UUID
+ */
+ InUse->WriteTo(InUse, "NICK %s", InUse->uuid);
+ InUse->WriteServ("433 %s %s :Nickname overruled.", InUse->nick, InUse->nick);
+ InUse->UpdateNickHash(InUse->uuid);
+ strlcpy(InUse->nick, InUse->uuid, NICKMAX - 1);
+ InUse->InvalidateCache();
+ /* Take away their nickname-sent state forcing them to send a nick again */
+ InUse->registered &= ~REG_NICK;
+ }
+ else
+ {
+ ServerInstance->Log(DEBUG,"Nick in use and user REG_ALL");
+ user->WriteServ("433 %s %s :Nickname is already in use.", user->registered >= REG_NICK ? user->nick : "*", parameters[0]);
+ return CMD_FAILURE;
+ }