summaryrefslogtreecommitdiff
path: root/src/modules/m_banredirect.cpp
diff options
context:
space:
mode:
authordz <dz@e03df62e-2008-0410-955e-edbf42e46eb7>2009-11-21 21:47:04 +0000
committerdz <dz@e03df62e-2008-0410-955e-edbf42e46eb7>2009-11-21 21:47:04 +0000
commita42a8ea3416114d7a3a33a75aa1707f326506cc8 (patch)
tree5f6de2752bc43e35d9266280bcd07713e6fb0ecb /src/modules/m_banredirect.cpp
parentded1f34b9828508762b05c80687ababb10a75dd8 (diff)
Delete modewatchers when unloading modules that use them to keep the server from crashing when the mode is used again
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12168 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_banredirect.cpp')
-rw-r--r--src/modules/m_banredirect.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/modules/m_banredirect.cpp b/src/modules/m_banredirect.cpp
index ae81c1733..2894891ef 100644
--- a/src/modules/m_banredirect.cpp
+++ b/src/modules/m_banredirect.cpp
@@ -332,6 +332,9 @@ class ModuleBanRedirect : public Module
virtual ~ModuleBanRedirect()
{
+ /* XXX is this the best place to do this? */
+ if (!ServerInstance->Modes->DelModeWatcher(&re))
+ ServerInstance->Logs->Log("m_banredirect.so", DEBUG, "Failed to delete modewatcher!");
}
virtual Version GetVersion()