summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-09 16:20:28 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-08-09 16:20:28 +0000
commit8f96d16b4b65074f8b4e2c23f2215a6b711f9794 (patch)
tree5bdfddf45bd5134b30d1359b3867a97ba79e06f3 /src/modules
parent5e98adde5d5da261882dfe76b18cc2af2217a875 (diff)
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
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_invisible.cpp11
1 files changed, 11 insertions, 0 deletions
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++)
{