1
0
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:
Adam-
2010-04-13 02:45:33 +00:00
parent 5a6ec7cf86
commit a53719d91e
+14 -4
View File
@@ -378,12 +378,22 @@ void Channel::SetModeInternal(ChannelMode *cm, const std::string &param, 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))
{