summaryrefslogtreecommitdiff
path: root/src/modules.c
diff options
context:
space:
mode:
authorgeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-12-30 16:51:04 +0000
committergeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2004-12-30 16:51:04 +0000
commitae23e2f86aca05ab734d731e6c2e456d4d89a8c0 (patch)
tree0eb3dee897c56c688e9b48c84eda7edb5ccb8b29 /src/modules.c
parentae0f3c487d748a59cecde5a1fec8d67d3032a37f (diff)
BUILD : 1.7.6 (514) BUGS : 261 NOTES : Modules can no longer call addCommand directly. The mod_name of the command MUST be set if it is a module.
git-svn-id: svn://svn.anope.org/anope/trunk@514 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@368 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/modules.c')
-rw-r--r--src/modules.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/modules.c b/src/modules.c
index 83913870f..64304e4af 100644
--- a/src/modules.c
+++ b/src/modules.c
@@ -890,6 +890,9 @@ int addCommand(CommandHash * cmdTable[], Command * c, int pos)
if (!cmdTable || !c || (pos < 0 || pos > 2)) {
return MOD_ERR_PARAMS;
}
+
+ if (mod_current_module_name && !c->mod_name)
+ return MOD_ERR_NO_MOD_NAME;
index = CMD_HASH(c->name);