diff options
author | Sadie Powell <sadie@witchery.services> | 2020-12-18 00:55:22 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2020-12-18 01:10:13 +0000 |
commit | b618b194f3166a55ca7e7889c7346b65c174d397 (patch) | |
tree | b563f6adb012081e216e0e8043bc074597895114 /src/modules/m_spanningtree/misccommands.cpp | |
parent | ba4a23e248d7d4d54d204bc4b5e20580bfbf7616 (diff) |
Don't call events provided by dying or dead modules.
Diffstat (limited to 'src/modules/m_spanningtree/misccommands.cpp')
-rw-r--r-- | src/modules/m_spanningtree/misccommands.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree/misccommands.cpp b/src/modules/m_spanningtree/misccommands.cpp index c9f86d696..bba05b1fc 100644 --- a/src/modules/m_spanningtree/misccommands.cpp +++ b/src/modules/m_spanningtree/misccommands.cpp @@ -26,12 +26,18 @@ void CmdBuilder::FireEvent(Server* target, const char* cmd, ClientProtocol::TagMap& taglist) { + if (!Utils->Creator || Utils->Creator->dying) + return; + FOREACH_MOD_CUSTOM(Utils->Creator->GetMessageEventProvider(), ServerProtocol::MessageEventListener, OnBuildMessage, (target, cmd, taglist)); UpdateTags(); } void CmdBuilder::FireEvent(User* target, const char* cmd, ClientProtocol::TagMap& taglist) { + if (!Utils->Creator || Utils->Creator->dying) + return; + FOREACH_MOD_CUSTOM(Utils->Creator->GetMessageEventProvider(), ServerProtocol::MessageEventListener, OnBuildMessage, (target, cmd, taglist)); UpdateTags(); } |