]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/event.h
Implement support for setting TLSv1.3 ciphersuites in ssl_openssl.
[user/henk/code/inspircd.git] / include / event.h
index b4b695d0e5e8758f2acd6c5d4a058e90b02c138a..a40400d2f9f987b0fbbdf2c20c02e89656fbdf9e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * InspIRCd -- Internet Relay Chat Daemon
  *
- *   Copyright (C) 2018-2020 Sadie Powell <sadie@witchery.services>
+ *   Copyright (C) 2018-2021 Sadie Powell <sadie@witchery.services>
  *   Copyright (C) 2015, 2018 Attila Molnar <attilamolnar@hush.com>
  *
  * This file is part of InspIRCd.  InspIRCd is free software: you can
@@ -20,6 +20,8 @@
 
 #pragma once
 
+#include "base.h"
+
 namespace Events
 {
        class ModuleEventListener;
@@ -184,7 +186,7 @@ inline bool Events::ModuleEventProvider::ElementComp::operator()(Events::ModuleE
  * FOREACH_MOD_CUSTOM(accountevprov, AccountEventListener, OnAccountChange, MOD_RESULT, (user, newaccount))
  */
 #define FOREACH_MOD_CUSTOM(prov, listenerclass, func, params) do { \
-       if ((prov).GetModule() && !(prov).GetModule()->dying) \
+       if (!(prov).GetModule() || !(prov).GetModule()->dying) \
        { \
                const ::Events::ModuleEventProvider::SubscriberList& _handlers = (prov).GetSubscribers(); \
                for (::Events::ModuleEventProvider::SubscriberList::const_iterator _i = _handlers.begin(); _i != _handlers.end(); ++_i) \
@@ -206,7 +208,7 @@ inline bool Events::ModuleEventProvider::ElementComp::operator()(Events::ModuleE
  */
 #define FIRST_MOD_RESULT_CUSTOM(prov, listenerclass, func, result, params) do { \
        result = MOD_RES_PASSTHRU; \
-       if ((prov).GetModule() && !(prov).GetModule()->dying) \
+       if (!(prov).GetModule() || !(prov).GetModule()->dying) \
        { \
                const ::Events::ModuleEventProvider::SubscriberList& _handlers = (prov).GetSubscribers(); \
                for (::Events::ModuleEventProvider::SubscriberList::const_iterator _i = _handlers.begin(); _i != _handlers.end(); ++_i) \