summaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-23 18:52:40 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-23 18:52:40 +0000
commitcf83031f7bf1c037bf726df84f93686b9631531b (patch)
tree2cf3e166803003a28afbea996ada4073e9adcc38 /src/commands
parent8684e3332cd69015f94d25ed8e6ff6f9d5d20238 (diff)
NEVER use the two-param assign unless you want your string padding to len bytes with \0!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9796 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/cmd_nick.cpp6
1 files changed, 5 insertions, 1 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