From 2bbe76b1980aef7c91a15e3d6201bc40e036cd8f Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 10 Sep 2006 18:24:09 +0000 Subject: Make it neater git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5207 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modes/cmode_k.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modes/cmode_k.cpp b/src/modes/cmode_k.cpp index fd5808b73..5d62a4f89 100644 --- a/src/modes/cmode_k.cpp +++ b/src/modes/cmode_k.cpp @@ -63,10 +63,11 @@ 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()) && (parameter.length() < 32) && (parameter.rfind(' ') == std::string::npos)) + if ((parameter.length()) && (parameter.rfind(' ') == std::string::npos)) { strlcpy(channel->key,parameter.c_str(),32); channel->modes[CM_KEY] = adding; + parameter = channel->key; return MODEACTION_ALLOW; } else -- cgit v1.2.3