summaryrefslogtreecommitdiff
path: root/src/modules.cpp
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-08-25 20:35:51 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-08-25 20:35:51 +0000
commit8de87c2a9b5f5e68caac1ca06b1021ed69cb3d6a (patch)
tree976f90c27673acbfead92363c964ae69d7a2cb67 /src/modules.cpp
parent31b232eec07d0b85ce2cc7c4ebc5d5387f781dcb (diff)
Change module versions to use a string instead of fixed digits, and use propset ID to auto-set versions, so we don't have (essentially unused) module versions.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10291 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules.cpp')
-rw-r--r--src/modules.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules.cpp b/src/modules.cpp
index c3c07216e..b44b2504d 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -26,8 +26,8 @@
#endif
// version is a simple class for holding a modules version number
-Version::Version(int major, int minor, int revision, int build, int flags, int api_ver)
-: Major(major), Minor(minor), Revision(revision), Build(build), Flags(flags), API(api_ver)
+Version::Version(const std::string &sversion, int flags, int api_ver)
+: version(sversion), Flags(flags), API(api_ver)
{
}
@@ -117,7 +117,7 @@ void Module::OnRehash(User*, const std::string&) { }
void Module::OnServerRaw(std::string&, bool, User*) { }
int Module::OnUserPreJoin(User*, Channel*, const char*, std::string&, const std::string&) { return 0; }
void Module::OnMode(User*, void*, int, const std::string&) { }
-Version Module::GetVersion() { return Version(1,0,0,0,VF_VENDOR,-1); }
+Version Module::GetVersion() { return Version("Misconfigured", VF_VENDOR, -1); }
void Module::OnOper(User*, const std::string&) { }
void Module::OnPostOper(User*, const std::string&, const std::string &) { }
void Module::OnInfo(User*) { }
@@ -441,7 +441,7 @@ bool ModuleManager::Load(const char* filename)
}
else
{
- Instance->Logs->Log("MODULE", DEFAULT,"New module introduced: %s (API version %d, Module version %d.%d.%d.%d)%s", filename, v.API, v.Major, v.Minor, v.Revision, v.Build, (!(v.Flags & VF_VENDOR) ? " [3rd Party]" : " [Vendor]"));
+ Instance->Logs->Log("MODULE", DEFAULT,"New module introduced: %s (API version %d, Module version %s)%s", filename, v.API, v.version.c_str(), (!(v.Flags & VF_VENDOR) ? " [3rd Party]" : " [Vendor]"));
}
Modules[filename_str] = std::make_pair(newhandle, newmod);