]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sanick.cpp
Fail a SANICK if the target nickname already exists.
[user/henk/code/inspircd.git] / src / modules / m_sanick.cpp
index 724553e3c14d3c502430b21be4be094002ef16d9..31813bedf93e41579ab2d01fdc676da15008eebf 100644 (file)
@@ -69,7 +69,7 @@ class CommandSanick : public Command
                {
                        const std::string oldnick = target->nick;
                        const std::string newnick = parameters[1];
-                       if (target->ChangeNick(newnick))
+                       if (!ServerInstance->FindNickOnly(newnick) && target->ChangeNick(newnick))
                        {
                                ServerInstance->SNO->WriteGlobalSno('a', user->nick + " used SANICK to change " + oldnick + " to " + newnick);
                        }