summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2020-12-23 15:39:31 +0000
committerSadie Powell <sadie@witchery.services>2020-12-23 15:39:31 +0000
commit2c789b7c321a538f52c553bb7983f7215fe8532f (patch)
tree865884bce74206d74467ace751b0da7850798a87 /include
parentaaee82ee303dd3f1f4d1bea219942fc79bb2542f (diff)
Fix core message events not being fired.
Third time lucky eh?
Diffstat (limited to 'include')
-rw-r--r--include/event.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/event.h b/include/event.h
index b4b695d0e..d3b779216 100644
--- a/include/event.h
+++ b/include/event.h
@@ -184,7 +184,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 +206,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) \