diff --git a/include/modules.h b/include/modules.h index 5e14f41f0..3b84d2d65 100644 --- a/include/modules.h +++ b/include/modules.h @@ -1271,7 +1271,7 @@ public: * @param minor The minor version * @param patch The patch version */ - static void RequireVersion(int major, int minor, int patch); + static void RequireVersion(unsigned major, unsigned minor, unsigned patch); /** Change the priority of one event in a module. * Each module event has a list of modules which are attached to that event type. If you wish to be called before or after other specific modules, you may use this diff --git a/src/modulemanager.cpp b/src/modulemanager.cpp index 3ed0b20ea..927b36701 100644 --- a/src/modulemanager.cpp +++ b/src/modulemanager.cpp @@ -283,21 +283,17 @@ Module *ModuleManager::FindFirstOf(ModType type, bool ignoredeprecated) return NULL; } -void ModuleManager::RequireVersion(int major, int minor, int patch) +void ModuleManager::RequireVersion(unsigned major, unsigned minor, unsigned patch) { if (Anope::VersionMajor() > major) return; else if (Anope::VersionMajor() == major) { - if (minor == -1) - return; - else if (Anope::VersionMinor() > minor) + if (Anope::VersionMinor() > minor) return; else if (Anope::VersionMinor() == minor) { - if (patch == -1) - return; - else if (Anope::VersionPatch() > patch) + if (Anope::VersionPatch() > patch) return; else if (Anope::VersionPatch() == patch) return;