parse channel topic (raw 332) on join
authorpk910 <philipp@zoelle1.de>
Thu, 10 Nov 2011 14:49:27 +0000 (15:49 +0100)
committerpk910 <philipp@zoelle1.de>
Thu, 10 Nov 2011 14:50:39 +0000 (15:50 +0100)
src/IRCParser.c

index c22f595544a9622fd39e78b065974146f5a3896d..da752c562c198e7ade467d3370b6539e5885d698 100644 (file)
@@ -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);