From: pk910 Date: Mon, 3 Oct 2011 18:28:11 +0000 (+0200) Subject: fixed modcmd again (small fix) X-Git-Tag: v5.3~328 X-Git-Url: http://git.pk910.de/?p=NeonServV5.git;a=commitdiff_plain;h=299d5b0a073f1c57d2227906f4ddf7df038f26b6 fixed modcmd again (small fix) --- diff --git a/src/modcmd.c b/src/modcmd.c index ac3e400..c8afed6 100644 --- a/src/modcmd.c +++ b/src/modcmd.c @@ -180,10 +180,11 @@ static void handle_command(struct ClientSocket *client, struct UserNode *user, s if(b[0] == '%') { b++; if(b[strlen(b)-1] == '-') { - allargs = 1; - b[strlen(b)-1] = '\0'; + allargs = strlen(b)-1; + b[allargs] = '\0'; argi = atoi(b); - b[strlen(b)-1] = '-'; + b[allargs] = '-'; + allargs = 1; } else { allargs = 0; argi = atoi(b);