From 354cf0401283c67a6cf8962dfb55fc0558662cdd Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 27 Jul 2006 11:56:08 +0000 Subject: Fix the remote +k-k stuff git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4554 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modes/cmode_k.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/modes/cmode_k.cpp b/src/modes/cmode_k.cpp index b1cfac1e9..5e55ce972 100644 --- a/src/modes/cmode_k.cpp +++ b/src/modes/cmode_k.cpp @@ -23,11 +23,12 @@ std::pair ModeChannelKey::ModeSet(userrec* source, userrec* de ModeAction ModeChannelKey::OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding) { - if (channel->modes[CM_KEY] != adding) + if ((channel->modes[CM_KEY] != adding) || (!IS_LOCAL(source))) { - if ((channel->modes[CM_KEY]) && (strcasecmp(parameter.c_str(),channel->key))) + if (((channel->modes[CM_KEY]) && (strcasecmp(parameter.c_str(),channel->key))) && (IS_LOCAL(source))) { /* Key is currently set and the correct key wasnt given */ + log(DEBUG,"Key Cond 2"); return MODEACTION_DENY; } else if ((!channel->modes[CM_KEY]) || ((adding) && (!IS_LOCAL(source)))) @@ -44,10 +45,12 @@ ModeAction ModeChannelKey::OnModeChange(userrec* source, userrec* dest, chanrec* channel->modes[CM_KEY] = adding; return MODEACTION_ALLOW; } + log(DEBUG,"Key Cond three"); return MODEACTION_DENY; } else { + log(DEBUG,"Key Condition one"); return MODEACTION_DENY; } } -- cgit v1.2.3