diff options
author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-04-13 02:45:33 +0000 |
---|---|---|
committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-04-13 02:45:33 +0000 |
commit | a53719d91e441aba331a144ed8c8b3debbc5c847 (patch) | |
tree | 60ebb597f95281191366cd6135966894202ac38d | |
parent | 5a6ec7cf86958d1be9fba801e86fc90c8de45a61 (diff) |
Remove +r from nonregistered channels
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2890 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r-- | src/channels.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/channels.c b/src/channels.c index c5e35a473..60deace17 100644 --- a/src/channels.c +++ b/src/channels.c @@ -378,11 +378,21 @@ void Channel::SetModeInternal(ChannelMode *cm, const std::string ¶m, bool En ci->SetFlag(CI_PERSIST); } - /* Check for mlock */ + /* Check if we should enforce mlock */ + if (!EnforceMLock || MOD_RESULT == EVENT_STOP) + return; - /* Non registered channel, no mlock */ - if (!ci || !EnforceMLock || MOD_RESULT == EVENT_STOP) + /* Non registered channels can not be +r */ + if (!ci && HasMode(CMODE_REGISTERED)) + { + RemoveMode(NULL, CMODE_REGISTERED); + } + + /* Non registered channel has no mlock */ + if (!ci) + { return; + } /* If this channel has this mode locked negative */ if (ci->HasMLock(cm->Name, false)) |