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:
+2
-2
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user