diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/channels.c | 12 | ||||
| -rw-r--r-- | src/core/os_defcon.c | 6 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/channels.c b/src/channels.c index e1c84d765..b426d73e4 100644 --- a/src/channels.c +++ b/src/channels.c @@ -269,6 +269,9 @@ void Channel::SetModeInternal(ChannelMode *cm, const std::string ¶m, bool En if (!cm) return; + EventReturn MOD_RESULT; + FOREACH_RESULT(I_OnChannelModeSet, OnChannelModeSet(this, cm->Name, param)); + /* Setting v/h/o/a/q etc */ if (cm->Type == MODE_STATUS) { @@ -342,9 +345,6 @@ void Channel::SetModeInternal(ChannelMode *cm, const std::string ¶m, bool En ci->SetFlag(CI_PERSIST); } - EventReturn MOD_RESULT; - FOREACH_RESULT(I_OnChannelModeSet, OnChannelModeSet(this, cm->Name)); - /* Check for mlock */ /* Non registered channel, no mlock */ @@ -401,6 +401,9 @@ void Channel::RemoveModeInternal(ChannelMode *cm, const std::string ¶m, bool if (!cm) return; + EventReturn MOD_RESULT; + FOREACH_RESULT(I_OnChannelModeUnset, OnChannelModeUnset(this, cm->Name, param)); + /* Setting v/h/o/a/q etc */ if (cm->Type == MODE_STATUS) { @@ -465,9 +468,6 @@ void Channel::RemoveModeInternal(ChannelMode *cm, const std::string ¶m, bool } } - EventReturn MOD_RESULT; - FOREACH_RESULT(I_OnChannelModeUnset, OnChannelModeUnset(this, cm->Name)); - /* We set -P in an empty channel, delete the channel */ if (cm->Name == CMODE_PERM && !users) { diff --git a/src/core/os_defcon.c b/src/core/os_defcon.c index e9583adfc..fdb2d236e 100644 --- a/src/core/os_defcon.c +++ b/src/core/os_defcon.c @@ -180,13 +180,13 @@ class OSDEFCON : public Module return EVENT_CONTINUE; } - EventReturn OnChannelModeSet(Channel *c, ChannelModeName Name) + EventReturn OnChannelModeSet(Channel *c, ChannelModeName Name, const std::string ¶m) { ChannelMode *cm = ModeManager::FindChannelModeByName(Name); if (CheckDefCon(DEFCON_FORCE_CHAN_MODES) && cm && DefConModesOff.HasFlag(Name)) { - c->RemoveMode(findbot(Config.s_OperServ), Name); + c->RemoveMode(findbot(Config.s_OperServ), Name, param); return EVENT_STOP; } @@ -194,7 +194,7 @@ class OSDEFCON : public Module return EVENT_CONTINUE; } - EventReturn OnChannelModeUnset(Channel *c, ChannelModeName Name) + EventReturn OnChannelModeUnset(Channel *c, ChannelModeName Name, const std::string &) { ChannelMode *cm = ModeManager::FindChannelModeByName(Name); |
