From 2695c489cc908ca43b49ea4428a259af781ed952 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 23 May 2008 19:07:54 +0000 Subject: There is no need for char* here any more git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9798 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/uid.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_spanningtree/uid.cpp b/src/modules/m_spanningtree/uid.cpp index 9072f3636..70f7b874c 100644 --- a/src/modules/m_spanningtree/uid.cpp +++ b/src/modules/m_spanningtree/uid.cpp @@ -46,7 +46,6 @@ bool TreeSocket::ParseUID(const std::string &source, std::deque &pa time_t age_t = ConvToInt(params[1]); time_t signon = ConvToInt(params[8]); - const char* tempnick = params[2].c_str(); std::string empty; /* XXX probably validate UID length too -- w00t */ @@ -78,20 +77,19 @@ bool TreeSocket::ParseUID(const std::string &source, std::deque &pa /* check for collision */ - user_hash::iterator iter = this->Instance->Users->clientlist->find(tempnick); + user_hash::iterator iter = this->Instance->Users->clientlist->find(params[2]); if (iter != this->Instance->Users->clientlist->end()) { /* * Nick collision. */ - Instance->Logs->Log("m_spanningtree",DEBUG,"*** Collision on %s", tempnick); + Instance->Logs->Log("m_spanningtree",DEBUG,"*** Collision on %s", params[2].c_str()); int collide = this->DoCollision(iter->second, age_t, params[5], params[7], params[0]); if (collide == 2) { /* remote client changed, make sure we change their nick for the hash too */ - tempnick = params[0].c_str(); params[2] = params[0]; } } @@ -109,9 +107,9 @@ bool TreeSocket::ParseUID(const std::string &source, std::deque &pa SendError("Protocol violation - Duplicate UUID '" + params[0] + "' on introduction of new user"); return false; } - (*(this->Instance->Users->clientlist))[tempnick] = _new; + (*(this->Instance->Users->clientlist))[params[2]] = _new; _new->SetFd(FD_MAGIC_NUMBER); - _new->nick.assign(tempnick, 0, NICKMAX - 1); + _new->nick.assign(params[2], 0, NICKMAX - 1); _new->host.assign(params[3], 0, 64); _new->dhost.assign(params[4], 0, 64); _new->server = this->Instance->FindServerNamePtr(remoteserver->GetName().c_str()); -- cgit v1.2.3