1
0
mirror of https://github.com/anope/anope.git synced 2026-07-06 18:23:12 +02:00

This compiles. I have absolutely no idea if it works.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1579 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
Robin Burchell w00t@inspircd.org
2008-11-08 00:21:29 +00:00
parent e459e5833e
commit b8c04482bb
4 changed files with 18 additions and 23 deletions
+13 -13
View File
@@ -17,8 +17,8 @@
int do_modinfo(User * u);
void myOperServHelp(User * u);
int showModuleMsgLoaded(MessageHash * msgList, char *mod_name, User * u);
int showModuleCmdLoaded(CommandHash * cmdList, char *mod_name, User * u);
int showModuleMsgLoaded(MessageHash * msgList, const char *mod_name, User * u);
int showModuleCmdLoaded(CommandHash * cmdList, const char *mod_name, User * u);
class OSModInfo : public Module
{
@@ -70,18 +70,18 @@ int do_modinfo(User * u)
tm = *localtime(&m->time);
strftime_lang(timebuf, sizeof(timebuf), u,
STRFTIME_DATE_TIME_FORMAT, &tm);
notice_lang(s_OperServ, u, OPER_MODULE_INFO_LIST, m->name,
notice_lang(s_OperServ, u, OPER_MODULE_INFO_LIST, m->name.c_str(),
m->version ? m->version : "?",
m->author ? m->author : "?", timebuf);
for (idx = 0; idx < MAX_CMD_HASH; idx++) {
showModuleCmdLoaded(HOSTSERV[idx], m->name, u);
showModuleCmdLoaded(OPERSERV[idx], m->name, u);
showModuleCmdLoaded(NICKSERV[idx], m->name, u);
showModuleCmdLoaded(CHANSERV[idx], m->name, u);
showModuleCmdLoaded(BOTSERV[idx], m->name, u);
showModuleCmdLoaded(MEMOSERV[idx], m->name, u);
showModuleCmdLoaded(HELPSERV[idx], m->name, u);
showModuleMsgLoaded(IRCD[idx], m->name, u);
showModuleCmdLoaded(HOSTSERV[idx], m->name.c_str(), u);
showModuleCmdLoaded(OPERSERV[idx], m->name.c_str(), u);
showModuleCmdLoaded(NICKSERV[idx], m->name.c_str(), u);
showModuleCmdLoaded(CHANSERV[idx], m->name.c_str(), u);
showModuleCmdLoaded(BOTSERV[idx], m->name.c_str(), u);
showModuleCmdLoaded(MEMOSERV[idx], m->name.c_str(), u);
showModuleCmdLoaded(HELPSERV[idx], m->name.c_str(), u);
showModuleMsgLoaded(IRCD[idx], m->name.c_str(), u);
}
} else {
@@ -90,7 +90,7 @@ int do_modinfo(User * u)
return MOD_CONT;
}
int showModuleCmdLoaded(CommandHash * cmdList, char *mod_name, User * u)
int showModuleCmdLoaded(CommandHash * cmdList, const char *mod_name, User * u)
{
Command *c;
CommandHash *current;
@@ -108,7 +108,7 @@ int showModuleCmdLoaded(CommandHash * cmdList, char *mod_name, User * u)
return display;
}
int showModuleMsgLoaded(MessageHash * msgList, char *mod_name, User * u)
int showModuleMsgLoaded(MessageHash * msgList, const char *mod_name, User * u)
{
Message *msg;
MessageHash *mcurrent;
+2 -6
View File
@@ -71,14 +71,10 @@ int do_modload(User * u)
return MOD_CONT;
}
m = createModule(name);
alog("Trying to load module [%s]", mod_operation_queue->m->name);
status = loadModule(mod_operation_queue->m, mod_operation_queue->u);
alog("Module loading status: %d (%s)", status, ModuleGetErrStr(status));
int status = loadModule(name, u);
if (status != MOD_ERR_OK)
{
notice_lang(s_OperServ, user, OPER_MODULE_LOAD_FAIL, m->name);
destroyModule(m);
notice_lang(s_OperServ, u, OPER_MODULE_LOAD_FAIL, m->name.c_str());
}
return MOD_CONT;
+1 -2
View File
@@ -73,13 +73,12 @@ int do_modunload(User *u)
return MOD_CONT;
}
alog("Trying to unload module [%s]", m->name);
alog("Trying to unload module [%s]", name);
status = unloadModule(m, u);
if (!status)
{
alog("Module unloading status: %d (%s)", status, ModuleGetErrStr(status));
notice_lang(s_OperServ, u, OPER_MODULE_REMOVE_FAIL, name);
}
+2 -2
View File
@@ -256,7 +256,7 @@ void my_memo_lang(User * u, char *name, int z, int number, ...)
if ((mod_current_module_name)
&& (!mod_current_module
|| strcmp(mod_current_module_name, mod_current_module->name)))
|| mod_current_module_name != mod_current_module->name))
mod_current_module = findModule(mod_current_module_name);
u2 = finduser(name);
@@ -288,7 +288,7 @@ void my_memo_lang(User * u, char *name, int z, int number, ...)
}
free(buf);
} else {
alog("%s: INVALID language string call, language: [%d], String [%d]", mod_current_module->name, lang, number);
alog("%s: INVALID language string call, language: [%d], String [%d]", mod_current_module->name.c_str(), lang, number);
}
}