summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-07 17:59:33 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-07 17:59:33 +0000
commitec7fc489a14af54738da17a94b162a9606df4756 (patch)
tree6ea2da2cacdf919581ad20ca4ce40e94cc02235b /src
parent9fc9227cf51585dd2e44c2fcd0014c8da8f8739f (diff)
Tons of module versionflags stuff, and checks for it in /UNLOADMODULE
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1001 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/inspircd.cpp6
-rw-r--r--src/modules/m_alias.cpp2
-rw-r--r--src/modules/m_antibottler.cpp2
-rw-r--r--src/modules/m_blockcolor.cpp2
-rw-r--r--src/modules/m_botmode.cpp2
-rw-r--r--src/modules/m_censor.cpp2
-rw-r--r--src/modules/m_chanprotect.cpp2
-rw-r--r--src/modules/m_chghost.cpp2
-rw-r--r--src/modules/m_cloaking.cpp2
-rw-r--r--src/modules/m_filter.cpp2
-rw-r--r--src/modules/m_foobar.cpp2
-rw-r--r--src/modules/m_globops.cpp2
-rw-r--r--src/modules/m_helpop.cpp2
-rw-r--r--src/modules/m_hostchange.cpp2
-rw-r--r--src/modules/m_knock.cpp2
-rw-r--r--src/modules/m_noctcp.cpp2
-rw-r--r--src/modules/m_noinvite.cpp2
-rw-r--r--src/modules/m_nokicks.cpp2
-rw-r--r--src/modules/m_nonicks.cpp2
-rw-r--r--src/modules/m_nonotice.cpp2
-rw-r--r--src/modules/m_operchans.cpp2
-rw-r--r--src/modules/m_operjoin.cpp2
-rw-r--r--src/modules/m_operlevels.cpp2
-rw-r--r--src/modules/m_opermotd.cpp2
-rw-r--r--src/modules/m_override.cpp2
-rw-r--r--src/modules/m_randquote.cpp2
-rw-r--r--src/modules/m_redirect.cpp2
-rw-r--r--src/modules/m_remove.cpp2
-rw-r--r--src/modules/m_restrictchans.cpp2
-rw-r--r--src/modules/m_restrictmsg.cpp2
-rw-r--r--src/modules/m_sajoin.cpp2
-rw-r--r--src/modules/m_samode.cpp2
-rw-r--r--src/modules/m_sanick.cpp2
-rw-r--r--src/modules/m_sapart.cpp2
-rw-r--r--src/modules/m_saquit.cpp2
-rw-r--r--src/modules/m_services.cpp2
-rw-r--r--src/modules/m_sethost.cpp2
-rw-r--r--src/modules/m_setname.cpp2
-rw-r--r--src/modules/m_silence.cpp2
-rw-r--r--src/modules/m_stripcolor.cpp2
-rw-r--r--src/modules/m_testcommand.cpp2
41 files changed, 46 insertions, 40 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index f0d007cb9..dd1be77d9 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -3269,6 +3269,12 @@ bool UnloadModule(const char* filename)
{
if (module_names[j] == std::string(filename))
{
+ if (factory[j]->factory->GetVersion().Flags & VF_STATIC)
+ {
+ log(DEFAULT,"Failed to unload STATIC module %s",filename);
+ snprintf(MODERR,MAXBUF,"Module not unloadable (marked static)");
+ return false;
+ }
// found the module
log(DEBUG,"Deleting module...");
delete factory[j]->factory;
diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp
index 28da9baad..c12e367fd 100644
--- a/src/modules/m_alias.cpp
+++ b/src/modules/m_alias.cpp
@@ -75,7 +75,7 @@ class ModuleAlias : public Module
virtual Version GetVersion()
{
- return Version(1,0,0,0,0);
+ return Version(1,0,0,1,VF_VENDOR);
}
diff --git a/src/modules/m_antibottler.cpp b/src/modules/m_antibottler.cpp
index 0a611ff9b..78db8f67c 100644
--- a/src/modules/m_antibottler.cpp
+++ b/src/modules/m_antibottler.cpp
@@ -38,7 +38,7 @@ class ModuleAntiBottler : public Module
virtual Version GetVersion()
{
- return Version(1,0,0,0,0);
+ return Version(1,0,0,1,VF_VENDOR);
}
diff --git a/src/modules/m_blockcolor.cpp b/src/modules/m_blockcolor.cpp
index 9a6da0fae..5f30b18b5 100644
--- a/src/modules/m_blockcolor.cpp
+++ b/src/modules/m_blockcolor.cpp
@@ -112,7 +112,7 @@ class ModuleBlockColor : public Module
virtual Version GetVersion()
{
- return Version(1,0,0,0,VF_STATIC);
+ return Version(1,0,0,0,VF_STATIC|VF_VENDOR);
}
};
diff --git a/src/modules/m_botmode.cpp b/src/modules/m_botmode.cpp
index b88c7307e..f53f8beda 100644
--- a/src/modules/m_botmode.cpp
+++ b/src/modules/m_botmode.cpp
@@ -45,7 +45,7 @@ class ModuleBotMode : public Module
virtual Version GetVersion()
{
- return Version(1,0,0,0,VF_STATIC);
+ return Version(1,0,0,0,VF_STATIC|VF_VENDOR);
}
virtual int OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list &params)
diff --git a/src/modules/m_censor.cpp b/src/modules/m_censor.cpp
index d3d2d705c..47eea3460 100644
--- a/src/modules/m_censor.cpp
+++ b/src/modules/m_censor.cpp
@@ -190,7 +190,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);
+ return Version(1,0,0,0,VF_STATIC|VF_VENDOR);
}
};
diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp
index dd39a603b..65a7b0e84 100644
--- a/src/modules/m_chanprotect.cpp
+++ b/src/modules/m_chanprotect.cpp
@@ -288,7 +288,7 @@ class ModuleChanProtect : public Module
virtual Version GetVersion()
{
- return Version(1,0,0,0,VF_STATIC);
+ return Version(1,0,0,0,VF_STATIC|VF_VENDOR);
}
virtual string_list OnChannelSync(chanrec* chan)
diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp
index 474f1a093..32d37f2a0 100644
--- a/src/modules/m_chghost.cpp
+++ b/src/modules/m_chghost.cpp
@@ -61,7 +61,7 @@ class ModuleChgHost : public Module
virtual Version GetVersion()
{
- return Version(1,0,0,0,0);
+ return Version(1,0,0,1,VF_VENDOR);
}
};
diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp
index 19ec11a92..5fa77067b 100644
--- a/src/modules/m_cloaking.cpp
+++ b/src/modules/m_cloaking.cpp
@@ -72,7 +72,7 @@ class ModuleCloaking : public Module
{
// returns the version number of the module to be
// listed in /MODULES
- return Version(1,0,0,1,VF_STATIC);
+ return Version(1,0,0,1,VF_STATIC|VF_VENDOR);
}
virtual int OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list &params)
diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp
index 91efe49c0..271ce9318 100644
--- a/src/modules/m_filter.cpp
+++ b/src/modules/m_filter.cpp
@@ -180,7 +180,7 @@ class ModuleFilter : public Module
virtual Version GetVersion()
{
// This is version 2 because version 1.x is the unreleased unrealircd module
- return Version(2,0,0,0,0);
+ return Version(2,0,0,1,VF_VENDOR);
}
};
diff --git a/src/modules/m_foobar.cpp b/src/modules/m_foobar.cpp
index d622675f2..dd6b73afb 100644
--- a/src/modules/m_foobar.cpp
+++ b/src/modules/m_foobar.cpp
@@ -53,7 +53,7 @@ class ModuleFoobar : public Module
// this method instantiates a class of type Version, and returns
// the modules version information using it.
- return Version(1,0,0,0,0);
+ return Version(1,0,0,1,VF_VENDOR);
}
virtual void OnUserConnect(userrec* user)
diff --git a/src/modules/m_globops.cpp b/src/modules/m_globops.cpp
index f96681962..378f6e5ce 100644
--- a/src/modules/m_globops.cpp
+++ b/src/modules/m_globops.cpp
@@ -60,7 +60,7 @@ class ModuleGlobops : public Module
virtual Version GetVersion()
{
- return Version(1,0,0,1,VF_STATIC);
+ return Version(1,0,0,1,VF_STATIC|VF_VENDOR);
}
virtual int OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list &params)
diff --git a/src/modules/m_helpop.cpp b/src/modules/m_helpop.cpp
index 41111dd36..1798122b2 100644
--- a/src/modules/m_helpop.cpp
+++ b/src/modules/m_helpop.cpp
@@ -201,7 +201,7 @@ class ModuleHelpop : public Module
virtual Version GetVersion()
{
- return Version(0,0,0,1,VF_STATIC);
+ return Version(0,0,0,1,VF_STATIC|VF_VENDOR);
}
};
diff --git a/src/modules/m_hostchange.cpp b/src/modules/m_hostchange.cpp
index 0b420041d..ffc9d3635 100644
--- a/src/modules/m_hostchange.cpp
+++ b/src/modules/m_hostchange.cpp
@@ -56,7 +56,7 @@ class ModuleHostChange : public Module
{
// returns the version number of the module to be
// listed in /MODULES
- return Version(1,0,0,1,0);
+ return Version(1,0,0,1,VF_VENDOR);
}
virtual void OnUserConnect(userrec* user)
diff --git a/src/modules/m_knock.cpp b/src/modules/m_knock.cpp
index 3096423c4..3fce33d46 100644
--- a/src/modules/m_knock.cpp
+++ b/src/modules/m_knock.cpp
@@ -94,7 +94,7 @@ class ModuleKnock : public Module
virtual Version GetVersion()
{
- return Version(1,0,0,1,VF_STATIC);
+ return Version(1,0,0,1,VF_STATIC|VF_VENDOR);
}
virtual int OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list &params)
diff --git a/src/modules/m_noctcp.cpp b/src/modules/m_noctcp.cpp
index 30d837c67..11c4778ab 100644
--- a/src/modules/m_noctcp.cpp
+++ b/src/modules/m_noctcp.cpp
@@ -113,7 +113,7 @@ class ModuleNoCTCP : public Module
virtual Version GetVersion()
{
- return Version(1,0,0,0,VF_STATIC);
+ return Version(1,0,0,0,VF_STATIC|VF_VENDOR);
}
};
diff --git a/src/modules/m_noinvite.cpp b/src/modules/m_noinvite.cpp
index bc43a1899..30f313a92 100644
--- a/src/modules/m_noinvite.cpp
+++ b/src/modules/m_noinvite.cpp
@@ -83,7 +83,7 @@ class ModuleNoInvite : public Module
virtual Version GetVersion()
{
- return Version(1,0,0,0,VF_STATIC);
+ return Version(1,0,0,0,VF_STATIC|VF_VENDOR);
}
};
diff --git a/src/modules/m_nokicks.cpp b/src/modules/m_nokicks.cpp
index 3f7d35c46..121bb63eb 100644
--- a/src/modules/m_nokicks.cpp
+++ b/src/modules/m_nokicks.cpp
@@ -94,7 +94,7 @@ class ModuleNoKicks : public Module
virtual Version GetVersion()
{
- return Version(1,0,0,0,VF_STATIC);
+ return Version(1,0,0,0,VF_STATIC|VF_VENDOR);
}
};
diff --git a/src/modules/m_nonicks.cpp b/src/modules/m_nonicks.cpp
index ef2cfe857..a0a6dabc8 100644
--- a/src/modules/m_nonicks.cpp
+++ b/src/modules/m_nonicks.cpp
@@ -41,7 +41,7 @@ class ModuleNoNickChange : public Module
virtual Version GetVersion()
{
- return Version(1,0,0,1,VF_STATIC);
+ return Version(1,0,0,1,VF_STATIC|VF_VENDOR);
}
virtual void On005Numeric(std::string &output)
diff --git a/src/modules/m_nonotice.cpp b/src/modules/m_nonotice.cpp
index f026c0d38..38b8292ea 100644
--- a/src/modules/m_nonotice.cpp
+++ b/src/modules/m_nonotice.cpp
@@ -93,7 +93,7 @@ class ModuleNoNotice : public Module
virtual Version GetVersion()
{
- return Version(1,0,0,0,VF_STATIC);
+ return Version(1,0,0,0,VF_STATIC|VF_VENDOR);
}
};
diff --git a/src/modules/m_operchans.cpp b/src/modules/m_operchans.cpp
index 9cc8ec460..2c6d9276d 100644
--- a/src/modules/m_operchans.cpp
+++ b/src/modules/m_operchans.cpp
@@ -101,7 +101,7 @@ class ModuleOperChans : public Module
virtual Version GetVersion()
{
- return Version(1,0,0,0,VF_STATIC);
+ return Version(1,0,0,0,VF_STATIC|VF_VENDOR);
}
virtual void OnUserConnect(userrec* user)
diff --git a/src/modules/m_operjoin.cpp b/src/modules/m_operjoin.cpp
index 864325cda..02a42b977 100644
--- a/src/modules/m_operjoin.cpp
+++ b/src/modules/m_operjoin.cpp
@@ -35,7 +35,7 @@ class ModuleOperjoin : public Module {
virtual Version GetVersion() {
- return Version(1,0,0,1,0);
+ return Version(1,0,0,1,VF_VENDOR);
}
diff --git a/src/modules/m_operlevels.cpp b/src/modules/m_operlevels.cpp
index 3a97caa3b..69954b208 100644
--- a/src/modules/m_operlevels.cpp
+++ b/src/modules/m_operlevels.cpp
@@ -37,7 +37,7 @@ class ModuleOperLevels : public Module
virtual Version GetVersion()
{
- return Version(1,0,0,0,0);
+ return Version(1,0,0,1,VF_VENDOR);
}
virtual int OnKill(userrec* source, userrec* dest, std::string reason)
diff --git a/src/modules/m_opermotd.cpp b/src/modules/m_opermotd.cpp
index b37a3b69e..aa8627090 100644
--- a/src/modules/m_opermotd.cpp
+++ b/src/modules/m_opermotd.cpp
@@ -73,7 +73,7 @@ class ModuleOpermotd : public Module {
virtual Version GetVersion() {
- return Version(1,0,0,1,0);
+ return Version(1,0,0,1,VF_VENDOR);
}
diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp
index 0ce4b37bc..847d5668f 100644
--- a/src/modules/m_override.cpp
+++ b/src/modules/m_override.cpp
@@ -131,7 +131,7 @@ class ModuleOverride : public Module
virtual Version GetVersion()
{
- return Version(1,0,0,0,0);
+ return Version(1,0,0,1,VF_VENDOR);
}
};
diff --git a/src/modules/m_randquote.cpp b/src/modules/m_randquote.cpp
index 5a987fe3b..eda4de2bc 100644
--- a/src/modules/m_randquote.cpp
+++ b/src/modules/m_randquote.cpp
@@ -92,7 +92,7 @@ class ModuleRandQuote : public Module
virtual Version GetVersion()
{
- return Version(1,0,0,0,0);
+ return Version(1,0,0,1,VF_VENDOR);
}
virtual void OnUserConnect(userrec* user)
diff --git a/src/modules/m_redirect.cpp b/src/modules/m_redirect.cpp
index a8a764b01..2d471ccab 100644
--- a/src/modules/m_redirect.cpp
+++ b/src/modules/m_redirect.cpp
@@ -101,7 +101,7 @@ class ModuleRedirect : public Module
virtual Version GetVersion()
{
- return Version(1,0,0,0,VF_STATIC);
+ return Version(1,0,0,0,VF_STATIC|VF_VENDOR);
}
virtual void OnUserConnect(userrec* user)
diff --git a/src/modules/m_remove.cpp b/src/modules/m_remove.cpp
index 31949ab24..0c9a29a1d 100644
--- a/src/modules/m_remove.cpp
+++ b/src/modules/m_remove.cpp
@@ -128,7 +128,7 @@ class ModuleRemove : public Module
virtual Version GetVersion()
{
- return Version(1,0,0,0,0);
+ return Version(1,0,0,1,VF_VENDOR);
}
};
diff --git a/src/modules/m_restrictchans.cpp b/src/modules/m_restrictchans.cpp
index 93c16a8bf..704e41851 100644
--- a/src/modules/m_restrictchans.cpp
+++ b/src/modules/m_restrictchans.cpp
@@ -53,7 +53,7 @@ class ModuleRestrictChans : public Module
virtual Version GetVersion()
{
- return Version(1,0,0,0,0);
+ return Version(1,0,0,1,VF_VENDOR);
}
};
diff --git a/src/modules/m_restrictmsg.cpp b/src/modules/m_restrictmsg.cpp
index a419a9423..68c842ae8 100644
--- a/src/modules/m_restrictmsg.cpp
+++ b/src/modules/m_restrictmsg.cpp
@@ -67,7 +67,7 @@ class ModuleRestrictMsg : public Module
virtual Version GetVersion()
{
- return Version(1,0,0,0,0);
+ return Version(1,0,0,1,VF_VENDOR);
}
};
diff --git a/src/modules/m_sajoin.cpp b/src/modules/m_sajoin.cpp
index 4ad3fe7a0..f1da3d1ed 100644
--- a/src/modules/m_sajoin.cpp
+++ b/src/modules/m_sajoin.cpp
@@ -61,7 +61,7 @@ class ModuleSajoin : public Module
virtual Version GetVersion()
{
- return Version(1,0,0,1,0);
+ return Version(1,0,0,1,VF_VENDOR);
}
};
diff --git a/src/modules/m_samode.cpp b/src/modules/m_samode.cpp
index 6eb22a361..9e96b9ed6 100644
--- a/src/modules/m_samode.cpp
+++ b/src/modules/m_samode.cpp
@@ -72,7 +72,7 @@ class ModuleSaMode : public Module
virtual Version GetVersion()
{
- return Version(1,0,2,1,0);
+ return Version(1,0,2,2,VF_VENDOR);
}
virtual void OnUserConnect(userrec* user)
diff --git a/src/modules/m_sanick.cpp b/src/modules/m_sanick.cpp
index e96f72fdf..6b874f272 100644
--- a/src/modules/m_sanick.cpp
+++ b/src/modules/m_sanick.cpp
@@ -56,7 +56,7 @@ class ModuleSanick : public Module
virtual Version GetVersion()
{
- return Version(1,0,0,1,0);
+ return Version(1,0,0,1,VF_VENDOR);
}
};
diff --git a/src/modules/m_sapart.cpp b/src/modules/m_sapart.cpp
index 9132cf0da..1037ecc14 100644
--- a/src/modules/m_sapart.cpp
+++ b/src/modules/m_sapart.cpp
@@ -60,7 +60,7 @@ class ModuleSapart : public Module
virtual Version GetVersion()
{
- return Version(1,0,0,1,0);
+ return Version(1,0,0,1,VF_VENDOR);
}
};
diff --git a/src/modules/m_saquit.cpp b/src/modules/m_saquit.cpp
index 9920982ef..525e5b716 100644
--- a/src/modules/m_saquit.cpp
+++ b/src/modules/m_saquit.cpp
@@ -68,7 +68,7 @@ class ModuleSaquit : public Module
virtual Version GetVersion()
{
- return Version(1,0,0,0,0);
+ return Version(1,0,0,1,VF_VENDOR);
}
};
diff --git a/src/modules/m_services.cpp b/src/modules/m_services.cpp
index 712292001..02ae0383a 100644
--- a/src/modules/m_services.cpp
+++ b/src/modules/m_services.cpp
@@ -203,7 +203,7 @@ class ModuleServices : public Module
virtual Version GetVersion()
{
- return Version(1,0,0,0,VF_STATIC);
+ return Version(1,0,0,0,VF_STATIC|VF_VENDOR);
}
virtual void OnUserConnect(userrec* user)
diff --git a/src/modules/m_sethost.cpp b/src/modules/m_sethost.cpp
index a220f376d..f82cec034 100644
--- a/src/modules/m_sethost.cpp
+++ b/src/modules/m_sethost.cpp
@@ -58,7 +58,7 @@ class ModuleSetHost : public Module
virtual Version GetVersion()
{
- return Version(1,0,0,0,0);
+ return Version(1,0,0,1,VF_VENDOR);
}
};
diff --git a/src/modules/m_setname.cpp b/src/modules/m_setname.cpp
index 4c44fd6b0..80352a629 100644
--- a/src/modules/m_setname.cpp
+++ b/src/modules/m_setname.cpp
@@ -52,7 +52,7 @@ class ModuleSetName : public Module
virtual Version GetVersion()
{
- return Version(1,0,0,0,0);
+ return Version(1,0,0,1,VF_VENDOR);
}
};
diff --git a/src/modules/m_silence.cpp b/src/modules/m_silence.cpp
index cb7ac2993..a67fb41ba 100644
--- a/src/modules/m_silence.cpp
+++ b/src/modules/m_silence.cpp
@@ -192,7 +192,7 @@ class ModuleSilence : public Module
virtual Version GetVersion()
{
- return Version(1,0,0,0,0);
+ return Version(1,0,0,1,VF_VENDOR);
}
};
diff --git a/src/modules/m_stripcolor.cpp b/src/modules/m_stripcolor.cpp
index 2bceea67d..8d8b03cc0 100644
--- a/src/modules/m_stripcolor.cpp
+++ b/src/modules/m_stripcolor.cpp
@@ -170,7 +170,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);
+ return Version(1,0,0,0,VF_STATIC|VF_VENDOR);
}
};
diff --git a/src/modules/m_testcommand.cpp b/src/modules/m_testcommand.cpp
index c056c87fe..f62858504 100644
--- a/src/modules/m_testcommand.cpp
+++ b/src/modules/m_testcommand.cpp
@@ -102,7 +102,7 @@ class ModuleTestCommand : public Module
virtual Version GetVersion()
{
- return Version(1,0,0,0,VF_STATIC);
+ return Version(1,0,0,0,VF_STATIC|VF_VENDOR);
}
virtual void OnUserConnect(userrec* user)