X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Finspircd.cpp;h=d0fa2d71be64d5a14e15c467b5529728e801ed2f;hb=830a99acb9512be2f2f056eeed4571c9467847fe;hp=8c3080a563225150db75baff208e0712623cedf6;hpb=7f15d3a63f9d151bfefcd5c63594a4eba6325a44;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 8c3080a56..d0fa2d71b 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -4682,10 +4682,19 @@ void process_command(userrec *user, char* cmd) } int total_params = 0; - for (int q = 0; q < strlen(cmd); q++) + if (strlen(cmd)>2) { - if (cmd[q] == ' ') - total_params++; + for (int q = 0; q < strlen(cmd)-1; q++) + { + if ((cmd[q] == ' ') && (cmd[q+1] == ':')) + { + total_params++; + // found a 'trailing', we dont count them after this. + break; + } + if (cmd[q] == ' ') + total_params++; + } } // another phidjit bug...