From 8f96d16b4b65074f8b4e2c23f2215a6b711f9794 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 9 Aug 2007 16:20:28 +0000 Subject: Fix for bug #379 reported by stealth. Trigger watch signon/signoff on +Q and -Q git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7689 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_invisible.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src') diff --git a/src/modules/m_invisible.cpp b/src/modules/m_invisible.cpp index e1fb88ca0..f30105ce2 100644 --- a/src/modules/m_invisible.cpp +++ b/src/modules/m_invisible.cpp @@ -83,9 +83,20 @@ class InvisibleMode : public ModeHandler dest->SetMode('Q', adding); + /* Fix for bug #379 reported by stealth. On +/-Q make m_watch think the user has signed on/off */ + Module* m = ServerInstance->FindModule("m_watch.so"); + + /* This must come before setting/unsetting the handler */ + if (m && adding) + m->OnUserQuit(dest, "Connection closed", "Connection closed"); + /* Set visibility handler object */ dest->Visibility = adding ? qo : NULL; + /* This has to come after setting/unsetting the handler */ + if (m && !adding) + m->OnPostConnect(dest); + /* User appears to vanish or appear from nowhere */ for (UCListIter f = dest->chans.begin(); f != dest->chans.end(); f++) { -- cgit v1.2.3