diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-09-02 16:02:35 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-09-02 16:02:35 +0000 |
commit | 40e990ed06126c1ba6164738527127d1f58fc032 (patch) | |
tree | 0c1c0c2893064ffa2163421d5891b91f7002fbe1 /src | |
parent | 5c3df6d82dd8f9a545c389518bdfe4fab0e0c7df (diff) |
All modules which implement simplemodes (no parameters, not a list mode) can now be UNLOADED O_o
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5102 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_blockcaps.cpp | 9 | ||||
-rw-r--r-- | src/modules/m_blockcolor.cpp | 3 | ||||
-rw-r--r-- | src/modules/m_botmode.cpp | 3 | ||||
-rw-r--r-- | src/modules/m_censor.cpp | 9 | ||||
-rw-r--r-- | src/modules/m_cloaking.cpp | 3 | ||||
-rw-r--r-- | src/modules/m_helpop.cpp | 3 | ||||
-rw-r--r-- | src/modules/m_knock.cpp | 3 | ||||
-rw-r--r-- | src/modules/m_noctcp.cpp | 3 | ||||
-rw-r--r-- | src/modules/m_noinvite.cpp | 3 | ||||
-rw-r--r-- | src/modules/m_nokicks.cpp | 3 | ||||
-rw-r--r-- | src/modules/m_nonicks.cpp | 3 | ||||
-rw-r--r-- | src/modules/m_nonotice.cpp | 3 | ||||
-rw-r--r-- | src/modules/m_services.cpp | 8 | ||||
-rw-r--r-- | src/modules/m_services_account.cpp | 5 | ||||
-rw-r--r-- | src/modules/m_showwhois.cpp | 3 | ||||
-rw-r--r-- | src/modules/m_sslmodes.cpp | 3 | ||||
-rw-r--r-- | src/modules/m_stripcolor.cpp | 4 |
17 files changed, 48 insertions, 23 deletions
diff --git a/src/modules/m_blockcaps.cpp b/src/modules/m_blockcaps.cpp index ee57efafe..1d67522b9 100644 --- a/src/modules/m_blockcaps.cpp +++ b/src/modules/m_blockcaps.cpp @@ -94,20 +94,21 @@ public: } return 0; } - + virtual int OnUserPreNotice(userrec* user,void* dest,int target_type, std::string &text, char status) { return OnUserPreMessage(user,dest,target_type,text,status); } - + virtual ~ModuleBlockCAPS() { + ServerInstance->Modes->DelMode(bc); DELETE(bc); } - + virtual Version GetVersion() { - return Version(1,0,0,0,VF_STATIC|VF_VENDOR); + return Version(1,0,0,0,VF_COMMON|VF_VENDOR); } }; diff --git a/src/modules/m_blockcolor.cpp b/src/modules/m_blockcolor.cpp index d424a74ef..9ce42816c 100644 --- a/src/modules/m_blockcolor.cpp +++ b/src/modules/m_blockcolor.cpp @@ -109,12 +109,13 @@ class ModuleBlockColour : public Module virtual ~ModuleBlockColour() { + ServerInstance->Modes->DelMode(bc); DELETE(bc); } virtual Version GetVersion() { - return Version(1,0,0,0,VF_STATIC|VF_VENDOR); + return Version(1,0,0,0,VF_COMMON|VF_VENDOR); } }; diff --git a/src/modules/m_botmode.cpp b/src/modules/m_botmode.cpp index 0cde92bec..2aa5047bf 100644 --- a/src/modules/m_botmode.cpp +++ b/src/modules/m_botmode.cpp @@ -81,12 +81,13 @@ class ModuleBotMode : public Module virtual ~ModuleBotMode() { + ServerInstance->Modes->DelMode(bm); DELETE(bm); } virtual Version GetVersion() { - return Version(1,0,0,0,VF_STATIC|VF_VENDOR); + return Version(1,0,0,0,VF_COMMON|VF_VENDOR); } virtual void OnWhois(userrec* src, userrec* dst) diff --git a/src/modules/m_censor.cpp b/src/modules/m_censor.cpp index acc93fa6c..50315997f 100644 --- a/src/modules/m_censor.cpp +++ b/src/modules/m_censor.cpp @@ -137,10 +137,12 @@ class ModuleCensor : public Module virtual ~ModuleCensor() { + ServerInstance->Modes->DelMode(cu); + ServerInstance->Modes->DelMode(cc); DELETE(cu); DELETE(cc); } - + virtual void ReplaceLine(irc::string &text, irc::string pattern, irc::string replace) { if ((pattern != "") && (text != "")) @@ -153,9 +155,8 @@ class ModuleCensor : public Module } } } - + // format of a config entry is <badword text="shit" replace="poo"> - virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status) { bool active = false; @@ -219,7 +220,7 @@ class ModuleCensor : public Module virtual Version GetVersion() { // This is version 2 because version 1.x is the unreleased unrealircd module - return Version(1,0,0,0,VF_STATIC|VF_VENDOR); + return Version(1,0,0,0,VF_COMMON|VF_VENDOR); } }; diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index ef3a30fb2..f26e16e0e 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -416,6 +416,7 @@ class ModuleCloaking : public Module virtual ~ModuleCloaking() { + ServerInstance->Modes->DelMode(cu); DELETE(cu); } @@ -423,7 +424,7 @@ class ModuleCloaking : public Module { // returns the version number of the module to be // listed in /MODULES - return Version(1,0,0,2,VF_STATIC|VF_VENDOR); + return Version(1,0,0,2,VF_COMMON|VF_VENDOR); } virtual void OnRehash(const std::string ¶meter) diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp index 2bce7097d..89ad243b6 100644 --- a/src/modules/m_helpop.cpp +++ b/src/modules/m_helpop.cpp @@ -254,6 +254,7 @@ class ModuleHelpop : public Module virtual ~ModuleHelpop() { + ServerInstance->Modes->DelMode(ho); DELETE(conf); DELETE(helpop); DELETE(ho); @@ -261,7 +262,7 @@ class ModuleHelpop : public Module virtual Version GetVersion() { - return Version(1,0,0,1,VF_STATIC|VF_VENDOR); + return Version(1,0,0,1,VF_COMMON|VF_VENDOR); } }; diff --git a/src/modules/m_knock.cpp b/src/modules/m_knock.cpp index 035594345..68bcde9a2 100644 --- a/src/modules/m_knock.cpp +++ b/src/modules/m_knock.cpp @@ -123,12 +123,13 @@ class ModuleKnock : public Module virtual ~ModuleKnock() { + ServerInstance->Modes->DelMode(kn); DELETE(kn); } virtual Version GetVersion() { - return Version(1,0,0,1,VF_STATIC|VF_VENDOR); + return Version(1,0,0,1,VF_COMMON|VF_VENDOR); } }; diff --git a/src/modules/m_noctcp.cpp b/src/modules/m_noctcp.cpp index 2891abd5e..651c4acd5 100644 --- a/src/modules/m_noctcp.cpp +++ b/src/modules/m_noctcp.cpp @@ -100,12 +100,13 @@ class ModuleNoCTCP : public Module virtual ~ModuleNoCTCP() { + ServerInstance->Modes->DelMode(nc); DELETE(nc); } virtual Version GetVersion() { - return Version(1,0,0,0,VF_STATIC|VF_VENDOR); + return Version(1,0,0,0,VF_COMMON|VF_VENDOR); } }; diff --git a/src/modules/m_noinvite.cpp b/src/modules/m_noinvite.cpp index 34df272bf..ea76cc023 100644 --- a/src/modules/m_noinvite.cpp +++ b/src/modules/m_noinvite.cpp @@ -79,12 +79,13 @@ class ModuleNoInvite : public Module virtual ~ModuleNoInvite() { + ServerInstance->Modes->DelMode(ni); DELETE(ni); } virtual Version GetVersion() { - return Version(1,0,0,0,VF_STATIC|VF_VENDOR); + return Version(1,0,0,0,VF_COMMON|VF_VENDOR); } }; diff --git a/src/modules/m_nokicks.cpp b/src/modules/m_nokicks.cpp index bc7a61550..f3f5d537a 100644 --- a/src/modules/m_nokicks.cpp +++ b/src/modules/m_nokicks.cpp @@ -98,12 +98,13 @@ class ModuleNoKicks : public Module virtual ~ModuleNoKicks() { + ServerInstance->Modes->DelMode(nk); DELETE(nk); } virtual Version GetVersion() { - return Version(1,0,0,0,VF_STATIC|VF_VENDOR); + return Version(1,0,0,0,VF_COMMON|VF_VENDOR); } }; diff --git a/src/modules/m_nonicks.cpp b/src/modules/m_nonicks.cpp index b77e0ff09..338c472f5 100644 --- a/src/modules/m_nonicks.cpp +++ b/src/modules/m_nonicks.cpp @@ -67,12 +67,13 @@ class ModuleNoNickChange : public Module virtual ~ModuleNoNickChange() { + ServerInstance->Modes->DelMode(nn); DELETE(nn); } virtual Version GetVersion() { - return Version(1,0,0,1,VF_STATIC|VF_VENDOR); + return Version(1,0,0,1,VF_COMMON|VF_VENDOR); } void Implements(char* List) diff --git a/src/modules/m_nonotice.cpp b/src/modules/m_nonotice.cpp index 792c0a094..8e03f2bca 100644 --- a/src/modules/m_nonotice.cpp +++ b/src/modules/m_nonotice.cpp @@ -94,12 +94,13 @@ class ModuleNoNotice : public Module virtual ~ModuleNoNotice() { + ServerInstance->Modes->DelMode(nt); DELETE(nt); } virtual Version GetVersion() { - return Version(1,0,0,0,VF_STATIC|VF_VENDOR); + return Version(1,0,0,0,VF_COMMON|VF_VENDOR); } }; diff --git a/src/modules/m_services.cpp b/src/modules/m_services.cpp index f32964a44..f652c0fc2 100644 --- a/src/modules/m_services.cpp +++ b/src/modules/m_services.cpp @@ -275,6 +275,12 @@ class ModuleServices : public Module virtual ~ModuleServices() { + kludgeme = true; + ServerInstance->Modes->DelMode(m1); + ServerInstance->Modes->DelMode(m2); + ServerInstance->Modes->DelMode(m3); + ServerInstance->Modes->DelMode(m4); + ServerInstance->Modes->DelMode(m5); DELETE(m1); DELETE(m2); DELETE(m3); @@ -284,7 +290,7 @@ class ModuleServices : public Module virtual Version GetVersion() { - return Version(1,0,0,0,VF_STATIC|VF_VENDOR); + return Version(1,0,0,0,VF_COMMON|VF_VENDOR); } }; diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp index 97233a7d3..fe87a2a6a 100644 --- a/src/modules/m_services_account.cpp +++ b/src/modules/m_services_account.cpp @@ -305,6 +305,9 @@ class ModuleServicesAccount : public Module virtual ~ModuleServicesAccount() { + ServerInstance->Modes->DelMode(m1); + ServerInstance->Modes->DelMode(m2); + ServerInstance->Modes->DelMode(m3); DELETE(m1); DELETE(m2); DELETE(m3); @@ -312,7 +315,7 @@ class ModuleServicesAccount : public Module virtual Version GetVersion() { - return Version(1,0,0,0,VF_STATIC|VF_VENDOR); + return Version(1,0,0,0,VF_COMMON|VF_VENDOR); } }; diff --git a/src/modules/m_showwhois.cpp b/src/modules/m_showwhois.cpp index 0719a93f8..bdf3a9ba8 100644 --- a/src/modules/m_showwhois.cpp +++ b/src/modules/m_showwhois.cpp @@ -61,6 +61,7 @@ class ModuleShowwhois : public Module ~ModuleShowwhois() { + ServerInstance->Modes->DelMode(sw); DELETE(sw); } @@ -71,7 +72,7 @@ class ModuleShowwhois : public Module virtual Version GetVersion() { - return Version(1,0,0,3,VF_STATIC); + return Version(1,0,0,3,VF_COMMON|VF_VENDOR); } virtual void OnWhois(userrec* source, userrec* dest) diff --git a/src/modules/m_sslmodes.cpp b/src/modules/m_sslmodes.cpp index bf132b0f4..1304abe01 100644 --- a/src/modules/m_sslmodes.cpp +++ b/src/modules/m_sslmodes.cpp @@ -109,12 +109,13 @@ class ModuleSSLModes : public Module virtual ~ModuleSSLModes() { + ServerInstance->Modes->DelMode(sslm); DELETE(sslm); } virtual Version GetVersion() { - return Version(1, 0, 0, 0, VF_STATIC | VF_VENDOR); + return Version(1, 0, 0, 0, VF_COMMON | VF_VENDOR); } }; diff --git a/src/modules/m_stripcolor.cpp b/src/modules/m_stripcolor.cpp index dd5e3caf0..73abba72c 100644 --- a/src/modules/m_stripcolor.cpp +++ b/src/modules/m_stripcolor.cpp @@ -115,6 +115,8 @@ class ModuleStripColor : public Module virtual ~ModuleStripColor() { + ServerInstance->Modes->DelMode(usc); + ServerInstance->Modes->DelMode(csc); DELETE(usc); DELETE(csc); } @@ -202,7 +204,7 @@ class ModuleStripColor : public Module virtual Version GetVersion() { // This is version 2 because version 1.x is the unreleased unrealircd module - return Version(1,0,0,0,VF_STATIC|VF_VENDOR); + return Version(1, 0, 0, 0, VF_COMMON | VF_VENDOR); } }; |