mirror of
https://github.com/anope/anope.git
synced 2026-06-25 20:16:36 +02:00
Move some of the modules in extras/ that arent really extra out of extras. Mark our modules as VENDOR and allow modules to have multple types.
This commit is contained in:
+10
-1
@@ -23,10 +23,19 @@ Module::Module(const Anope::string &modname, const Anope::string &, ModType modt
|
||||
this->created = Anope::CurTime;
|
||||
this->SetVersion(Anope::Version());
|
||||
|
||||
if (type & VENDOR)
|
||||
this->SetAuthor("Anope");
|
||||
else
|
||||
{
|
||||
/* Not vendor implies third */
|
||||
type |= THIRD;
|
||||
this->SetAuthor("Unknown");
|
||||
}
|
||||
|
||||
if (ModuleManager::FindModule(this->name))
|
||||
throw CoreException("Module already exists!");
|
||||
|
||||
if (Anope::NoThird && modtype == THIRD)
|
||||
if (Anope::NoThird && type & THIRD)
|
||||
throw ModuleException("Third party modules may not be loaded");
|
||||
|
||||
ModuleManager::Modules.push_back(this);
|
||||
|
||||
Reference in New Issue
Block a user