diff --git a/ChangeLog b/ChangeLog index 9ac9cf343..e5271b179 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ WeeChat ChangeLog ================= Sébastien Helleu -v0.4.2-dev, 2013-08-26 +v0.4.2-dev, 2013-08-28 This document lists all changes for each version. @@ -87,6 +87,8 @@ Version 0.4.2 (under dev!) * aspell: rename option aspell.look.color to aspell.color.misspelled, add option aspell.color.suggestions * aspell: add support of enchant library (patch #6858) +* irc: add option irc.look.notice_welcome_redirect to automatically redirect + channel welcome notices to the channel buffer * irc: replace default prefix modes "qaohvu" by the standard ones "ov" when PREFIX is not sent by server (bug #39802) * irc: use 6697 as default port for SSL servers created with URL "ircs://" diff --git a/doc/de/autogen/user/irc_options.txt b/doc/de/autogen/user/irc_options.txt index 7241ce713..22f96ef12 100644 --- a/doc/de/autogen/user/irc_options.txt +++ b/doc/de/autogen/user/irc_options.txt @@ -253,6 +253,11 @@ ** Typ: integer ** Werte: auto, never, always (Standardwert: `auto`) +* [[option_irc.look.notice_welcome_redirect]] *irc.look.notice_welcome_redirect* +** Beschreibung: `automatically redirect channel welcome notices to the channel buffer; such notices have the nick as target but a channel name in beginning of notice message, for example notices sent by freenode server which look like: "[#channel] Welcome to this channel..."` +** Typ: boolesch +** Werte: on, off (Standardwert: `on`) + * [[option_irc.look.notify_tags_ison]] *irc.look.notify_tags_ison* ** Beschreibung: `durch Kommata getrennte Liste von Schlagwörtern die in notify-Nachrichten genutzt werden sollen, falls ein Nick einen Server betritt oder verlässt (Rückgabe durch Befehl ison), zum Beispiel: "notify_message", "notify_private" oder "notify_highlight"` ** Typ: Zeichenkette diff --git a/doc/en/autogen/user/irc_options.txt b/doc/en/autogen/user/irc_options.txt index 1c28e8d1f..969d8f15d 100644 --- a/doc/en/autogen/user/irc_options.txt +++ b/doc/en/autogen/user/irc_options.txt @@ -253,6 +253,11 @@ ** type: integer ** values: auto, never, always (default value: `auto`) +* [[option_irc.look.notice_welcome_redirect]] *irc.look.notice_welcome_redirect* +** description: `automatically redirect channel welcome notices to the channel buffer; such notices have the nick as target but a channel name in beginning of notice message, for example notices sent by freenode server which look like: "[#channel] Welcome to this channel..."` +** type: boolean +** values: on, off (default value: `on`) + * [[option_irc.look.notify_tags_ison]] *irc.look.notify_tags_ison* ** description: `comma separated list of tags used in messages displayed by notify when a nick joins or quits server (result of command ison), for example: "notify_message", "notify_private" or "notify_highlight"` ** type: string diff --git a/doc/fr/autogen/user/irc_options.txt b/doc/fr/autogen/user/irc_options.txt index 873a8c428..acbbfe05c 100644 --- a/doc/fr/autogen/user/irc_options.txt +++ b/doc/fr/autogen/user/irc_options.txt @@ -253,6 +253,11 @@ ** type: entier ** valeurs: auto, never, always (valeur par défaut: `auto`) +* [[option_irc.look.notice_welcome_redirect]] *irc.look.notice_welcome_redirect* +** description: `rediriger automatiquement les notices de bienvenue sur le canal vers le tampon du canal; de telles notices ont le pseudo comme cible mais le nom du canal au début du message de notice, par exemple les notices envoyées par le serveur freenode qui ressemblent à: "[#canal] Bienvenue sur ce canal..."` +** type: booléen +** valeurs: on, off (valeur par défaut: `on`) + * [[option_irc.look.notify_tags_ison]] *irc.look.notify_tags_ison* ** description: `liste des tags (séparés par des virgules) utilisés dans les messages affichés par notify lorsqu'un pseudo a rejoint ou quitté le serveur (résultat de la commande ison), par exemple: "notify_message", "notify_private" ou "notify_highlight"` ** type: chaîne diff --git a/doc/it/autogen/user/irc_options.txt b/doc/it/autogen/user/irc_options.txt index a6097fb40..4de2ee30b 100644 --- a/doc/it/autogen/user/irc_options.txt +++ b/doc/it/autogen/user/irc_options.txt @@ -253,6 +253,11 @@ ** tipo: intero ** valori: auto, never, always (valore predefinito: `auto`) +* [[option_irc.look.notice_welcome_redirect]] *irc.look.notice_welcome_redirect* +** descrizione: `automatically redirect channel welcome notices to the channel buffer; such notices have the nick as target but a channel name in beginning of notice message, for example notices sent by freenode server which look like: "[#channel] Welcome to this channel..."` +** tipo: bool +** valori: on, off (valore predefinito: `on`) + * [[option_irc.look.notify_tags_ison]] *irc.look.notify_tags_ison* ** descrizione: `comma separated list of tags used in messages displayed by notify when a nick joins or quits server (result of command ison), for example: "notify_message", "notify_private" or "notify_highlight"` ** tipo: stringa diff --git a/doc/ja/autogen/user/irc_options.txt b/doc/ja/autogen/user/irc_options.txt index 0ab08aa82..7c4f3fa1f 100644 --- a/doc/ja/autogen/user/irc_options.txt +++ b/doc/ja/autogen/user/irc_options.txt @@ -253,6 +253,11 @@ ** タイプ: 整数 ** 値: auto, never, always (デフォルト値: `auto`) +* [[option_irc.look.notice_welcome_redirect]] *irc.look.notice_welcome_redirect* +** 説明: `automatically redirect channel welcome notices to the channel buffer; such notices have the nick as target but a channel name in beginning of notice message, for example notices sent by freenode server which look like: "[#channel] Welcome to this channel..."` +** タイプ: ブール +** 値: on, off (デフォルト値: `on`) + * [[option_irc.look.notify_tags_ison]] *irc.look.notify_tags_ison* ** 説明: `comma separated list of tags used in messages displayed by notify when a nick joins or quits server (result of command ison), for example: "notify_message", "notify_private" or "notify_highlight"` ** タイプ: 文字列 diff --git a/po/cs.po b/po/cs.po index 251fd0e1e..c12428645 100644 --- a/po/cs.po +++ b/po/cs.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-08-26 18:19+0200\n" +"POT-Creation-Date: 2013-08-28 21:24+0200\n" "PO-Revision-Date: 2013-08-17 10:37+0200\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -6374,6 +6374,13 @@ msgstr "" "zobrazovat upozornění jako soukromé zprávy (pokud je automaticky, použije se " "soukromý buffer, kdy existuje)" +msgid "" +"automatically redirect channel welcome notices to the channel buffer; such " +"notices have the nick as target but a channel name in beginning of notice " +"message, for example notices sent by freenode server which look like: " +"\"[#channel] Welcome to this channel...\"" +msgstr "" + #, fuzzy msgid "" "comma separated list of tags used in messages displayed by notify when a " diff --git a/po/de.po b/po/de.po index 934cb704d..b0261c065 100644 --- a/po/de.po +++ b/po/de.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-08-26 18:19+0200\n" +"POT-Creation-Date: 2013-08-28 21:24+0200\n" "PO-Revision-Date: 2013-08-18 19:01+0200\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -7136,6 +7136,13 @@ msgstr "" "zeigt Notizen als private Nachricht an (wird die \"auto\" Option verwendet " "dann wird ein privater Buffer genutzt, falls vorhanden)" +msgid "" +"automatically redirect channel welcome notices to the channel buffer; such " +"notices have the nick as target but a channel name in beginning of notice " +"message, for example notices sent by freenode server which look like: " +"\"[#channel] Welcome to this channel...\"" +msgstr "" + msgid "" "comma separated list of tags used in messages displayed by notify when a " "nick joins or quits server (result of command ison), for example: " diff --git a/po/es.po b/po/es.po index 9d85d3969..f81c0fa65 100644 --- a/po/es.po +++ b/po/es.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-08-26 18:19+0200\n" +"POT-Creation-Date: 2013-08-28 21:24+0200\n" "PO-Revision-Date: 2013-08-17 10:37+0200\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -6630,6 +6630,13 @@ msgstr "" "mostrar avisos como mensajes privados (si es auto, usa un buffer privado si " "lo encuentra)" +msgid "" +"automatically redirect channel welcome notices to the channel buffer; such " +"notices have the nick as target but a channel name in beginning of notice " +"message, for example notices sent by freenode server which look like: " +"\"[#channel] Welcome to this channel...\"" +msgstr "" + #, fuzzy msgid "" "comma separated list of tags used in messages displayed by notify when a " diff --git a/po/fr.po b/po/fr.po index 4f5391092..8c8c14f3e 100644 --- a/po/fr.po +++ b/po/fr.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-08-26 18:19+0200\n" -"PO-Revision-Date: 2013-08-26 18:19+0200\n" +"POT-Creation-Date: 2013-08-28 21:24+0200\n" +"PO-Revision-Date: 2013-08-28 21:25+0200\n" "Last-Translator: Sebastien Helleu \n" "Language-Team: weechat-dev \n" "Language: fr\n" @@ -6948,6 +6948,17 @@ msgstr "" "afficher les notices comme des messages privés (si auto, utilise le tampon " "privé s'il est trouvé)" +msgid "" +"automatically redirect channel welcome notices to the channel buffer; such " +"notices have the nick as target but a channel name in beginning of notice " +"message, for example notices sent by freenode server which look like: " +"\"[#channel] Welcome to this channel...\"" +msgstr "" +"rediriger automatiquement les notices de bienvenue sur le canal vers le " +"tampon du canal; de telles notices ont le pseudo comme cible mais le nom du " +"canal au début du message de notice, par exemple les notices envoyées par le " +"serveur freenode qui ressemblent à: \"[#canal] Bienvenue sur ce canal...\"" + msgid "" "comma separated list of tags used in messages displayed by notify when a " "nick joins or quits server (result of command ison), for example: " diff --git a/po/hu.po b/po/hu.po index 34b656d76..f9cc26164 100644 --- a/po/hu.po +++ b/po/hu.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-08-26 18:19+0200\n" +"POT-Creation-Date: 2013-08-28 21:24+0200\n" "PO-Revision-Date: 2013-08-17 10:37+0200\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -5893,6 +5893,13 @@ msgid "" "display notices as private messages (if auto, use private buffer if found)" msgstr "figyelmeztetések privát üzenetként való mutatása" +msgid "" +"automatically redirect channel welcome notices to the channel buffer; such " +"notices have the nick as target but a channel name in beginning of notice " +"message, for example notices sent by freenode server which look like: " +"\"[#channel] Welcome to this channel...\"" +msgstr "" + msgid "" "comma separated list of tags used in messages displayed by notify when a " "nick joins or quits server (result of command ison), for example: " diff --git a/po/it.po b/po/it.po index c5873f9cb..615e48413 100644 --- a/po/it.po +++ b/po/it.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-08-26 18:19+0200\n" +"POT-Creation-Date: 2013-08-28 21:24+0200\n" "PO-Revision-Date: 2013-08-17 10:37+0200\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: weechat-dev \n" @@ -6702,6 +6702,13 @@ msgstr "" "visualizza notifiche come messaggi privati (se automatico, usa il buffer " "privato se viene trovato)" +msgid "" +"automatically redirect channel welcome notices to the channel buffer; such " +"notices have the nick as target but a channel name in beginning of notice " +"message, for example notices sent by freenode server which look like: " +"\"[#channel] Welcome to this channel...\"" +msgstr "" + #, fuzzy msgid "" "comma separated list of tags used in messages displayed by notify when a " diff --git a/po/ja.po b/po/ja.po index d42703c0f..9708a31cd 100644 --- a/po/ja.po +++ b/po/ja.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-08-26 18:19+0200\n" +"POT-Creation-Date: 2013-08-28 21:24+0200\n" "PO-Revision-Date: 2013-08-17 10:37+0200\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" @@ -6605,6 +6605,13 @@ msgstr "" "notice をプライベートメッセージとして表示 (auto の場合、プライベートバッファ" "が見つかればそれを使用する)" +msgid "" +"automatically redirect channel welcome notices to the channel buffer; such " +"notices have the nick as target but a channel name in beginning of notice " +"message, for example notices sent by freenode server which look like: " +"\"[#channel] Welcome to this channel...\"" +msgstr "" + #, fuzzy msgid "" "comma separated list of tags used in messages displayed by notify when a " diff --git a/po/pl.po b/po/pl.po index 66e59774b..d225a0324 100644 --- a/po/pl.po +++ b/po/pl.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-08-26 18:19+0200\n" +"POT-Creation-Date: 2013-08-28 21:24+0200\n" "PO-Revision-Date: 2013-08-17 10:37+0200\n" "Last-Translator: Krzysztof Korościk \n" "Language-Team: weechat-dev \n" @@ -6731,6 +6731,13 @@ msgstr "" "wyświetlaj powiadomienia jako prywatne wiadomości (jeśli auto, używa " "prywatnego bufora jeśli taki istnieje)" +msgid "" +"automatically redirect channel welcome notices to the channel buffer; such " +"notices have the nick as target but a channel name in beginning of notice " +"message, for example notices sent by freenode server which look like: " +"\"[#channel] Welcome to this channel...\"" +msgstr "" + #, fuzzy msgid "" "comma separated list of tags used in messages displayed by notify when a " diff --git a/po/pt_BR.po b/po/pt_BR.po index ffe362f55..1b4d87952 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-08-26 18:19+0200\n" +"POT-Creation-Date: 2013-08-28 21:24+0200\n" "PO-Revision-Date: 2013-08-17 10:37+0200\n" "Last-Translator: Sergio Durigan Junior \n" "Language-Team: weechat-dev \n" @@ -6113,6 +6113,13 @@ msgid "" "display notices as private messages (if auto, use private buffer if found)" msgstr "" +msgid "" +"automatically redirect channel welcome notices to the channel buffer; such " +"notices have the nick as target but a channel name in beginning of notice " +"message, for example notices sent by freenode server which look like: " +"\"[#channel] Welcome to this channel...\"" +msgstr "" + msgid "" "comma separated list of tags used in messages displayed by notify when a " "nick joins or quits server (result of command ison), for example: " diff --git a/po/ru.po b/po/ru.po index 3e65b79d4..87ae27564 100644 --- a/po/ru.po +++ b/po/ru.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-08-26 18:19+0200\n" +"POT-Creation-Date: 2013-08-28 21:24+0200\n" "PO-Revision-Date: 2013-08-17 10:37+0200\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -5916,6 +5916,13 @@ msgid "" "display notices as private messages (if auto, use private buffer if found)" msgstr "отображать notice'ы в виде личных сообщений" +msgid "" +"automatically redirect channel welcome notices to the channel buffer; such " +"notices have the nick as target but a channel name in beginning of notice " +"message, for example notices sent by freenode server which look like: " +"\"[#channel] Welcome to this channel...\"" +msgstr "" + msgid "" "comma separated list of tags used in messages displayed by notify when a " "nick joins or quits server (result of command ison), for example: " diff --git a/po/tr.po b/po/tr.po index fade43484..6cdd84902 100644 --- a/po/tr.po +++ b/po/tr.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.2-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-08-26 18:19+0200\n" +"POT-Creation-Date: 2013-08-28 21:24+0200\n" "PO-Revision-Date: 2013-08-17 10:37+0200\n" "Last-Translator: Hasan Kiran \n" "Language-Team: weechat-dev \n" @@ -5208,6 +5208,13 @@ msgid "" "display notices as private messages (if auto, use private buffer if found)" msgstr "" +msgid "" +"automatically redirect channel welcome notices to the channel buffer; such " +"notices have the nick as target but a channel name in beginning of notice " +"message, for example notices sent by freenode server which look like: " +"\"[#channel] Welcome to this channel...\"" +msgstr "" + msgid "" "comma separated list of tags used in messages displayed by notify when a " "nick joins or quits server (result of command ison), for example: " diff --git a/po/weechat.pot b/po/weechat.pot index 0134b6bb1..c81a3bef0 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.4.1-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-08-26 18:19+0200\n" +"POT-Creation-Date: 2013-08-28 21:24+0200\n" "PO-Revision-Date: 2013-02-14 18:20+0100\n" "Last-Translator: FULL NAME \n" "Language-Team: weechat-dev \n" @@ -5167,6 +5167,13 @@ msgid "" "display notices as private messages (if auto, use private buffer if found)" msgstr "" +msgid "" +"automatically redirect channel welcome notices to the channel buffer; such " +"notices have the nick as target but a channel name in beginning of notice " +"message, for example notices sent by freenode server which look like: " +"\"[#channel] Welcome to this channel...\"" +msgstr "" + msgid "" "comma separated list of tags used in messages displayed by notify when a " "nick joins or quits server (result of command ison), for example: " diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c index 78bf50169..b74b49fe2 100644 --- a/src/plugins/irc/irc-config.c +++ b/src/plugins/irc/irc-config.c @@ -86,6 +86,7 @@ struct t_config_option *irc_config_look_nick_completion_smart; struct t_config_option *irc_config_look_nick_mode; struct t_config_option *irc_config_look_nick_mode_empty; struct t_config_option *irc_config_look_notice_as_pv; +struct t_config_option *irc_config_look_notice_welcome_redirect; struct t_config_option *irc_config_look_notify_tags_ison; struct t_config_option *irc_config_look_notify_tags_whois; struct t_config_option *irc_config_look_part_closes_buffer; @@ -2444,6 +2445,14 @@ irc_config_init () N_("display notices as private messages (if auto, use private buffer " "if found)"), "auto|never|always", 0, 0, "auto", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL); + irc_config_look_notice_welcome_redirect = weechat_config_new_option ( + irc_config_file, ptr_section, + "notice_welcome_redirect", "boolean", + N_("automatically redirect channel welcome notices to the channel " + "buffer; such notices have the nick as target but a channel name in " + "beginning of notice message, for example notices sent by freenode " + "server which look like: \"[#channel] Welcome to this channel...\""), + NULL, 0, 0, "on", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL); irc_config_look_notify_tags_ison = weechat_config_new_option ( irc_config_file, ptr_section, "notify_tags_ison", "string", diff --git a/src/plugins/irc/irc-config.h b/src/plugins/irc/irc-config.h index a5762ef91..025c85829 100644 --- a/src/plugins/irc/irc-config.h +++ b/src/plugins/irc/irc-config.h @@ -134,6 +134,7 @@ extern struct t_config_option *irc_config_look_nick_completion_smart; extern struct t_config_option *irc_config_look_nick_mode; extern struct t_config_option *irc_config_look_nick_mode_empty; extern struct t_config_option *irc_config_look_notice_as_pv; +extern struct t_config_option *irc_config_look_notice_welcome_redirect; extern struct t_config_option *irc_config_look_notify_tags_ison; extern struct t_config_option *irc_config_look_notify_tags_whois; extern struct t_config_option *irc_config_look_part_closes_buffer; diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index 49072db41..eedad00fd 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -1057,7 +1057,7 @@ IRC_PROTOCOL_CALLBACK(nick) IRC_PROTOCOL_CALLBACK(notice) { - char *pos_target, *pos_args; + char *pos_target, *pos_args, *pos, end_char, *channel; struct t_irc_channel *ptr_channel; struct t_irc_nick *ptr_nick; int notify_private, is_channel, notice_op, notice_voice; @@ -1105,10 +1105,56 @@ IRC_PROTOCOL_CALLBACK(notice) } else { - if (pos_target && irc_channel_is_channel (server, pos_target)) + is_channel = 0; + channel = NULL; + if (pos_target) + { + is_channel = irc_channel_is_channel (server, pos_target); + if (is_channel) + { + channel = strdup (pos_target); + } + else if (weechat_config_boolean (irc_config_look_notice_welcome_redirect)) + { + end_char = ' '; + switch (pos_args[0]) + { + case '[': + end_char = ']'; + break; + case '(': + end_char = ')'; + break; + case '{': + end_char = '}'; + break; + case '<': + end_char = '>'; + break; + } + if (end_char != ' ') + { + pos = strchr (pos_args, end_char); + if (pos) + { + channel = weechat_strndup (pos_args + 1, pos - pos_args - 1); + if (channel && irc_channel_search (server, channel)) + { + is_channel = 1; + pos_args = pos + 1; + while (pos_args[0] == ' ') + { + pos_args++; + } + } + } + } + } + } + if (is_channel) { /* notice for channel */ - ptr_channel = irc_channel_search (server, pos_target); + ptr_channel = irc_channel_search (server, channel); /* * unmask a smart filtered join if it is in hashtable @@ -1284,6 +1330,8 @@ IRC_PROTOCOL_CALLBACK(notice) } } } + if (channel) + free (channel); } return WEECHAT_RC_OK;