summaryrefslogtreecommitdiff
path: root/src/modules.c
diff options
context:
space:
mode:
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);