summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/commands/cmd_nick.cpp6
-rw-r--r--src/modules/m_spanningtree/uid.cpp2
2 files changed, 6 insertions, 2 deletions
diff --git a/src/commands/cmd_nick.cpp b/src/commands/cmd_nick.cpp
index 72e3ff17e..0391323dc 100644
--- a/src/commands/cmd_nick.cpp
+++ b/src/commands/cmd_nick.cpp
@@ -57,11 +57,15 @@ CmdResult CommandNick::Handle (const std::vector<std::string>& parameters, User
}
}
- if (irc::string(user->nick.c_str()) == assign(parameters[0]))
+ if (assign(user->nick) == parameters[0])
{
+ ServerInstance->Logs->Log("nick", DEBUG, "Change to same nick '%s' %d '%s' '%d'", user->nick.c_str(), user->nick.length(), parameters[0].c_str(), parameters[0].length());
/* If its exactly the same, even case, dont do anything. */
if (parameters[0] == user->nick)
+ {
+ ServerInstance->Logs->Log("nick", DEBUG, "Not even a case change");
return CMD_SUCCESS;
+ }
/* Its a change of case. People insisted that they should be
* able to do silly things like this even though the RFC says
diff --git a/src/modules/m_spanningtree/uid.cpp b/src/modules/m_spanningtree/uid.cpp
index d5caedd8e..9072f3636 100644
--- a/src/modules/m_spanningtree/uid.cpp
+++ b/src/modules/m_spanningtree/uid.cpp
@@ -111,7 +111,7 @@ bool TreeSocket::ParseUID(const std::string &source, std::deque<std::string> &pa
}
(*(this->Instance->Users->clientlist))[tempnick] = _new;
_new->SetFd(FD_MAGIC_NUMBER);
- _new->nick.assign(tempnick, NICKMAX - 1);
+ _new->nick.assign(tempnick, 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());