From 921ddbd517a8575205931b10ad66f6607e0f5890 Mon Sep 17 00:00:00 2001 From: Adam- Date: Tue, 3 Nov 2009 02:05:45 +0000 Subject: Added OnPreNickExpire and OnPreChanExpire events, which can keep nicks and channels from expiring git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2605 5417fbe8-f217-4b02-8779-1006273d7864 --- include/modules.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/modules.h b/include/modules.h index 021276dce..1befc9250 100644 --- a/include/modules.h +++ b/include/modules.h @@ -683,6 +683,12 @@ class CoreExport Module */ virtual void OnTopicUpdated(Channel *c, const char *topic) { } + /** Called before a channel expires + * @param ci The channel + * @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to halt the command and not process it + */ + virtual EventReturn OnPreChanExpire(ChannelInfo *ci) { return EVENT_CONTINUE; } + /** Called when a channel expires * @param chname The channel name */ @@ -727,6 +733,12 @@ class CoreExport Module */ virtual void OnSignal(const char *msg) { } + /** Called before a nick expires + * @param na The nick + * @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to halt the command and not process it + */ + virtual EventReturn OnPreNickExpire(NickAlias *na) { return EVENT_CONTINUE; } + /** Called when a nick drops * @param nick The nick */ @@ -992,13 +1004,13 @@ enum Implementation { I_BEGIN, /* NickServ */ - I_OnNickExpire, I_OnNickForbidden, I_OnNickGroup, I_OnNickLogout, I_OnNickIdentify, I_OnNickDrop, + I_OnPreNickExpire, I_OnNickExpire, I_OnNickForbidden, I_OnNickGroup, I_OnNickLogout, I_OnNickIdentify, I_OnNickDrop, I_OnNickRegister, I_OnNickSuspended, I_OnNickUnsuspended, I_OnFindUser, I_OnFindNick, I_OnDelNick, I_OnFindCore, I_OnDelCore, I_OnChangeCoreDisplay, I_OnFindRequestNick, I_OnDelNickRequest, I_OnMakeNickRequest, I_OnNickClearAccess, I_OnNickEraseAccess, /* ChanServ */ - I_OnChanForbidden, I_OnChanSuspend, I_OnChanDrop, I_OnChanExpire, I_OnAccessAdd, I_OnAccessChange, + I_OnChanForbidden, I_OnChanSuspend, I_OnChanDrop, I_OnPreChanExpire, I_OnChanExpire, I_OnAccessAdd, I_OnAccessChange, I_OnAccessDel, I_OnAccessClear, I_OnChanRegistered, I_OnChanUnsuspend, I_OnDelChan, I_OnChannelCreate, I_OnChannelDelete, -- cgit