ngircd-tor/contrib/Anope/0010-ngircd-Add-ProtongIRCd...

58 lines
1.6 KiB
Diff

From d2c45d7c578ec684d3b471020f631847316de196 Mon Sep 17 00:00:00 2001
From: Alexander Barton <alex@barton.de>
Date: Fri, 25 Nov 2011 19:17:19 +0100
Subject: [PATCH 10/16] ngircd: Add ~ProtongIRCd()
---
modules/protocol/ngircd.cpp | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/modules/protocol/ngircd.cpp b/modules/protocol/ngircd.cpp
index 55cb8d7..5fd62db 100644
--- a/modules/protocol/ngircd.cpp
+++ b/modules/protocol/ngircd.cpp
@@ -302,8 +302,7 @@ class ngIRCdIRCdMessage : public IRCdMessage
}
};
-/** This is here because:
- *
+/*
* If we had three servers, A, B & C linked like so: A<->B<->C
* If Anope is linked to A and B splits from A and then reconnects
* B introduces itself, introduces C, sends EOS for C, introduces Bs clients
@@ -319,8 +318,6 @@ bool event_pong(const Anope::string &source, const std::vector<Anope::string> &p
return true;
}
-
-
/*
* CHANINFO <chan> +<modes>
* CHANINFO <chan> +<modes> :<topic>
@@ -480,7 +477,6 @@ bool event_376(const Anope::string &source, const std::vector<Anope::string> &pa
return true;
}
-
class ProtongIRCd : public Module
{
Message message_kick, message_pass, message_njoin, message_chaninfo, message_005,
@@ -542,6 +538,13 @@ class ProtongIRCd : public Module
ModuleManager::Attach(I_OnUserNickChange, this);
}
+ ~ProtongIRCd()
+ {
+ pmodule_ircd_var(NULL);
+ pmodule_ircd_proto(NULL);
+ pmodule_ircd_message(NULL);
+ }
+
void OnUserNickChange(User *u, const Anope::string &)
{
u->RemoveModeInternal(ModeManager::FindUserModeByName(UMODE_REGISTERED));
--
1.7.8.3