diff options
author | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-08 01:54:17 +0000 |
---|---|---|
committer | Robin Burchell w00t@inspircd.org <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-11-08 01:54:17 +0000 |
commit | 1c3b8e15c2c5ab96146ddc7573cf5d05f28967fe (patch) | |
tree | 4f6a0a688c8a3874c850826c12bd972082d0bfa1 /src/modules.c | |
parent | 7bac547f555a5ec93a89a3433ae74152dbbc3e89 (diff) |
moduleAddVersion -> Module::SetVersion
moduleAddAuthor -> Module::SetAuthor
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1590 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/modules.c')
-rw-r--r-- | src/modules.c | 39 |
1 files changed, 10 insertions, 29 deletions
diff --git a/src/modules.c b/src/modules.c index 0d964b155..891389739 100644 --- a/src/modules.c +++ b/src/modules.c @@ -344,8 +344,6 @@ void modules_unload_all(bool fini, bool unload_proto) Module::Module(const std::string &mname, const std::string &creator) { this->name = mname; /* Our name */ - this->version = NULL; - this->author = NULL; this->nickHelp = NULL; this->chanHelp = NULL; this->memoHelp = NULL; @@ -376,11 +374,6 @@ Module::~Module() free(this->filename); } - if (this->author) - free(this->author); - if (this->version) - free(this->version); - if (this->handle) { if ((ano_modclose(this->handle)) != 0) @@ -398,6 +391,16 @@ void Module::SetType(MODType type) this->type = type; } +void Module::SetVersion(const std::string &version) +{ + this->version = version; +} + +void Module::SetAuthor(const std::string &author) +{ + this->author = author; +} + void Module::InsertLanguage(int langNumber, int ac, const char **av) { int i; @@ -1602,28 +1605,6 @@ int destroyMessage(Message * m) return MOD_ERR_OK; } -/** - * Add the modules version info. - * @param version the version of the current module - **/ -void moduleAddVersion(const char *version) -{ - if (mod_current_module && version) { - mod_current_module->version = sstrdup(version); - } -} - -/** - * Add the modules author info - * @param author the author of the module - **/ -void moduleAddAuthor(const char *author) -{ - if (mod_current_module && author) { - mod_current_module->author = sstrdup(author); - } -} - /******************************************************************************* * Module Callback Functions *******************************************************************************/ |