From bed4708bf73b179f07b543e16f3bf7e86904f746 Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 13 Apr 2005 01:43:42 +0000 Subject: Track user quits in the park list git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1065 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_park.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/modules/m_park.cpp b/src/modules/m_park.cpp index f7d54e730..8e7a40bdb 100644 --- a/src/modules/m_park.cpp +++ b/src/modules/m_park.cpp @@ -206,6 +206,22 @@ class ModulePark : public Module output = output + std::string(" PARK"); } + virtual void OnUserQuit(userrec* user) + { + std::string nick = user->nick; + // track quits in our parked user list + for (parkinfo::iterator j = pinfo.begin(); j != pinfo.end(); j++) + { + if (j->nick == nick) + { + pinfo.erase(j); + break; + } + } + return 0; + } + + virtual void OnPrePrivmsg(userrec* user, userrec* dest, std::string text) { awaylog* awy = (awaylog*)dest->GetExt("park_awaylog"); -- cgit v1.2.3