From 06a18fa47126aeb44b9319f1393f4c4f81308d4e Mon Sep 17 00:00:00 2001 From: pk910 Date: Thu, 10 Nov 2011 15:49:27 +0100 Subject: [PATCH] parse channel topic (raw 332) on join --- src/IRCParser.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/IRCParser.c b/src/IRCParser.c index c22f595..da752c5 100644 --- a/src/IRCParser.c +++ b/src/IRCParser.c @@ -490,12 +490,21 @@ static IRC_CMD(raw_254) { return 1; } +static IRC_CMD(raw_332) { + //Skynet #neonserv :topic + struct ChanNode *chan = getChanByName(argv[1]); + if(!chan) return 0; + strcpy(chan->topic, argv[2]); + return 1; +} + void init_parser() { //all the raws we receive... register_irc_function("001", raw_001); register_irc_function("251", raw_251); register_irc_function("254", raw_254); register_irc_function("324", raw_324); + register_irc_function("332", raw_332); register_irc_function("367", raw_367); register_irc_function("INVITE", raw_invite); register_irc_function("NOTICE", raw_notice); -- 2.20.1