summaryrefslogtreecommitdiff
path: root/include/modules/os_session.h
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-04-20 14:35:14 -0400
committerAdam <Adam@anope.org>2014-04-20 14:35:14 -0400
commit26ac315192e0d8a04d50e910697ab794eedf0cc1 (patch)
treeb9916f14fe35ce5c4de95c4194ca4ea0cb30812f /include/modules/os_session.h
parent0b6476f06ff9ce06545c421143c7d7163c750aa5 (diff)
New event system
Diffstat (limited to 'include/modules/os_session.h')
-rw-r--r--include/modules/os_session.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/modules/os_session.h b/include/modules/os_session.h
index ac6bf9395..91548a5c2 100644
--- a/include/modules/os_session.h
+++ b/include/modules/os_session.h
@@ -51,6 +51,24 @@ class SessionService : public Service
static ServiceReference<SessionService> session_service("SessionService", "session");
+namespace Event
+{
+ struct CoreExport Exception : Events
+ {
+ /** Called after an exception has been added
+ * @param ex The exception
+ * @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to halt the command and not process it
+ */
+ virtual EventReturn OnExceptionAdd(::Exception *ex) anope_abstract;
+
+ /** Called before an exception is deleted
+ * @param source The source deleting it
+ * @param ex The exceotion
+ */
+ virtual void OnExceptionDel(CommandSource &source, ::Exception *ex) anope_abstract;
+ };
+}
+
void Exception::Serialize(Serialize::Data &data) const
{
data["mask"] << this->mask;