]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
If SVSNICK is sent to force a change to a UID-lookalike, just change nick to UID...
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 24 Jan 2010 02:01:38 +0000 (02:01 +0000)
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 24 Jan 2010 02:01:38 +0000 (02:01 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12318 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/m_spanningtree/svsnick.cpp

index f13385fc2c4f9721e29bb4227e651fee7ff2438f..fda150012f1f845a5db01b3c8c3fc1fcd0db5b1d 100644 (file)
@@ -23,10 +23,11 @@ CmdResult CommandSVSNick::Handle(const std::vector<std::string>& parameters, Use
 
        if (u && IS_LOCAL(u))
        {
-               parameterlist par;
-               par.push_back(parameters[1]);
+               std::string nick = parameters[1];
+               if (isdigit(nick[0]))
+                       nick = u->uuid;
 
-               if (!u->ForceNickChange(parameters[1].c_str()))
+               if (!u->ForceNickChange(nick.c_str()))
                {
                        /* buh. UID them */
                        if (!u->ForceNickChange(u->uuid.c_str()))