Commit 2c54aa31 authored by Dustin L. Howett's avatar Dustin L. Howett

Elide consecutive spaces in argument parsing (x y == x y).

parent 58323246
......@@ -63,6 +63,11 @@ _EVENT(PRIVMSG) {
int argstart = 0;
for(unsigned int i = 0; i <= strlen(msgbuf); ++i) {
if(msgbuf[i] == ' ' || msgbuf[i] == '\0') {
if(argstart == i) {
argstart++;
continue;
}
argv[argc] = strndup(msgbuf+argstart, i-argstart);
++argc;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment