about summary refs log tree commit diff
path: root/contrib/Anope/0010-ngircd-Add-ProtongIRCd.patch
blob: 42cd4a515047ce6d391db95b2ddbc09e6288fbdd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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