diff options
| author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-12-29 23:16:10 +0000 |
|---|---|---|
| committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-12-29 23:16:10 +0000 |
| commit | 7665af27cd8317bd4fc017d78e3d1b89d6b0a823 (patch) | |
| tree | ea4f8e4bf15dcf91ba0622ff0a8b036b0a91f8ef /src/users.c | |
| parent | df107dac1f50e721493aaf0657f85cba5ef8b35f (diff) | |
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
Diffstat (limited to 'src/users.c')
| -rw-r--r-- | src/users.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/users.c b/src/users.c index 1a02e5344..96c95bbfb 100644 --- a/src/users.c +++ b/src/users.c @@ -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); |
