mirror of
https://github.com/anope/anope.git
synced 2026-07-10 13:43:14 +02:00
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
This commit is contained in:
parent
a249b69fa9
commit
3f7afe4d02
@@ -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]
|
||||
|
||||
+23
-4
@@ -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)
|
||||
|
||||
+5
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user