From c12ec889bb600626ecbd0cb903564f639ee55700 Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 30 Apr 2005 02:55:55 +0000 Subject: 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 --- src/mode.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/mode.cpp') 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; } -- cgit v1.2.3