summaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r--src/inspircd.cpp15
1 files changed, 12 insertions, 3 deletions
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...