summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-01-26 21:38:01 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-01-26 21:38:01 +0000
commit40ab329f55fbe9f73b06caff28b8ac41e42626a2 (patch)
treef710eb7012ea63aff3c40b6b518c1bf85b71f72d /src
parentc9d549de544db6f856f1d9dfe0d1d07ab4a60298 (diff)
Fix for bug found by eLement, when an oper is on a notify list and the oper sets +Q, then the watch list for that user goes into an undefined state due to the
metadata not being correctly cleared from the user in m_watch OnUserQuit. Thanks :) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8752 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_watch.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp
index 74d0c1f7d..ab00c38dc 100644
--- a/src/modules/m_watch.cpp
+++ b/src/modules/m_watch.cpp
@@ -94,6 +94,10 @@ class CommandWatch : public Command
{
/* Yup, is on my list */
watchlist::iterator n = wl->find(nick);
+
+ if (!wl)
+ return CMD_FAILURE;
+
if (n != wl->end())
{
if (!n->second.empty())
@@ -365,6 +369,7 @@ class Modulewatch : public Module
/* User's quitting, we're done with this. */
delete wl;
+ user->Shrink("watchlist");
}
}