mirror of
https://github.com/anope/anope.git
synced 2026-06-26 08:36:39 +02:00
Remove +r from nonregistered channels
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2890 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
+14
-4
@@ -378,12 +378,22 @@ void Channel::SetModeInternal(ChannelMode *cm, const std::string ¶m, bool En
|
||||
ci->SetFlag(CI_PERSIST);
|
||||
}
|
||||
|
||||
/* Check for mlock */
|
||||
|
||||
/* Non registered channel, no mlock */
|
||||
if (!ci || !EnforceMLock || MOD_RESULT == EVENT_STOP)
|
||||
/* Check if we should enforce mlock */
|
||||
if (!EnforceMLock || MOD_RESULT == EVENT_STOP)
|
||||
return;
|
||||
|
||||
/* 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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user