From 18f04c60d59085ad768f149c8e9e4b650b8dc717 Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 7 Dec 2005 20:48:13 +0000 Subject: Added OnUserQuit stuffs git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2257 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_swhois.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/modules/m_swhois.cpp') diff --git a/src/modules/m_swhois.cpp b/src/modules/m_swhois.cpp index 3b150cd7d..01aaa3915 100644 --- a/src/modules/m_swhois.cpp +++ b/src/modules/m_swhois.cpp @@ -94,6 +94,18 @@ class ModuleSWhois : public Module } } + // when a user quits, tidy up their metadata + virtual void OnUserQuit(userrec* user, std::string message) + { + char* field = user->GetExt("swhois"); + if (field) + { + std::string* swhois = (std::string*)field; + user->Shrink("swhois"); + delete swhois; + } + } + // Whenever the linking module receives metadata from another server and doesnt know what // to do with it (of course, hence the 'meta') it calls this method, and it is up to each // module in turn to figure out if this metadata key belongs to them, and what they want -- cgit v1.2.3