diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/commands.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/commands.cpp b/src/commands.cpp index 5e5cf66c8..40edee6e2 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -1970,23 +1970,25 @@ void handle_L(char token,char* params,serverrec* source,serverrec* reply, char* char* nick = NULL; char* channel = NULL; char* reason = NULL; - if (strchr(params,':')) - { - nick = strtok(params," "); - channel = strtok(NULL," :"); - reason = strtok(NULL,"\r\n"); - reason++; - } - else + log(DEBUG,"L TOKEN PARS: '%s'",params); + if (strstr(params,":#")) { nick = strtok(params," "); channel = strtok(NULL,"\r\n"); + channel++; reason = ""; } + else + { + nick = strtok(params," "); + channel = strtok(NULL," :"); + reason = strtok(NULL,"\r\n"); + reason++; + } userrec* user = Find(nick); if ((user) && (channel) && (reason)) { - if (strcmp(reason,"")) + if ((!reason) && (*reason != '\0')) { del_channel(user,channel,reason,true); } |