+ if (target && ServerInstance->ULine(target->server))
+ {
+ user->WriteNumeric(ERR_NOPRIVILEGES, "%s :Cannot use an NICKUNLOCK command on a u-lined client",user->nick.c_str());
+ return CMD_FAILURE;
+ }
+
+ if (!target)
+ {
+ user->WriteServ("NOTICE %s :*** No such nickname: '%s'", user->nick.c_str(), parameters[0].c_str());
+ return CMD_FAILURE;
+ }
+ }
+
+ if (target && IS_LOCAL(target))
+ {
+ if (locked.set(target, 0))
+ {
+ ServerInstance->SNO->WriteGlobalSno('a', std::string(user->nick)+" used NICKUNLOCK on "+parameters[0]);
+ user->WriteNumeric(945, "%s %s :Nickname now unlocked.",user->nick.c_str(),target->nick.c_str());
+ }
+ else
+ {
+ user->WriteNumeric(946, "%s %s :This user's nickname is not locked.",user->nick.c_str(),target->nick.c_str());
+ return CMD_FAILURE;
+ }