X-Git-Url: http://git.pk910.de/?p=NeonServV5.git;a=blobdiff_plain;f=src%2Fmodules%2FNeonSpam.mod%2Fbot_NeonSpam.c;h=16e0016a3dc57bdea26a5a1267f6a6d62b1018d4;hp=de645c2470edf4ea752fc579b6c1762c107660de;hb=9f27add1dff4dfa36fb65d43805da1939fbe4a4b;hpb=ee3a72eb4a412a0a504d070db1b41c6907f7604d diff --git a/src/modules/NeonSpam.mod/bot_NeonSpam.c b/src/modules/NeonSpam.mod/bot_NeonSpam.c index de645c2..16e0016 100644 --- a/src/modules/NeonSpam.mod/bot_NeonSpam.c +++ b/src/modules/NeonSpam.mod/bot_NeonSpam.c @@ -103,32 +103,9 @@ static struct NeonSpamJoinNode *getNeonSpamJoinNode(struct ChanUser *chanuser); #include "event_neonspam_join.c" #include "event_neonspam_chanmsg.c" -static void neonspam_event_kick(struct UserNode *user, struct ChanUser *target, char *reason) { - struct ChanNode *chan = target->chan; - if(isBot(target->user)) { - struct ClientSocket *client = getChannelBot(chan, 0); - struct ClientSocket *bot = client; - for(client = getBots(SOCKET_FLAG_READY, NULL); client; client = getBots(SOCKET_FLAG_READY, client)) { - if(client->user == target->user) { - break; - } - } - if(!client) return; - if(bot && bot != client && (isModeSet(chan->modes, 'i') || isModeSet(chan->modes, 'a') || isModeSet(chan->modes, 'l'))) { - struct ChanUser *chanuser = getChanUser(bot->user, chan); - if(chanuser && chanuser->flags & CHANUSERFLAG_OPPED) - putsock(bot, "INVITE %s %s", target->user->nick, chan->name); - } - char *key = ""; - if(isModeSet(chan->modes, 'k')) { - key = getModeValue(chan->modes, 'k'); - } - putsock(client, "JOIN %s %s", chan->name, key); - return; - } -} - static void neonspam_bot_ready(struct ClientSocket *client) { + if(client->botid != BOTID) + return; MYSQL_RES *res; MYSQL_ROW row; @@ -416,7 +393,6 @@ void init_NeonSpam(int type) { bind_join(neonspam_event_join, module_id); bind_chanmsg(neonspam_event_chanmsg, module_id); bind_privctcp(general_event_privctcp, module_id); - bind_kick(neonspam_event_kick, module_id); bind_freechan(neonspam_event_freechan, module_id); bind_invite(neonspam_event_invite, module_id);