summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2006-03-01 09:52:37 +0000
committergeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2006-03-01 09:52:37 +0000
commit3f7afe4d02fd1ed1084c740113605064a415a436 (patch)
treec51153644bac2f15fc7d5199126c79c92b6ee99b
parenta249b69fa96755f72599abecb66d48c32fdfeb38 (diff)
BUILD : 1.7.13 (975) BUGS : 435 NOTES : Added messages explaining what module status numbers mean
git-svn-id: svn://svn.anope.org/anope/trunk@975 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@700 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--Changes1
-rw-r--r--src/modules.c27
-rw-r--r--version.log6
3 files changed, 29 insertions, 5 deletions
diff --git a/Changes b/Changes
index a55c01cd6..56ea0f1e8 100644
--- a/Changes
+++ b/Changes
@@ -18,6 +18,7 @@ Provided by illu. <illu@rs2i.net> - 2006
01/25 F Updated the french language file. [ #00]
Provided by Trystan <trystan@nomadirc.net> - 2006
+03/01 A Clarity on module loading status numbers. [#435]
03/01 F Crash when not giving user for moduleGetLangString. [#454]
02/23 F Usermatching possible null arg on sstrdup. [ #00]
02/12 F Double unbanning of in certain conditions. [ #00]
diff --git a/src/modules.c b/src/modules.c
index 4201fb6a4..5eae6c0ff 100644
--- a/src/modules.c
+++ b/src/modules.c
@@ -61,7 +61,26 @@ int displayCommand(Command * c);
int displayCommandFromHash(CommandHash * cmdTable[], char *name);
int displayMessageFromHashl(char *name);
int displayMessage(Message * m);
+char *ModuleGetErrStr(int status);
+char *ModuleGetErrStr(int status)
+{
+ const char *module_err_str[] = {
+ "Module, Okay - No Error",
+ "Module Error, allocating memory",
+ "Module Error, not enough parameters",
+ "Module Error, already loaded",
+ "Module Error, file does not exist",
+ "Module Error, No User",
+ "Module Error, Error during load time or module returned MOD_STOP",
+ "Module Error, Unable to unload"
+ "Module Error, Unknown Error occuried",
+ "Module Error, File I/O Error",
+ "Module Error, No Service found for request",
+ "Module Error, No module name for request",
+ };
+ return (char *) module_err_str[status];
+}
/**
* Automaticaly load modules at startup.
@@ -83,7 +102,7 @@ void modules_init(void)
mod_current_user = NULL;
alog("trying to load [%s]", mod_current_module->name);
ret = loadModule(mod_current_module, NULL);
- alog("status: [%d]", ret);
+ alog("status: [%d][%s]", ret, ModuleGetErrStr(ret));
if (ret != MOD_ERR_OK)
destroyModule(m);
mod_current_module = NULL;
@@ -113,7 +132,7 @@ void modules_core_init(int number, char **list)
if (debug || status) {
alog("debug: trying to load core module [%s]",
mod_current_module->name);
- alog("debug: status: [%d]", status);
+ alog("debug: status: [%d][%s]", status, ModuleGetErrStr(status));
if (status != MOD_ERR_OK)
destroyModule(mod_current_module);
}
@@ -137,7 +156,7 @@ int protocol_module_init(void)
alog("Loading IRCD Protocol Module: [%s]", mod_current_module->name);
ret = loadModule(mod_current_module, NULL);
moduleSetType(PROTOCOL);
- alog("status: [%d]", ret);
+ alog("status: [%d][%s]", ret, ModuleGetErrStr(ret));
mod_current_module = NULL;
if (ret == MOD_ERR_OK) {
@@ -187,7 +206,7 @@ void modules_delayed_init(void)
mod_current_user = NULL;
alog("trying to load [%s]", mod_current_module->name);
ret = loadModule(mod_current_module, NULL);
- alog("status: [%d]", ret);
+ alog("status: [%d][%s]", ret, ModuleGetErrStr(ret));
mod_current_module = NULL;
mod_current_user = NULL;
if (ret != MOD_ERR_OK)
diff --git a/version.log b/version.log
index f4091b2da..02c62a75c 100644
--- a/version.log
+++ b/version.log
@@ -9,10 +9,14 @@ VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="13"
VERSION_EXTRA="-svn"
-VERSION_BUILD="974"
+VERSION_BUILD="975"
# $Log$
#
+# BUILD : 1.7.13 (975)
+# BUGS : 435
+# NOTES : Added messages explaining what module status numbers mean
+#
# BUILD : 1.7.13 (974)
# BUGS : 454
# NOTES : Fixed a crash when passing a NULL-user to moduleGetLangString