1
0
mirror of https://github.com/anope/anope.git synced 2026-07-04 23:53:13 +02:00

Chnaged ChannelModeSet/Unset events to be able to block checks such as secureops and mlock, and made it so you can't set a mode already set or unset a mode already unset so the modestacker doesn't send modes it doesn't need to

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2719 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
Adam-
2009-12-29 23:16:10 +00:00
parent df107dac1f
commit 7665af27cd
4 changed files with 27 additions and 15 deletions
+2 -2
View File
@@ -512,7 +512,7 @@ void User::RemoveModeInternal(UserMode *um)
*/
void User::SetMode(BotInfo *bi, UserMode *um, const std::string &Param)
{
if (!um)
if (!um || HasMode(um->Name))
return;
ModeManager::StackerAdd(bi, this, um, true, Param);
@@ -545,7 +545,7 @@ void User::SetMode(BotInfo *bi, char ModeChar, const std::string &Param)
*/
void User::RemoveMode(BotInfo *bi, UserMode *um)
{
if (!um)
if (!um || !HasMode(um->Name))
return;
ModeManager::StackerAdd(bi, this, um, false);