- // give them a lock flag
- ServerInstance->WriteOpers(std::string(user->nick)+" used NICKLOCK to change and hold "+parameters[0]+" to "+parameters[1]);
- if (!source->ForceNickChange(parameters[1]))
+ user->WriteServ("NOTICE %s :*** Invalid nickname '%s'", user->nick.c_str(), parameters[1].c_str());
+ return CMD_FAILURE;
+ }
+ }
+
+ /* If we made it this far, extend the user */
+ if (target)
+ {
+ target->Extend("nick_locked", "ON");
+ ServerInstance->SNO->WriteToSnoMask('A', user->nick+" used NICKLOCK to change and hold "+target->nick+" to "+parameters[1]);
+
+ /* Only send out nick from local server */
+ if (IS_LOCAL(target))
+ {
+ std::string oldnick = user->nick;
+ std::string newnick = target->nick;
+ if (!target->ForceNickChange(parameters[1].c_str()))