summaryrefslogtreecommitdiff
path: root/src/mode.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-30 02:55:55 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-30 02:55:55 +0000
commitc12ec889bb600626ecbd0cb903564f639ee55700 (patch)
treed0f7e0833f6aa48f4404f75335ca7c7fb4cad37e /src/mode.cpp
parente190c2ae913682fa5da83ccf53722289c3e7d77c (diff)
Added OnAddBan and OnDelBan module api calls, and fixed glitch which required them in m_timedbans module
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1267 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/mode.cpp')
-rw-r--r--src/mode.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index e2eda1c82..65e42e875 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -470,6 +470,11 @@ char* add_ban(userrec *user,char *dest,chanrec *chan,int status)
log(DEBUG,"add_ban: %s %s",chan->name,user->nick);
+ int MOD_RESULT = 0;
+ FOREACH_RESULT(OnAddBan(user,chan,dest));
+ if (MOD_RESULT)
+ return NULL;
+
TidyBan(dest);
for (BanList::iterator i = chan->bans.begin(); i != chan->bans.end(); i++)
{
@@ -499,6 +504,10 @@ char* take_ban(userrec *user,char *dest,chanrec *chan,int status)
{
if (!strcasecmp(i->data,dest))
{
+ int MOD_RESULT = 0;
+ FOREACH_RESULT(OnDelBan(user,chan,dest));
+ if (MOD_RESULT)
+ return NULL;
chan->bans.erase(i);
return dest;
}