diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-07 18:26:38 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-07 18:26:38 +0000 |
commit | dba88edc767697f9c2a9de3c4c2fbaea6cc35f3e (patch) | |
tree | 74122d2f9666219c8b4bd047604711f5a2772fa5 /src/command_parse.cpp | |
parent | daff96bf568a51de4e4ec460240e093c43b11ff3 (diff) |
Experimental improved string handling in server links
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3127 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/command_parse.cpp')
-rw-r--r-- | src/command_parse.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
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); |