X-Git-Url: http://git.pk910.de/?p=NeonServV5.git;a=blobdiff_plain;f=src%2FIRCParser.c;h=ca42770bd8370725feacc467294230b86dd662c1;hp=2ff95c8ba066b3e2b440d1b6250e4242060e1042;hb=ee3a72eb4a412a0a504d070db1b41c6907f7604d;hpb=939c6051a3ee85e3b3877fde35bdbf36ecb94fbc diff --git a/src/IRCParser.c b/src/IRCParser.c index 2ff95c8..ca42770 100644 --- a/src/IRCParser.c +++ b/src/IRCParser.c @@ -27,6 +27,7 @@ #include "BanNode.h" #include "ModeNode.h" #include "tools.h" +#include "bots.h" struct irc_cmd *irc_commands = NULL; static struct UserNode *registering_users = NULL; @@ -798,6 +799,15 @@ static IRC_CMD(raw_005) { return 1; } +static IRC_CMD(raw_nojoin) { + if(from == NULL || argc < 3) return 0; + struct ChanNode *chan = getChanByName(argv[1]); + if(chan == NULL) return 0; + if(client->flags & SOCKET_FLAG_REQUEST_INVITE) + requestInvite(client->user, chan); + return 1; +} + void init_parser() { //all the raws we receive... register_irc_function("437", raw_437); @@ -808,6 +818,10 @@ void init_parser() { register_irc_function("324", raw_324); register_irc_function("332", raw_332); register_irc_function("367", raw_367); + register_irc_function("471", raw_nojoin); + register_irc_function("473", raw_nojoin); + register_irc_function("474", raw_nojoin); + register_irc_function("475", raw_nojoin); register_irc_function("INVITE", raw_invite); register_irc_function("NOTICE", raw_notice); register_irc_function("TOPIC", raw_topic);