X-Git-Url: http://git.pk910.de/?p=NeonServV5.git;a=blobdiff_plain;f=src%2Fmodules%2FNeonHelp.mod%2Fbot_NeonHelp.c;h=ee02574fe2a1ee5838de4fabba162957bbf5f312;hp=8b00188b8cb7282fdb527891a2192fd4b73b0f31;hb=902ebfe5551be2daa3edf8141bcee91f62c0a5e0;hpb=8a990d2c87f8f8a6ca26dd2c6afef161dab2eb9e diff --git a/src/modules/NeonHelp.mod/bot_NeonHelp.c b/src/modules/NeonHelp.mod/bot_NeonHelp.c index 8b00188..ee02574 100644 --- a/src/modules/NeonHelp.mod/bot_NeonHelp.c +++ b/src/modules/NeonHelp.mod/bot_NeonHelp.c @@ -18,7 +18,7 @@ #include "bot_NeonHelp.h" #include "../../modcmd.h" -#include "../../cmd_neonhelp.h" +#include "cmd_neonhelp.h" #include "../../lang.h" #include "../../mysqlConn.h" #include "../../ClientSocket.h" @@ -175,7 +175,7 @@ static void neonhelp_event_privmsg(struct UserNode *user, struct UserNode *targe cache->user = user; cache->target = target; cache->message = strdup(message); - get_userauth(user, neonhelp_event_privmsg_nick_lookup, cache); + get_userauth(user, module_id, neonhelp_event_privmsg_nick_lookup, cache); } } @@ -266,7 +266,7 @@ static void neonhelp_event_privmsg_async(struct ClientSocket *client, struct Use if(!timeq_name_exists(nameBuf)) { int *cidptr = malloc(sizeof(int)); *cidptr = client->clientid; - timeq_add_name(nameBuf, 300, neonhelp_remind_open_requests, cidptr); + timeq_add_name(nameBuf, 300, module_id, neonhelp_remind_open_requests, cidptr); } } printf_mysql_query("INSERT INTO `helpserv_requests` (`botid`, `host`, `hand`, `nick`, `status`, `supporter`, `time`, `text`) VALUES ('%d', '%s@%s', '%s', '%s', '0', '-1', UNIX_TIMESTAMP(), '%s')", client->clientid, escape_string(user->ident), escape_string(user->host), ((user->flags & USERFLAG_ISAUTHED) ? escape_string(user->auth) : "*"), escape_string(user->nick), escape_string(message)); @@ -339,7 +339,7 @@ static TIMEQ_CALLBACK(neonhelp_remind_open_requests) { char nameBuf[30]; sprintf(nameBuf, "neonhelp_%d", client->clientid); if(!timeq_name_exists(nameBuf)) { - timeq_add_name(nameBuf, 300, neonhelp_remind_open_requests, data); + timeq_add_name(nameBuf, 300, module_id, neonhelp_remind_open_requests, data); } char replybuf[MAXLEN]; build_language_string(NULL, replybuf, (requests == 1 ? "NH_REMIND_OPEN_REQUESTS_1" : "NH_REMIND_OPEN_REQUESTS_2"), requests); @@ -513,19 +513,19 @@ static void neonhelp_event_quit(struct UserNode *target, char *reason) { void init_NeonHelp(int type) { set_bot_alias(BOTID, BOTALIAS); - start_bots(); + start_bots(type); if(type == MODSTATE_REBIND) return; //register events - bind_bot_ready(neonhelp_bot_ready); - bind_privmsg(neonhelp_event_privmsg); - bind_chanmsg(neonhelp_event_chanmsg); - bind_part(neonhelp_event_part); - bind_kick(neonhelp_event_kick); - bind_quit(neonhelp_event_quit); + bind_bot_ready(neonhelp_bot_ready, module_id); + bind_privmsg(neonhelp_event_privmsg, module_id); + bind_chanmsg(neonhelp_event_chanmsg, module_id); + bind_part(neonhelp_event_part, module_id); + bind_kick(neonhelp_event_kick, module_id); + bind_quit(neonhelp_event_quit, module_id); - set_trigger_callback(BOTID, neonhelp_trigger_callback); + set_trigger_callback(BOTID, module_id, neonhelp_trigger_callback); register_default_language_table(msgtab); }