From 40ab329f55fbe9f73b06caff28b8ac41e42626a2 Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 26 Jan 2008 21:38:01 +0000 Subject: 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 --- src/modules/m_watch.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/modules') 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"); } } -- cgit v1.2.3