From f8efdbf822eb2f593ea1ac199f842b40963eecfa Mon Sep 17 00:00:00 2001 From: adam- Date: Tue, 21 Jul 2009 20:52:29 +0000 Subject: [PATCH] Added a new event for channels being deleted git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2388 5417fbe8-f217-4b02-8779-1006273d7864 --- include/modules.h | 7 ++++++- src/chanserv.c | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/modules.h b/include/modules.h index 15a49c607..fe171179d 100644 --- a/include/modules.h +++ b/include/modules.h @@ -747,6 +747,11 @@ class CoreExport Module */ virtual void OnChanUnsuspend(ChannelInfo *ci) { } + /** Called when a channel is being deleted, for any reason + * @param ci The channel + */ + virtual void OnDelChan(ChannelInfo *ci) { } + /** Called when a nick is dropped * @param nick The nick */ @@ -854,7 +859,7 @@ enum Implementation /* ChanServ */ I_OnChanForbidden, I_OnChanSuspend, I_OnChanDrop, I_OnChanExpire, I_OnAccessAdd, I_OnAccessChange, - I_OnAccessDel, I_OnAccessClear, I_OnChanRegistered, I_OnChanUnsuspend, + I_OnAccessDel, I_OnAccessClear, I_OnChanRegistered, I_OnChanUnsuspend, I_OnDelChan, /* BotServ */ I_OnBotJoin, I_OnBotKick, I_OnBotCreate, I_OnBotChange, I_OnBotDelete, I_OnBotAssign, I_OnBotUnAssign, diff --git a/src/chanserv.c b/src/chanserv.c index abebb6f61..ea470e064 100644 --- a/src/chanserv.c +++ b/src/chanserv.c @@ -1665,6 +1665,8 @@ int delchan(ChannelInfo * ci) return 0; } + FOREACH_MOD(I_OnDelChan, OnDelChan(ci)); + nc = ci->founder; if (debug >= 2) {