diff --git a/Changes b/Changes index e04dacd9a..49678fbab 100644 --- a/Changes +++ b/Changes @@ -614,3 +614,4 @@ seen. gmtime warning still there - Added the ability to use file globs in loadmodule and include (only if your system has glob) - Added ./Config option to enable IPv6 (and made a configure check to make sure we can) - Made glob() use GLOB_LIMIT on OpenBSD 2.9 to help prevent a DoS +- Fixed a bug allowing channek keys to have spaces diff --git a/src/channel.c b/src/channel.c index fa47b58b3..a6a250a87 100644 --- a/src/channel.c +++ b/src/channel.c @@ -1853,9 +1853,13 @@ int do_mode_char(aChannel *chptr, long modetype, char modechar, char *param, u_ break; if (what == MODE_ADD) { - if (!bounce) /* don't do the mode at all. */ + if (!bounce) { /* don't do the mode at all. */ + char *tmp; + if ((tmp = strchr(param, ' '))) + *tmp = '\0'; strncpyzt(chptr->mode.key, param, sizeof(chptr->mode.key)); + } tmpstr = param; } else