summaryrefslogtreecommitdiff
path: root/src/channels.c
diff options
context:
space:
mode:
authorAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2010-01-14 21:30:38 +0000
committerAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2010-01-14 21:30:38 +0000
commit525dfe12e634bf575c3a090f45271861da8d7bd0 (patch)
tree9cb6c21978454bd90e86007012eb51fe70dcccb0 /src/channels.c
parent0d6fa568ecb57105561c669c936d23018b70bfe2 (diff)
Added param arg to ChannelModeSet/Unset events, and fixed it to not ignore status and list modes
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2758 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/channels.c')
-rw-r--r--src/channels.c12
1 files changed, 6 insertions, 6 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 &param, 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 &param, 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 &param, 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 &param, 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)
{