X-Git-Url: http://git.pk910.de/?p=NeonServV5.git;a=blobdiff_plain;f=src%2Fmodules%2FNeonServ.mod%2Fbot_NeonServ.c;h=050e71c884e7d17e956af0dc397f0e084f2db082;hp=5b13de0788cfc7e2e5c1c7941147caaca2c7f879;hb=c99b8d5951fe6429844c8cb5ff94213bb625ad95;hpb=923d68b1cf61c22ac4bd61cd55f4ac305def1ea3 diff --git a/src/modules/NeonServ.mod/bot_NeonServ.c b/src/modules/NeonServ.mod/bot_NeonServ.c index 5b13de0..050e71c 100644 --- a/src/modules/NeonServ.mod/bot_NeonServ.c +++ b/src/modules/NeonServ.mod/bot_NeonServ.c @@ -1,4 +1,4 @@ -/* bot_NeonServ.c - NeonServ v5.4 +/* bot_NeonServ.c - NeonServ v5.5 * Copyright (C) 2011-2012 Philipp Kreil (pk910) * * This program is free software: you can redistribute it and/or modify @@ -269,6 +269,7 @@ static const struct default_language_entry msgtab[] = { {"NS_UNBANALL_FAIL", "$b%s$b could not find any bans in %s."}, /* {ARGS: "NeonServ", "#TestChan"} */ {"NS_UNBANME_DONE", "removed $b%d$b masks from the %s ban list."}, /* {ARGS: 5, "#TestChan"} */ {"NS_UNBANME_FAIL", "$b%s$b could not find any bans matching %s."}, /* {ARGS: "NeonServ", "TestUser!TestIdent@TestUser.user.WebGamesNet"} */ + {"NS_INVITE_GLOBALLY_BLOCKED", "$b%s$b doesn't want to be invited at all."}, /* {ARGS: "TestUser"} */ {"NS_INVITE_RESTRICTION", "%s doesn't want to be invited to %s."}, /* {ARGS: "TestUser", "#TestChan"} */ {"NS_INVITE_TIMEOUT", "%s has already been invited to $b%s$b."}, /* {ARGS: "TestUser", "#TestChan"} */ {"NS_INVITE_ON_CHAN", "%s is already in $b%s$b."}, /* {ARGS: "TestUser", "#TestChan"} */ @@ -403,7 +404,6 @@ cmd_neonserv_calc.c //EVENTS #include "event_neonserv_join.c" #include "event_neonserv_part.c" -#include "event_neonserv_quit.c" #include "event_neonserv_kick.c" #include "event_neonserv_mode.c" #include "event_neonserv_ctcp.c" @@ -417,6 +417,8 @@ struct ClientSocket *getBotForChannel(struct ChanNode *chan) { } static void neonserv_bot_ready(struct ClientSocket *client) { + if(client->botid != BOTID) + return; MYSQL_RES *res; MYSQL_ROW row; @@ -470,6 +472,7 @@ static void start_bots(int type) { client->flags |= (strcmp(row[6], "0") ? SOCKET_FLAG_PREFERRED : 0); client->flags |= (strcmp(row[8], "0") ? SOCKET_FLAG_USE_QUEUE : 0); client->flags |= (strcmp(row[9], "0") ? SOCKET_FLAG_SSL : 0); + client->flags |= SOCKET_FLAG_REQUEST_INVITE | SOCKET_FLAG_REQUEST_OP; client->botid = BOTID; client->clientid = atoi(row[7]); connect_socket(client); @@ -506,7 +509,6 @@ void init_NeonServ(int type) { bind_bot_ready(neonserv_bot_ready, module_id); bind_join(neonserv_event_join, module_id); bind_part(neonserv_event_part, module_id); - bind_quit(neonserv_event_quit, module_id); bind_chanctcp(neonserv_event_chanctcp, module_id); bind_privctcp(general_event_privctcp, module_id); bind_channotice(neonserv_event_channotice, module_id); @@ -520,10 +522,6 @@ void init_NeonServ(int type) { register_default_language_table(msgtab); } -void loop_NeonServ() { - -} - void free_NeonServ(int type) { unbind_allcmd(BOTID); if(type == MODSTATE_STARTSTOP) {