- // ugh, nickchange failed for some reason -- possibly existing nick?
- userrec::QuitUser(ServerInstance, source, "Nickname collision");
- return CMD_FAILURE;
+ locked.set(target, 1);
+
+ std::string oldnick = target->nick;
+ if (target->ChangeNick(parameters[1]))
+ ServerInstance->SNO->WriteGlobalSno('a', user->nick+" used NICKLOCK to change and hold "+oldnick+" to "+parameters[1]);
+ else
+ {
+ std::string newnick = target->nick;
+ ServerInstance->SNO->WriteGlobalSno('a', user->nick+" used NICKLOCK, but "+oldnick+" failed nick change to "+parameters[1]+" and was locked to "+newnick+" instead");
+ }