From c9d225a6d28fd9971aa5a3630e11e77b5371d15a Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 31 Mar 2024 22:56:11 +0100 Subject: Fix a crash in the helpmode module. --- src/modules/m_helpmode.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/modules/m_helpmode.cpp') diff --git a/src/modules/m_helpmode.cpp b/src/modules/m_helpmode.cpp index 32a69f59b..5554cba15 100644 --- a/src/modules/m_helpmode.cpp +++ b/src/modules/m_helpmode.cpp @@ -114,6 +114,12 @@ public: return MOD_RES_PASSTHRU; } + void OnUserQuit(User* user, const std::string& message, const std::string& opermessage) override + { + if (user->IsModeSet(helpop)) + stdalgo::erase(helpop.helpers, user); + } + void OnWhois(Whois::Context& whois) override { if (whois.GetTarget()->IsModeSet(helpop)) -- cgit v1.3.1-10-gc9f91