diff options
author | adam- <adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-07-21 20:52:29 +0000 |
---|---|---|
committer | adam- <adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-07-21 20:52:29 +0000 |
commit | f8efdbf822eb2f593ea1ac199f842b40963eecfa (patch) | |
tree | 73266b7fc20e677e0f6cc6909329f42bdc15baff | |
parent | 55d4d6084e907eba711fedb79c3fc0552f1afc7b (diff) |
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
-rw-r--r-- | include/modules.h | 7 | ||||
-rw-r--r-- | src/chanserv.c | 2 |
2 files changed, 8 insertions, 1 deletions
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) { |