diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-01-15 23:49:24 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-01-15 23:49:24 +0000 |
commit | d769fef63f2f9ccd929aa51fda3c3da7ec389181 (patch) | |
tree | d8277ddfdbb86a4825ec09e3ac8011a9fdffa51f /src/cmd_nick.cpp | |
parent | 3795d18aeecb27f31364c6f32730d0d147819423 (diff) |
Crusade to remove debug from stable and tested parts of the core and base modules.
Most of the code here being de-noised hasnt had a crash or bug in it for many months, if not a year so the debug output is useless noise in the logfile when trying to trace a bug in a REAL problem
area.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6356 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/cmd_nick.cpp')
-rw-r--r-- | src/cmd_nick.cpp | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/src/cmd_nick.cpp b/src/cmd_nick.cpp index 19d970d53..3cfebea2b 100644 --- a/src/cmd_nick.cpp +++ b/src/cmd_nick.cpp @@ -29,17 +29,12 @@ CmdResult cmd_nick::Handle (const char** parameters, int pcnt, userrec *user) { char oldnick[NICKMAX]; - if (!parameters[0][0]) - { - ServerInstance->Log(DEBUG,"zero length new nick passed to handle_nick"); + if (!*parameters[0]) return CMD_FAILURE; - } + if (!*user->nick) - { - ServerInstance->Log(DEBUG,"invalid old nick passed to handle_nick"); return CMD_FAILURE; - } - ServerInstance->Log(DEBUG,"Fall through"); + if (irc::string(user->nick) == irc::string(parameters[0])) { /* If its exactly the same, even case, dont do anything. */ @@ -50,7 +45,6 @@ CmdResult cmd_nick::Handle (const char** parameters, int pcnt, userrec *user) * able to do silly things like this even though the RFC says * the nick AAA is the same as the nick aaa. */ - ServerInstance->Log(DEBUG,"old nick is new nick, not updating hash (case change only)"); strlcpy(oldnick, user->nick, NICKMAX - 1); int MOD_RESULT = 0; FOREACH_RESULT(I_OnUserPreNick,OnUserPreNick(user,parameters[0])); @@ -118,16 +112,9 @@ CmdResult cmd_nick::Handle (const char** parameters, int pcnt, userrec *user) user->InvalidateCache(); - ServerInstance->Log(DEBUG,"new nick set: %s",user->nick); - if (user->registered < REG_NICKUSER) { user->registered = (user->registered | REG_NICK); - // dont attempt to look up the dns until they pick a nick... because otherwise their pointer WILL change - // and unless we're lucky we'll get a duff one later on. - //user->dns_done = (!lookup_dns(user->nick)); - //if (user->dns_done) - // ServerInstance->Log(DEBUG,"Aborting dns lookup of %s because dns server experienced a failure.",user->nick); if (ServerInstance->Config->NoUserDns) { |