From 26ac315192e0d8a04d50e910697ab794eedf0cc1 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 20 Apr 2014 14:35:14 -0400 Subject: New event system --- include/modules/suspend.h | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) (limited to 'include/modules/suspend.h') diff --git a/include/modules/suspend.h b/include/modules/suspend.h index 1e49b8ad8..bd4eacd3b 100644 --- a/include/modules/suspend.h +++ b/include/modules/suspend.h @@ -1,11 +1,9 @@ /* - * (C) 2003-2014 Anope Team + * (C) 2014 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. * - * Based on the original code of Epona by Lara. - * Based on the original code of Services by Andy Church. */ struct SuspendInfo @@ -16,3 +14,39 @@ struct SuspendInfo SuspendInfo() { } virtual ~SuspendInfo() { } }; + +namespace Event +{ + struct CoreExport ChanSuspend : Events + { + /** Called when a channel is suspended + * @param ci The channel + */ + virtual void OnChanSuspend(ChannelInfo *ci) anope_abstract; + }; + struct CoreExport ChanUnsuspend : Events + { + /** Called when a channel is unsuspended + * @param ci The channel + */ + virtual void OnChanUnsuspend(ChannelInfo *ci) anope_abstract; + }; + extern CoreExport EventHandlers OnChanUnsuspend; + + struct CoreExport NickSuspend : Events + { + /** Called when a nick is suspended + * @param na The nick alias + */ + virtual void OnNickSuspend(NickAlias *na) anope_abstract; + }; + + struct CoreExport NickUnsuspended : Events + { + /** Called when a nick is unsuspneded + * @param na The nick alias + */ + virtual void OnNickUnsuspended(NickAlias *na) anope_abstract; + }; +} + -- cgit