summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modes/cmode_k.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modes/cmode_k.cpp b/src/modes/cmode_k.cpp
index 751b993d3..4f95f3ad1 100644
--- a/src/modes/cmode_k.cpp
+++ b/src/modes/cmode_k.cpp
@@ -39,7 +39,7 @@ ModeAction ModeChannelKey::OnModeChange(userrec* source, userrec* dest, chanrec*
else if ((!channel->modes[CM_KEY]) || ((adding) && (!IS_LOCAL(source))))
{
/* Key isnt currently set */
- if (parameter.length())
+ if ((parameter.length()) && (parameter.rfind(' ') == std::string::npos))
{
strlcpy(channel->key,parameter.c_str(),32);
channel->modes[CM_KEY] = adding;