From dba88edc767697f9c2a9de3c4c2fbaea6cc35f3e Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 7 Feb 2006 18:26:38 +0000 Subject: Experimental improved string handling in server links git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3127 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/command_parse.cpp | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'src/command_parse.cpp') diff --git a/src/command_parse.cpp b/src/command_parse.cpp index 9835c6961..311def7d2 100644 --- a/src/command_parse.cpp +++ b/src/command_parse.cpp @@ -475,9 +475,9 @@ void CommandParser::ProcessCommand(userrec *user, char* cmd) } else { - for (unsigned int i = 0; i <= strlen(cmd); i++) + for (char* i = cmd; *i; i++) { - cmd[i] = toupper(cmd[i]); + *i = toupper(*i); } } @@ -541,17 +541,16 @@ void CommandParser::ProcessCommand(userrec *user, char* cmd) if (cm != cmdlist.end()) { - - if (user) + if (user) + { + /* activity resets the ping pending timer */ + user->nping = TIME + user->pingmax; + if ((items) < cm->second->min_params) { - /* activity resets the ping pending timer */ - user->nping = TIME + user->pingmax; - if ((items) < cm->second->min_params) - { - log(DEBUG,"not enough parameters: %s %s",user->nick,command); - WriteServ(user->fd,"461 %s %s :Not enough parameters",user->nick,command); - return; - } + log(DEBUG,"not enough parameters: %s %s",user->nick,command); + WriteServ(user->fd,"461 %s %s :Not enough parameters",user->nick,command); + return; + } if ((!strchr(user->modes,cm->second->flags_needed)) && (cm->second->flags_needed)) { log(DEBUG,"permission denied: %s %s",user->nick,command); -- cgit v1.2.3