diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-11 07:17:30 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-11 07:17:30 +0000 |
commit | c6a4d51c006566dbbe959f3272c438ab740bac9c (patch) | |
tree | dd0e583372236bbb808ddd172497ca44f47c2d48 /src | |
parent | baa663e5156d557b3771b8ef025f279d0ac4709c (diff) |
Make UID modify its parameter on a nick collision so that services has an easier time understanding things
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12433 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_spanningtree/uid.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/modules/m_spanningtree/uid.cpp b/src/modules/m_spanningtree/uid.cpp index 5152ef274..7059d9603 100644 --- a/src/modules/m_spanningtree/uid.cpp +++ b/src/modules/m_spanningtree/uid.cpp @@ -33,7 +33,6 @@ CmdResult CommandUID::Handle(const parameterlist ¶ms, User* serversrc) time_t age_t = ConvToInt(params[1]); time_t signon = ConvToInt(params[7]); std::string empty; - std::string nick(params[2]); std::string modestr(params[8]); TreeServer* remoteserver = Utils->FindServer(serversrc->server); @@ -50,7 +49,7 @@ CmdResult CommandUID::Handle(const parameterlist ¶ms, User* serversrc) TreeSocket* sock = remoteserver->GetRoute()->GetSocket(); /* check for collision */ - user_hash::iterator iter = ServerInstance->Users->clientlist->find(nick); + user_hash::iterator iter = ServerInstance->Users->clientlist->find(params[2]); if (iter != ServerInstance->Users->clientlist->end()) { @@ -63,7 +62,7 @@ CmdResult CommandUID::Handle(const parameterlist ¶ms, User* serversrc) if (collide != 1) { /* remote client changed, make sure we change their nick for the hash too */ - nick = params[0]; + const_cast<parameterlist&>(params)[2] = params[0]; } } @@ -79,8 +78,8 @@ CmdResult CommandUID::Handle(const parameterlist ¶ms, User* serversrc) { return CMD_INVALID; } - (*(ServerInstance->Users->clientlist))[nick] = _new; - _new->nick = nick; + (*(ServerInstance->Users->clientlist))[params[2]] = _new; + _new->nick = params[2]; _new->host = params[3]; _new->dhost = params[4]; _new->ident = params[5]; |