diff options
35 files changed, 386 insertions, 110 deletions
@@ -1,7 +1,7 @@ WeeChat ChangeLog ================= Sébastien Helleu <flashcode@flashtux.org> -v0.4.3-dev, 2013-10-06 +v0.4.3-dev, 2013-10-08 This document lists all changes for each version. @@ -16,6 +16,8 @@ Version 0.4.3 (under dev!) * core: add options to customize default text search in buffers: weechat.look.buffer_search_{case_sensitive|force_default|regex|where} +* irc: add server option "default_msg_kick" to customize default kick/kickban + message (task #12777) Version 0.4.2 (2013-10-06) -------------------------- diff --git a/doc/de/autogen/plugin_api/completions.txt b/doc/de/autogen/plugin_api/completions.txt index 4fbe7857e..81d714bdf 100644 --- a/doc/de/autogen/plugin_api/completions.txt +++ b/doc/de/autogen/plugin_api/completions.txt @@ -22,6 +22,8 @@ | irc | irc_ignores_numbers | Anzahl für festgelegte Ignorierungen +| irc | irc_msg_kick | default kick message + | irc | irc_msg_part | Standardnachricht beim Verlassen (/part) eines IRC-Channels | irc | irc_notify_nicks | Nicks für die eine Benachrichtigung existiert diff --git a/doc/de/autogen/user/irc_commands.txt b/doc/de/autogen/user/irc_commands.txt index 03364c294..1fd7d7d57 100644 --- a/doc/de/autogen/user/irc_commands.txt +++ b/doc/de/autogen/user/irc_commands.txt @@ -249,9 +249,9 @@ Beispiele: ........................................ /kick [<channel>] <nick> [<reason>] -channel: Channel in dem der Benutzers sich befindet - nick: Nick der rausgeworfen werden soll - reason: Begründung für den Rauswurf +channel: channel where user is + nick: nick to kick + reason: reason for kick (special variables $nick, $channel and $server are replaced by their value) ........................................ [[command_irc_kickban]] @@ -259,14 +259,14 @@ channel: Channel in dem der Benutzers sich befindet ........................................ /kickban [<channel>] <nick> [<reason>] -channel: Channel in dem sich der User befindet - nick: Nickname der rausgeworfen und gebannt werden soll - reason: Begründung weshalb der User rausgeworfen wurde +channel: channel where user is + nick: nick to kick and ban + reason: reason for kick (special variables $nick, $channel and $channel are replaced by their value) -Es ist möglich kick/ban mittels einer Maske durchzuführen. Der Nick wird aus der Maske heraus gefiltert und durch Joker ("*") ersetzt. +It is possible to kick/ban with a mask, nick will be extracted from mask and replaced by "*". -Beispiel: - Sperre "*!*@host.com" und kicke dann "toto": +Example: + ban "*!*@host.com" and then kick "toto": /kickban toto!*@host.com ........................................ diff --git a/doc/de/autogen/user/irc_options.txt b/doc/de/autogen/user/irc_options.txt index ab5e920a6..bb1704be0 100644 --- a/doc/de/autogen/user/irc_options.txt +++ b/doc/de/autogen/user/irc_options.txt @@ -468,6 +468,11 @@ ** Typ: integer ** Werte: 1 .. 3600 (Standardwert: `60`) +* [[option_irc.server_default.default_msg_kick]] *irc.server_default.default_msg_kick* +** Beschreibung: `default kick message used by commands "/kick" and "/kickban" (special variables $nick, $channel and $server are replaced by their value)` +** Typ: Zeichenkette +** Werte: beliebige Zeichenkette (Standardwert: `""`) + * [[option_irc.server_default.default_msg_part]] *irc.server_default.default_msg_part* ** Beschreibung: `Standardnachricht beim Verlassen eines Channels ("%v": wird durch die WeeChat-Version ersetzt)` ** Typ: Zeichenkette diff --git a/doc/en/autogen/plugin_api/completions.txt b/doc/en/autogen/plugin_api/completions.txt index 2b5b4eebf..4dd4fb19a 100644 --- a/doc/en/autogen/plugin_api/completions.txt +++ b/doc/en/autogen/plugin_api/completions.txt @@ -22,6 +22,8 @@ | irc | irc_ignores_numbers | numbers for defined ignores +| irc | irc_msg_kick | default kick message + | irc | irc_msg_part | default part message for IRC channel | irc | irc_notify_nicks | nicks in notify list diff --git a/doc/en/autogen/user/irc_commands.txt b/doc/en/autogen/user/irc_commands.txt index 0c93b700c..505a24155 100644 --- a/doc/en/autogen/user/irc_commands.txt +++ b/doc/en/autogen/user/irc_commands.txt @@ -251,7 +251,7 @@ Examples: channel: channel where user is nick: nick to kick - reason: reason for kick + reason: reason for kick (special variables $nick, $channel and $server are replaced by their value) ........................................ [[command_irc_kickban]] @@ -261,7 +261,7 @@ channel: channel where user is channel: channel where user is nick: nick to kick and ban - reason: reason for kick + reason: reason for kick (special variables $nick, $channel and $channel are replaced by their value) It is possible to kick/ban with a mask, nick will be extracted from mask and replaced by "*". diff --git a/doc/en/autogen/user/irc_options.txt b/doc/en/autogen/user/irc_options.txt index c9a4f4e5a..8897470d5 100644 --- a/doc/en/autogen/user/irc_options.txt +++ b/doc/en/autogen/user/irc_options.txt @@ -468,6 +468,11 @@ ** type: integer ** values: 1 .. 3600 (default value: `60`) +* [[option_irc.server_default.default_msg_kick]] *irc.server_default.default_msg_kick* +** description: `default kick message used by commands "/kick" and "/kickban" (special variables $nick, $channel and $server are replaced by their value)` +** type: string +** values: any string (default value: `""`) + * [[option_irc.server_default.default_msg_part]] *irc.server_default.default_msg_part* ** description: `default part message (leaving channel) ("%v" will be replaced by WeeChat version in string)` ** type: string diff --git a/doc/fr/autogen/plugin_api/completions.txt b/doc/fr/autogen/plugin_api/completions.txt index 2f7a2b521..bcfbca0a2 100644 --- a/doc/fr/autogen/plugin_api/completions.txt +++ b/doc/fr/autogen/plugin_api/completions.txt @@ -22,6 +22,8 @@ | irc | irc_ignores_numbers | numéros pour les ignores définis +| irc | irc_msg_kick | message d'élimination par défaut + | irc | irc_msg_part | message de fin par défaut pour le canal IRC | irc | irc_notify_nicks | pseudos dans la liste de notifications diff --git a/doc/fr/autogen/user/irc_commands.txt b/doc/fr/autogen/user/irc_commands.txt index 2f7548c07..84a90488d 100644 --- a/doc/fr/autogen/user/irc_commands.txt +++ b/doc/fr/autogen/user/irc_commands.txt @@ -251,7 +251,7 @@ Exemples: canal: canal où l'utilisateur se trouve pseudo: pseudo à éliminer -raison: raison pour l'élimination +raison: raison pour l'élimination (les variables spéciales $nick, $channel et $server sont remplacées par leur valeur) ........................................ [[command_irc_kickban]] @@ -261,7 +261,7 @@ raison: raison pour l'élimination canal: canal où l'utilisateur se trouve pseudo: pseudo à éliminer et bannir -raison: raison pour l'élimination +raison: raison pour l'élimination (les variables spéciales $nick, $channel et $server sont remplacées par leur valeur) Il est possible d'éliminer/bannir avec un masque, le pseudo sera extrait du masque et remplacé par "*". diff --git a/doc/fr/autogen/user/irc_options.txt b/doc/fr/autogen/user/irc_options.txt index 5bde0dfb8..69dba4e7f 100644 --- a/doc/fr/autogen/user/irc_options.txt +++ b/doc/fr/autogen/user/irc_options.txt @@ -468,6 +468,11 @@ ** type: entier ** valeurs: 1 .. 3600 (valeur par défaut: `60`) +* [[option_irc.server_default.default_msg_kick]] *irc.server_default.default_msg_kick* +** description: `message par défaut pour l'élimination utilisé par les commandes "/kick" et "/kickban" (les variables spéciales $nick, $channel et $server sont remplacées par leur valeur)` +** type: chaîne +** valeurs: toute chaîne (valeur par défaut: `""`) + * [[option_irc.server_default.default_msg_part]] *irc.server_default.default_msg_part* ** description: `message par défaut pour le part (en quittant un canal) ("%v" sera remplacé par la version de WeeChat dans la chaîne)` ** type: chaîne diff --git a/doc/it/autogen/plugin_api/completions.txt b/doc/it/autogen/plugin_api/completions.txt index fa9c13e0d..ecfeb667a 100644 --- a/doc/it/autogen/plugin_api/completions.txt +++ b/doc/it/autogen/plugin_api/completions.txt @@ -22,6 +22,8 @@ | irc | irc_ignores_numbers | numero di ignore definiti +| irc | irc_msg_kick | default kick message + | irc | irc_msg_part | messaggio di uscita predefinito per il canale IRC | irc | irc_notify_nicks | nick nella lista notifiche diff --git a/doc/it/autogen/user/irc_commands.txt b/doc/it/autogen/user/irc_commands.txt index dc03b8a16..77b7c4696 100644 --- a/doc/it/autogen/user/irc_commands.txt +++ b/doc/it/autogen/user/irc_commands.txt @@ -249,9 +249,9 @@ Esempi: ........................................ /kick [<canale>] <nick> [<motivo>] -canale: canale dove si trova l'utente - nick: nick da cacciare -motivo: motivo per il kick +channel: channel where user is + nick: nick to kick + reason: reason for kick (special variables $nick, $channel and $server are replaced by their value) ........................................ [[command_irc_kickban]] @@ -259,15 +259,15 @@ motivo: motivo per il kick ........................................ /kickban [<canale>] <nick> [<motivo>] - canale: canale in cui si trova l'utente - nick: nick da cacciare e bannare -commento: motivo per il kick +channel: channel where user is + nick: nick to kick and ban + reason: reason for kick (special variables $nick, $channel and $channel are replaced by their value) -È possibile cacciare/bannare con una mask, il nick verrà estratto dalla mask e sostituito da "*". +It is possible to kick/ban with a mask, nick will be extracted from mask and replaced by "*". -Esempio: - banna "*!*@host.com" e poi caccia "tizio": - /kickban tizio!*@host.com +Example: + ban "*!*@host.com" and then kick "toto": + /kickban toto!*@host.com ........................................ [[command_irc_kill]] diff --git a/doc/it/autogen/user/irc_options.txt b/doc/it/autogen/user/irc_options.txt index f327798b1..c5d4e86e6 100644 --- a/doc/it/autogen/user/irc_options.txt +++ b/doc/it/autogen/user/irc_options.txt @@ -468,6 +468,11 @@ ** tipo: intero ** valori: 1 .. 3600 (valore predefinito: `60`) +* [[option_irc.server_default.default_msg_kick]] *irc.server_default.default_msg_kick* +** descrizione: `default kick message used by commands "/kick" and "/kickban" (special variables $nick, $channel and $server are replaced by their value)` +** tipo: stringa +** valori: qualsiasi stringa (valore predefinito: `""`) + * [[option_irc.server_default.default_msg_part]] *irc.server_default.default_msg_part* ** descrizione: `messaggio di uscita predefinito (in uscita dal canale) ("%v" verrà sostituito dalla versione di WeeChat)` ** tipo: stringa diff --git a/doc/ja/autogen/plugin_api/completions.txt b/doc/ja/autogen/plugin_api/completions.txt index 8e6f819ba..c5a4a72e0 100644 --- a/doc/ja/autogen/plugin_api/completions.txt +++ b/doc/ja/autogen/plugin_api/completions.txt @@ -22,6 +22,8 @@ | irc | irc_ignores_numbers | 無視エントリの数 +| irc | irc_msg_kick | default kick message + | irc | irc_msg_part | IRC チャンネルのデフォルト退出メッセージ | irc | irc_notify_nicks | 通知エントリのニックネーム diff --git a/doc/ja/autogen/user/irc_commands.txt b/doc/ja/autogen/user/irc_commands.txt index 9ef01bb0e..d5b961909 100644 --- a/doc/ja/autogen/user/irc_commands.txt +++ b/doc/ja/autogen/user/irc_commands.txt @@ -249,9 +249,9 @@ nick: nick ........................................ /kick [<channel>] <nick> [<reason>] -channel: ユーザの居るチャンネル - nick: キックするニックネーム - reason: キック理由 +channel: channel where user is + nick: nick to kick + reason: reason for kick (special variables $nick, $channel and $server are replaced by their value) ........................................ [[command_irc_kickban]] @@ -259,14 +259,14 @@ channel: ユーザの居るチャンネル ........................................ /kickban [<channel>] <nick> [<reason>] -channel: ユーザの居るチャンネル - nick: キックと参加禁止にするニックネーム - reason: キック理由 +channel: channel where user is + nick: nick to kick and ban + reason: reason for kick (special variables $nick, $channel and $channel are replaced by their value) -キックと参加禁止にマスクを使える場合、"*" のマスク展開後にマッチするニックネームがこれらの対象になる。 +It is possible to kick/ban with a mask, nick will be extracted from mask and replaced by "*". -例: - "*!*@host.com" を参加禁止して "toto" をキック: +Example: + ban "*!*@host.com" and then kick "toto": /kickban toto!*@host.com ........................................ diff --git a/doc/ja/autogen/user/irc_options.txt b/doc/ja/autogen/user/irc_options.txt index ee71b0264..1ccc2012e 100644 --- a/doc/ja/autogen/user/irc_options.txt +++ b/doc/ja/autogen/user/irc_options.txt @@ -468,6 +468,11 @@ ** タイプ: 整数 ** 値: 1 .. 3600 (デフォルト値: `60`) +* [[option_irc.server_default.default_msg_kick]] *irc.server_default.default_msg_kick* +** 説明: `default kick message used by commands "/kick" and "/kickban" (special variables $nick, $channel and $server are replaced by their value)` +** タイプ: 文字列 +** 値: 未制約文字列 (デフォルト値: `""`) + * [[option_irc.server_default.default_msg_part]] *irc.server_default.default_msg_part* ** 説明: `デフォルトの退出メッセージ (チャンネルから出る際の) ("%v" は WeeChat バージョンで置換)` ** タイプ: 文字列 @@ -20,8 +20,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-10-06 11:35+0200\n" -"PO-Revision-Date: 2013-10-06 12:39+0200\n" +"POT-Creation-Date: 2013-10-08 13:31+0200\n" +"PO-Revision-Date: 2013-10-08 11:24+0200\n" "Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: cs\n" @@ -5123,10 +5123,12 @@ msgstr "násilně odebrat uživatele z kanálu" msgid "[<channel>] <nick> [<reason>]" msgstr "[<kanál>] <přezdívka> [<důvod>]" +#, fuzzy msgid "" "channel: channel where user is\n" " nick: nick to kick\n" -" reason: reason for kick" +" reason: reason for kick (special variables $nick, $channel and $server are " +"replaced by their value)" msgstr "" " kanál: kanál na kterém je uživatel\n" "přezdívka: přezdívka, kterou vykopnout\n" @@ -5135,10 +5137,12 @@ msgstr "" msgid "kicks and bans a nick from a channel" msgstr "vyhodit a zakázat přezdívku na kanálu" +#, fuzzy msgid "" "channel: channel where user is\n" " nick: nick to kick and ban\n" -" reason: reason for kick\n" +" reason: reason for kick (special variables $nick, $channel and $channel are " +"replaced by their value)\n" "\n" "It is possible to kick/ban with a mask, nick will be extracted from mask and " "replaced by \"*\".\n" @@ -5940,6 +5944,10 @@ msgstr "kanály na všech IRC serverech" msgid "privates on all IRC servers" msgstr "soukromé rozhovory na všech IRC serverech" +#, fuzzy +msgid "default kick message" +msgstr "výchozí příkaz:" + msgid "default part message for IRC channel" msgstr "výchozí odchozí zpráva pro IRC kanál" @@ -6160,6 +6168,11 @@ msgstr "" "= nekonečno)" msgid "" +"default kick message used by commands \"/kick\" and \"/kickban\" (special " +"variables $nick, $channel and $server are replaced by their value)" +msgstr "" + +msgid "" "default part message (leaving channel) (\"%v\" will be replaced by WeeChat " "version in string)" msgstr "" @@ -22,8 +22,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-10-06 11:35+0200\n" -"PO-Revision-Date: 2013-10-06 12:40+0200\n" +"POT-Creation-Date: 2013-10-08 13:31+0200\n" +"PO-Revision-Date: 2013-10-08 11:24+0200\n" "Last-Translator: Nils Görs <weechatter@arcor.de>\n" "Language-Team: German <weechatter@arcor.de>\n" "Language: de_DE\n" @@ -5764,10 +5764,12 @@ msgstr "Einen User aus einem Channel herauswerfen" msgid "[<channel>] <nick> [<reason>]" msgstr "[<channel>] <nick> [<reason>]" +#, fuzzy msgid "" "channel: channel where user is\n" " nick: nick to kick\n" -" reason: reason for kick" +" reason: reason for kick (special variables $nick, $channel and $server are " +"replaced by their value)" msgstr "" "channel: Channel in dem der Benutzers sich befindet\n" " nick: Nick der rausgeworfen werden soll\n" @@ -5776,10 +5778,12 @@ msgstr "" msgid "kicks and bans a nick from a channel" msgstr "wirft jemanden aus dem Channel und verbannt ihn" +#, fuzzy msgid "" "channel: channel where user is\n" " nick: nick to kick and ban\n" -" reason: reason for kick\n" +" reason: reason for kick (special variables $nick, $channel and $channel are " +"replaced by their value)\n" "\n" "It is possible to kick/ban with a mask, nick will be extracted from mask and " "replaced by \"*\".\n" @@ -6602,6 +6606,10 @@ msgstr "Channels auf allen IRC Servern" msgid "privates on all IRC servers" msgstr "Private auf allen IRC Servern" +#, fuzzy +msgid "default kick message" +msgstr "Standardbefehl:" + msgid "default part message for IRC channel" msgstr "Standardnachricht beim Verlassen (/part) eines IRC-Channels" @@ -6864,6 +6872,11 @@ msgstr "" "Nutzern im Channel)" msgid "" +"default kick message used by commands \"/kick\" and \"/kickban\" (special " +"variables $nick, $channel and $server are replaced by their value)" +msgstr "" + +msgid "" "default part message (leaving channel) (\"%v\" will be replaced by WeeChat " "version in string)" msgstr "" @@ -22,8 +22,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-10-06 11:35+0200\n" -"PO-Revision-Date: 2013-10-06 12:40+0200\n" +"POT-Creation-Date: 2013-10-08 13:31+0200\n" +"PO-Revision-Date: 2013-10-08 11:24+0200\n" "Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: es\n" @@ -5340,10 +5340,12 @@ msgstr "expulsar forzosamente a un usuario de un canal" msgid "[<channel>] <nick> [<reason>]" msgstr "[<canal>] <apodo> [<razón>]" +#, fuzzy msgid "" "channel: channel where user is\n" " nick: nick to kick\n" -" reason: reason for kick" +" reason: reason for kick (special variables $nick, $channel and $server are " +"replaced by their value)" msgstr "" "canal: canal donde está el usuario\n" "apodo: usuario a expulsar\n" @@ -5352,10 +5354,12 @@ msgstr "" msgid "kicks and bans a nick from a channel" msgstr "expulsa y veta a un apodo de un canal" +#, fuzzy msgid "" "channel: channel where user is\n" " nick: nick to kick and ban\n" -" reason: reason for kick\n" +" reason: reason for kick (special variables $nick, $channel and $channel are " +"replaced by their value)\n" "\n" "It is possible to kick/ban with a mask, nick will be extracted from mask and " "replaced by \"*\".\n" @@ -6161,6 +6165,10 @@ msgstr "canales en todos los servidores IRC" msgid "privates on all IRC servers" msgstr "conversaciones privadas en todos los servidores IRC" +#, fuzzy +msgid "default kick message" +msgstr "comando predeterminado:" + msgid "default part message for IRC channel" msgstr "mensaje de abandono por defecto" @@ -6392,6 +6400,11 @@ msgstr "" "alto (0 = ilimitado)" msgid "" +"default kick message used by commands \"/kick\" and \"/kickban\" (special " +"variables $nick, $channel and $server are replaced by their value)" +msgstr "" + +msgid "" "default part message (leaving channel) (\"%v\" will be replaced by WeeChat " "version in string)" msgstr "" @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-10-06 11:35+0200\n" -"PO-Revision-Date: 2013-10-06 13:43+0200\n" +"POT-Creation-Date: 2013-10-08 13:31+0200\n" +"PO-Revision-Date: 2013-10-08 13:32+0200\n" "Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: fr\n" @@ -5628,11 +5628,13 @@ msgstr "[<canal>] <pseudo> [<raison>]" msgid "" "channel: channel where user is\n" " nick: nick to kick\n" -" reason: reason for kick" +" reason: reason for kick (special variables $nick, $channel and $server are " +"replaced by their value)" msgstr "" " canal: canal où l'utilisateur se trouve\n" "pseudo: pseudo à éliminer\n" -"raison: raison pour l'élimination" +"raison: raison pour l'élimination (les variables spéciales $nick, $channel " +"et $server sont remplacées par leur valeur)" msgid "kicks and bans a nick from a channel" msgstr "retirer par la force un pseudo d'un canal et le bannir" @@ -5640,7 +5642,8 @@ msgstr "retirer par la force un pseudo d'un canal et le bannir" msgid "" "channel: channel where user is\n" " nick: nick to kick and ban\n" -" reason: reason for kick\n" +" reason: reason for kick (special variables $nick, $channel and $channel are " +"replaced by their value)\n" "\n" "It is possible to kick/ban with a mask, nick will be extracted from mask and " "replaced by \"*\".\n" @@ -5651,7 +5654,8 @@ msgid "" msgstr "" " canal: canal où l'utilisateur se trouve\n" "pseudo: pseudo à éliminer et bannir\n" -"raison: raison pour l'élimination\n" +"raison: raison pour l'élimination (les variables spéciales $nick, $channel " +"et $server sont remplacées par leur valeur)\n" "\n" "Il est possible d'éliminer/bannir avec un masque, le pseudo sera extrait du " "masque et remplacé par \"*\".\n" @@ -6455,6 +6459,9 @@ msgstr "canaux sur tous les serveurs IRC" msgid "privates on all IRC servers" msgstr "privés sur tous les serveurs IRC" +msgid "default kick message" +msgstr "message d'élimination par défaut" + msgid "default part message for IRC channel" msgstr "message de fin par défaut pour le canal IRC" @@ -6707,6 +6714,14 @@ msgstr "" "pseudos (0 = pas de limite)" msgid "" +"default kick message used by commands \"/kick\" and \"/kickban\" (special " +"variables $nick, $channel and $server are replaced by their value)" +msgstr "" +"message par défaut pour l'élimination utilisé par les commandes \"/kick\" et " +"\"/kickban\" (les variables spéciales $nick, $channel et $server sont " +"remplacées par leur valeur)" + +msgid "" "default part message (leaving channel) (\"%v\" will be replaced by WeeChat " "version in string)" msgstr "" @@ -20,8 +20,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-10-06 11:35+0200\n" -"PO-Revision-Date: 2013-10-06 12:40+0200\n" +"POT-Creation-Date: 2013-10-08 13:31+0200\n" +"PO-Revision-Date: 2013-10-08 11:24+0200\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: hu\n" @@ -4661,7 +4661,8 @@ msgstr "[szoba] név [megjegyzés]" msgid "" "channel: channel where user is\n" " nick: nick to kick\n" -" reason: reason for kick" +" reason: reason for kick (special variables $nick, $channel and $server are " +"replaced by their value)" msgstr "" " szoba: a szoba, ahol a felhasználó tartózkodik\n" " név: a kirúgandó neve\n" @@ -4673,7 +4674,8 @@ msgstr "kirúgja és kitiltja a felhasználót a szobából" msgid "" "channel: channel where user is\n" " nick: nick to kick and ban\n" -" reason: reason for kick\n" +" reason: reason for kick (special variables $nick, $channel and $channel are " +"replaced by their value)\n" "\n" "It is possible to kick/ban with a mask, nick will be extracted from mask and " "replaced by \"*\".\n" @@ -5496,6 +5498,10 @@ msgid "privates on all IRC servers" msgstr "szobák listája ahová be akarunk lépni csatlakozás után" #, fuzzy +msgid "default kick message" +msgstr "%s belső parancsok:\n" + +#, fuzzy msgid "default part message for IRC channel" msgstr "felhasználók listája a szobában" @@ -5699,6 +5705,11 @@ msgid "" msgstr "" "nem ellenőrzi a távollétet nagy létszámú szobák esetében (0 = korlátlan)" +msgid "" +"default kick message used by commands \"/kick\" and \"/kickban\" (special " +"variables $nick, $channel and $server are replaced by their value)" +msgstr "" + #, fuzzy msgid "" "default part message (leaving channel) (\"%v\" will be replaced by WeeChat " @@ -20,8 +20,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-10-06 11:35+0200\n" -"PO-Revision-Date: 2013-10-06 12:40+0200\n" +"POT-Creation-Date: 2013-10-08 13:31+0200\n" +"PO-Revision-Date: 2013-10-08 11:24+0200\n" "Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: it\n" @@ -5467,10 +5467,12 @@ msgstr "caccia forzatamente un utente da un canale" msgid "[<channel>] <nick> [<reason>]" msgstr "[<canale>] <nick> [<motivo>]" +#, fuzzy msgid "" "channel: channel where user is\n" " nick: nick to kick\n" -" reason: reason for kick" +" reason: reason for kick (special variables $nick, $channel and $server are " +"replaced by their value)" msgstr "" "canale: canale dove si trova l'utente\n" " nick: nick da cacciare\n" @@ -5479,10 +5481,12 @@ msgstr "" msgid "kicks and bans a nick from a channel" msgstr "caccia e banna un nick da un canale" +#, fuzzy msgid "" "channel: channel where user is\n" " nick: nick to kick and ban\n" -" reason: reason for kick\n" +" reason: reason for kick (special variables $nick, $channel and $channel are " +"replaced by their value)\n" "\n" "It is possible to kick/ban with a mask, nick will be extracted from mask and " "replaced by \"*\".\n" @@ -6282,6 +6286,10 @@ msgstr "canali su tutti i server IRC" msgid "privates on all IRC servers" msgstr "privati su tutti i server IRC" +#, fuzzy +msgid "default kick message" +msgstr "comando predefinito:" + msgid "default part message for IRC channel" msgstr "messaggio di uscita predefinito per il canale IRC" @@ -6514,6 +6522,11 @@ msgstr "" "illimitato)" msgid "" +"default kick message used by commands \"/kick\" and \"/kickban\" (special " +"variables $nick, $channel and $server are replaced by their value)" +msgstr "" + +msgid "" "default part message (leaving channel) (\"%v\" will be replaced by WeeChat " "version in string)" msgstr "" @@ -20,8 +20,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-10-06 11:35+0200\n" -"PO-Revision-Date: 2013-10-06 12:40+0200\n" +"POT-Creation-Date: 2013-10-08 13:31+0200\n" +"PO-Revision-Date: 2013-10-08 11:25+0200\n" "Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n" "Language-Team: Japanese <https://github.com/l/WeeChat>\n" "Language: ja\n" @@ -5400,10 +5400,12 @@ msgstr "チャンネルからユーザを強制的に削除" msgid "[<channel>] <nick> [<reason>]" msgstr "[<channel>] <nick> [<reason>]" +#, fuzzy msgid "" "channel: channel where user is\n" " nick: nick to kick\n" -" reason: reason for kick" +" reason: reason for kick (special variables $nick, $channel and $server are " +"replaced by their value)" msgstr "" "channel: ユーザの居るチャンネル\n" " nick: キックするニックネーム\n" @@ -5412,10 +5414,12 @@ msgstr "" msgid "kicks and bans a nick from a channel" msgstr "チャンネルからニックネームをキックして参加を禁止" +#, fuzzy msgid "" "channel: channel where user is\n" " nick: nick to kick and ban\n" -" reason: reason for kick\n" +" reason: reason for kick (special variables $nick, $channel and $channel are " +"replaced by their value)\n" "\n" "It is possible to kick/ban with a mask, nick will be extracted from mask and " "replaced by \"*\".\n" @@ -6216,6 +6220,10 @@ msgstr "全ての IRC サーバのチャンネル" msgid "privates on all IRC servers" msgstr "全ての IRC サーバにあるプライベートチャンネル" +#, fuzzy +msgid "default kick message" +msgstr "デフォルトコマンド:" + msgid "default part message for IRC channel" msgstr "IRC チャンネルのデフォルト退出メッセージ" @@ -6444,6 +6452,11 @@ msgstr "" "制限無し)" msgid "" +"default kick message used by commands \"/kick\" and \"/kickban\" (special " +"variables $nick, $channel and $server are replaced by their value)" +msgstr "" + +msgid "" "default part message (leaving channel) (\"%v\" will be replaced by WeeChat " "version in string)" msgstr "" @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-10-06 11:35+0200\n" -"PO-Revision-Date: 2013-10-06 12:41+0200\n" +"POT-Creation-Date: 2013-10-08 13:31+0200\n" +"PO-Revision-Date: 2013-10-08 11:25+0200\n" "Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: pl\n" @@ -5512,10 +5512,12 @@ msgstr "siłowo usuwa użytkownika z kanału" msgid "[<channel>] <nick> [<reason>]" msgstr "[<kanał>] <nick> [<powód>]" +#, fuzzy msgid "" "channel: channel where user is\n" " nick: nick to kick\n" -" reason: reason for kick" +" reason: reason for kick (special variables $nick, $channel and $server are " +"replaced by their value)" msgstr "" "kanał: kanał, na którym znajduje się użytkownik\n" " nick: osoba do wykopania\n" @@ -5524,10 +5526,12 @@ msgstr "" msgid "kicks and bans a nick from a channel" msgstr "wykopuje i banuje użytkownika na kanale" +#, fuzzy msgid "" "channel: channel where user is\n" " nick: nick to kick and ban\n" -" reason: reason for kick\n" +" reason: reason for kick (special variables $nick, $channel and $channel are " +"replaced by their value)\n" "\n" "It is possible to kick/ban with a mask, nick will be extracted from mask and " "replaced by \"*\".\n" @@ -6335,6 +6339,10 @@ msgstr "kanały na wszystkich serwerach IRC" msgid "privates on all IRC servers" msgstr "rozmowy prywatne na wszystkich serwerach IRC" +#, fuzzy +msgid "default kick message" +msgstr "domyślna komenda:" + msgid "default part message for IRC channel" msgstr "domyślna wiadomość opuszczenia kanału IRC" @@ -6576,6 +6584,11 @@ msgstr "" "nieograniczone)" msgid "" +"default kick message used by commands \"/kick\" and \"/kickban\" (special " +"variables $nick, $channel and $server are replaced by their value)" +msgstr "" + +msgid "" "default part message (leaving channel) (\"%v\" will be replaced by WeeChat " "version in string)" msgstr "" diff --git a/po/pt_BR.po b/po/pt_BR.po index dc25a773b..4cfd3ffb2 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-10-06 11:35+0200\n" +"POT-Creation-Date: 2013-10-08 13:31+0200\n" "PO-Revision-Date: 2013-10-06 12:40+0200\n" "Last-Translator: Sergio Durigan Junior <sergiosdj@gmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -5055,7 +5055,8 @@ msgstr "" msgid "" "channel: channel where user is\n" " nick: nick to kick\n" -" reason: reason for kick" +" reason: reason for kick (special variables $nick, $channel and $server are " +"replaced by their value)" msgstr "" msgid "kicks and bans a nick from a channel" @@ -5064,7 +5065,8 @@ msgstr "" msgid "" "channel: channel where user is\n" " nick: nick to kick and ban\n" -" reason: reason for kick\n" +" reason: reason for kick (special variables $nick, $channel and $channel are " +"replaced by their value)\n" "\n" "It is possible to kick/ban with a mask, nick will be extracted from mask and " "replaced by \"*\".\n" @@ -5688,6 +5690,10 @@ msgstr "canais em todos os servidores IRC" msgid "privates on all IRC servers" msgstr "" +#, fuzzy +msgid "default kick message" +msgstr "comando padrão:" + msgid "default part message for IRC channel" msgstr "" @@ -5909,6 +5915,11 @@ msgstr "" "= ilimitado)" msgid "" +"default kick message used by commands \"/kick\" and \"/kickban\" (special " +"variables $nick, $channel and $server are replaced by their value)" +msgstr "" + +msgid "" "default part message (leaving channel) (\"%v\" will be replaced by WeeChat " "version in string)" msgstr "" @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-10-06 11:35+0200\n" -"PO-Revision-Date: 2013-10-06 12:41+0200\n" +"POT-Creation-Date: 2013-10-08 13:31+0200\n" +"PO-Revision-Date: 2013-10-08 11:25+0200\n" "Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language: ru\n" @@ -4696,7 +4696,8 @@ msgstr "[канал] ник [комментарий]" msgid "" "channel: channel where user is\n" " nick: nick to kick\n" -" reason: reason for kick" +" reason: reason for kick (special variables $nick, $channel and $server are " +"replaced by their value)" msgstr "" " канал: канал, на котором присутствует пользователь\n" " ник: цель для кика\n" @@ -4708,7 +4709,8 @@ msgstr "кикает и банит пользователя с канала" msgid "" "channel: channel where user is\n" " nick: nick to kick and ban\n" -" reason: reason for kick\n" +" reason: reason for kick (special variables $nick, $channel and $channel are " +"replaced by their value)\n" "\n" "It is possible to kick/ban with a mask, nick will be extracted from mask and " "replaced by \"*\".\n" @@ -5521,6 +5523,10 @@ msgid "privates on all IRC servers" msgstr "Список каналов, на которые заходить при соединении с сервером" #, fuzzy +msgid "default kick message" +msgstr "Внутренние команды %s:\n" + +#, fuzzy msgid "default part message for IRC channel" msgstr "список ников на канале" @@ -5726,6 +5732,11 @@ msgstr "" "не проверять отсутствие на каналах с большим количеством ников (0=не " "ограничено)" +msgid "" +"default kick message used by commands \"/kick\" and \"/kickban\" (special " +"variables $nick, $channel and $server are replaced by their value)" +msgstr "" + #, fuzzy msgid "" "default part message (leaving channel) (\"%v\" will be replaced by WeeChat " @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2013-10-06 11:35+0200\n" +"POT-Creation-Date: 2013-10-08 13:31+0200\n" "PO-Revision-Date: 2013-10-06 12:40+0200\n" "Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4190,7 +4190,8 @@ msgstr "" msgid "" "channel: channel where user is\n" " nick: nick to kick\n" -" reason: reason for kick" +" reason: reason for kick (special variables $nick, $channel and $server are " +"replaced by their value)" msgstr "" msgid "kicks and bans a nick from a channel" @@ -4199,7 +4200,8 @@ msgstr "" msgid "" "channel: channel where user is\n" " nick: nick to kick and ban\n" -" reason: reason for kick\n" +" reason: reason for kick (special variables $nick, $channel and $channel are " +"replaced by their value)\n" "\n" "It is possible to kick/ban with a mask, nick will be extracted from mask and " "replaced by \"*\".\n" @@ -4853,6 +4855,10 @@ msgstr "" msgid "privates on all IRC servers" msgstr "" +#, fuzzy +msgid "default kick message" +msgstr "varsayılan komut:" + msgid "default part message for IRC channel" msgstr "İRC kanalı için varsayılan ayrılma iletisi" @@ -5034,6 +5040,11 @@ msgid "" msgstr "" msgid "" +"default kick message used by commands \"/kick\" and \"/kickban\" (special " +"variables $nick, $channel and $server are replaced by their value)" +msgstr "" + +msgid "" "default part message (leaving channel) (\"%v\" will be replaced by WeeChat " "version in string)" msgstr "" diff --git a/po/weechat.pot b/po/weechat.pot index 78eb8ae54..981cdceaf 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-10-06 11:35+0200\n" +"POT-Creation-Date: 2013-10-08 13:31+0200\n" "PO-Revision-Date: 2013-02-14 18:20+0100\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" @@ -4193,7 +4193,8 @@ msgstr "" msgid "" "channel: channel where user is\n" " nick: nick to kick\n" -" reason: reason for kick" +" reason: reason for kick (special variables $nick, $channel and $server are " +"replaced by their value)" msgstr "" msgid "kicks and bans a nick from a channel" @@ -4202,7 +4203,8 @@ msgstr "" msgid "" "channel: channel where user is\n" " nick: nick to kick and ban\n" -" reason: reason for kick\n" +" reason: reason for kick (special variables $nick, $channel and $channel are " +"replaced by their value)\n" "\n" "It is possible to kick/ban with a mask, nick will be extracted from mask and " "replaced by \"*\".\n" @@ -4812,6 +4814,9 @@ msgstr "" msgid "privates on all IRC servers" msgstr "" +msgid "default kick message" +msgstr "" + msgid "default part message for IRC channel" msgstr "" @@ -4993,6 +4998,11 @@ msgid "" msgstr "" msgid "" +"default kick message used by commands \"/kick\" and \"/kickban\" (special " +"variables $nick, $channel and $server are replaced by their value)" +msgstr "" + +msgid "" "default part message (leaving channel) (\"%v\" will be replaced by WeeChat " "version in string)" msgstr "" diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index 3aa946dfb..03138dede 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -334,7 +334,7 @@ irc_command_exec_all_channels (struct t_irc_server *server, if (!excluded) { cmd_vars_replaced = irc_message_replace_vars (ptr_server, - ptr_channel, + ptr_channel->name, str_command); weechat_command (ptr_channel->buffer, (cmd_vars_replaced) ? cmd_vars_replaced : str_command); @@ -2328,6 +2328,41 @@ irc_command_join (void *data, struct t_gui_buffer *buffer, int argc, } /* + * Sends a kick message to a channel. + */ + +void +irc_command_kick_channel (struct t_irc_server *server, + const char *channel_name, const char *nick_name, + const char *message) +{ + const char *msg_kick; + char *msg_vars_replaced; + + msg_kick = (message && message[0]) ? + message : IRC_SERVER_OPTION_STRING(server, + IRC_SERVER_OPTION_DEFAULT_MSG_KICK); + if (msg_kick && msg_kick[0]) + { + msg_vars_replaced = irc_message_replace_vars (server, + channel_name, + msg_kick); + irc_server_sendf (server, IRC_SERVER_SEND_OUTQ_PRIO_HIGH, NULL, + "KICK %s %s :%s", + channel_name, nick_name, + (msg_vars_replaced) ? msg_vars_replaced : msg_kick); + if (msg_vars_replaced) + free (msg_vars_replaced); + } + else + { + irc_server_sendf (server, IRC_SERVER_SEND_OUTQ_PRIO_HIGH, NULL, + "KICK %s %s", + channel_name, nick_name); + } +} + +/* * Callback for command "/kick": forcibly removes a user from a channel. */ @@ -2378,19 +2413,8 @@ irc_command_kick (void *data, struct t_gui_buffer *buffer, int argc, return WEECHAT_RC_OK; } } - - if (pos_comment) - { - irc_server_sendf (ptr_server, IRC_SERVER_SEND_OUTQ_PRIO_HIGH, NULL, - "KICK %s %s :%s", - pos_channel, pos_nick, pos_comment); - } - else - { - irc_server_sendf (ptr_server, IRC_SERVER_SEND_OUTQ_PRIO_HIGH, NULL, - "KICK %s %s", - pos_channel, pos_nick); - } + irc_command_kick_channel (ptr_server, pos_channel, pos_nick, + pos_comment); } else { @@ -2499,12 +2523,8 @@ irc_command_kickban (void *data, struct t_gui_buffer *buffer, int argc, } /* kick nick */ - irc_server_sendf (ptr_server, IRC_SERVER_SEND_OUTQ_PRIO_HIGH, NULL, - "KICK %s %s%s%s", - pos_channel, - nick_only, - (pos_comment) ? " :" : "", - (pos_comment) ? pos_comment : ""); + irc_command_kick_channel (ptr_server, pos_channel, nick_only, + pos_comment); free (nick_only); } } @@ -4519,6 +4539,14 @@ irc_command_display_server (struct t_irc_server *server, int with_detail) weechat_printf (NULL, " away_check_max_nicks : %s%d", IRC_COLOR_CHAT_VALUE, weechat_config_integer (server->options[IRC_SERVER_OPTION_AWAY_CHECK_MAX_NICKS])); + /* default_msg_kick */ + if (weechat_config_option_is_null (server->options[IRC_SERVER_OPTION_DEFAULT_MSG_KICK])) + weechat_printf (NULL, " default_msg_kick . . : ('%s')", + IRC_SERVER_OPTION_STRING(server, IRC_SERVER_OPTION_DEFAULT_MSG_KICK)); + else + weechat_printf (NULL, " default_msg_kick . . : %s'%s'", + IRC_COLOR_CHAT_VALUE, + weechat_config_string (server->options[IRC_SERVER_OPTION_DEFAULT_MSG_KICK])); /* default_msg_part */ if (weechat_config_option_is_null (server->options[IRC_SERVER_OPTION_DEFAULT_MSG_PART])) weechat_printf (NULL, " default_msg_part . . : ('%s')", @@ -5958,21 +5986,26 @@ irc_command_init () N_("[<channel>] <nick> [<reason>]"), N_("channel: channel where user is\n" " nick: nick to kick\n" - " reason: reason for kick"), - "%(nicks) %-", &irc_command_kick, NULL); + " reason: reason for kick (special variables " + "$nick, $channel and $server are replaced by their " + "value)"), + "%(nicks) %(irc_msg_kick) %-", &irc_command_kick, NULL); weechat_hook_command ("kickban", N_("kicks and bans a nick from a channel"), N_("[<channel>] <nick> [<reason>]"), N_("channel: channel where user is\n" " nick: nick to kick and ban\n" - " reason: reason for kick\n\n" + " reason: reason for kick (special variables " + "$nick, $channel and $channel are replaced by their " + "value)\n\n" "It is possible to kick/ban with a mask, nick " "will be extracted from mask and replaced by " "\"*\".\n\n" "Example:\n" " ban \"*!*@host.com\" and then kick \"toto\":\n" " /kickban toto!*@host.com"), - "%(irc_channel_nicks_hosts) %-", &irc_command_kickban, NULL); + "%(irc_channel_nicks_hosts) %(irc_msg_kick) %-", + &irc_command_kickban, NULL); weechat_hook_command ("kill", N_("close client-server connection"), N_("<nick> <reason>"), diff --git a/src/plugins/irc/irc-completion.c b/src/plugins/irc/irc-completion.c index bdfd06231..ced451c60 100644 --- a/src/plugins/irc/irc-completion.c +++ b/src/plugins/irc/irc-completion.c @@ -524,6 +524,37 @@ irc_completion_privates_cb (void *data, const char *completion_item, } /* + * Adds default kick message to completion list. + */ + +int +irc_completion_msg_kick_cb (void *data, const char *completion_item, + struct t_gui_buffer *buffer, + struct t_gui_completion *completion) +{ + const char *msg_kick; + + IRC_BUFFER_GET_SERVER(buffer); + + /* make C compiler happy */ + (void) data; + (void) completion_item; + + if (ptr_server) + { + msg_kick = IRC_SERVER_OPTION_STRING(ptr_server, + IRC_SERVER_OPTION_DEFAULT_MSG_KICK); + if (msg_kick && msg_kick[0]) + { + weechat_hook_completion_list_add (completion, msg_kick, + 0, WEECHAT_LIST_POS_SORT); + } + } + + return WEECHAT_RC_OK; +} + +/* * Adds default part message to completion list. */ @@ -668,6 +699,9 @@ irc_completion_init () weechat_hook_completion ("irc_privates", N_("privates on all IRC servers"), &irc_completion_privates_cb, NULL); + weechat_hook_completion ("irc_msg_kick", + N_("default kick message"), + &irc_completion_msg_kick_cb, NULL); weechat_hook_completion ("irc_msg_part", N_("default part message for IRC channel"), &irc_completion_msg_part_cb, NULL); diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c index 7177d838e..66a877e76 100644 --- a/src/plugins/irc/irc-config.c +++ b/src/plugins/irc/irc-config.c @@ -1885,6 +1885,20 @@ irc_config_server_new_option (struct t_config_file *config_file, callback_change, callback_change_data, NULL, NULL); break; + case IRC_SERVER_OPTION_DEFAULT_MSG_KICK: + new_option = weechat_config_new_option ( + config_file, section, + option_name, "string", + N_("default kick message used by commands \"/kick\" and " + "\"/kickban\" (special variables $nick, $channel and $server " + "are replaced by their value)"), + NULL, 0, 0, + default_value, value, + null_value_allowed, + callback_check_value, callback_check_value_data, + callback_change, callback_change_data, + NULL, NULL); + break; case IRC_SERVER_OPTION_DEFAULT_MSG_PART: new_option = weechat_config_new_option ( config_file, section, diff --git a/src/plugins/irc/irc-message.c b/src/plugins/irc/irc-message.c index 7123bf5f6..b6fa0d39d 100644 --- a/src/plugins/irc/irc-message.c +++ b/src/plugins/irc/irc-message.c @@ -355,14 +355,14 @@ irc_message_get_address_from_host (const char *host) char * irc_message_replace_vars (struct t_irc_server *server, - struct t_irc_channel *channel, const char *string) + const char *channel_name, const char *string) { - char *var_nick, *var_channel, *var_server; + const char *var_nick, *var_channel, *var_server; char empty_string[1] = { '\0' }; char *res, *temp; var_nick = (server && server->nick) ? server->nick : empty_string; - var_channel = (channel) ? channel->name : empty_string; + var_channel = (channel_name) ? channel_name : empty_string; var_server = (server) ? server->name : empty_string; /* replace nick */ diff --git a/src/plugins/irc/irc-message.h b/src/plugins/irc/irc-message.h index 1e1f96629..20234c49b 100644 --- a/src/plugins/irc/irc-message.h +++ b/src/plugins/irc/irc-message.h @@ -32,7 +32,7 @@ extern struct t_hashtable *irc_message_parse_to_hashtable (struct t_irc_server * extern const char *irc_message_get_nick_from_host (const char *host); extern const char *irc_message_get_address_from_host (const char *host); extern char *irc_message_replace_vars (struct t_irc_server *server, - struct t_irc_channel *channel, + const char *channel_name, const char *string); extern struct t_hashtable *irc_message_split (struct t_irc_server *server, const char *message); diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index 9d6881a7e..5f0c3adb1 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -77,7 +77,7 @@ char *irc_server_option_string[IRC_SERVER_NUM_OPTIONS] = "connection_timeout", "anti_flood_prio_high", "anti_flood_prio_low", "away_check", "away_check_max_nicks", - "default_msg_part", "default_msg_quit", + "default_msg_kick", "default_msg_part", "default_msg_quit", "notify", }; @@ -92,7 +92,7 @@ char *irc_server_option_default[IRC_SERVER_NUM_OPTIONS] = "60", "2", "2", "0", "25", - "WeeChat %v", "WeeChat %v", + "","WeeChat %v", "WeeChat %v", "", }; @@ -4725,6 +4725,9 @@ irc_server_add_to_infolist (struct t_infolist *infolist, if (!weechat_infolist_new_var_integer (ptr_item, "away_check_max_nicks", IRC_SERVER_OPTION_INTEGER(server, IRC_SERVER_OPTION_AWAY_CHECK_MAX_NICKS))) return 0; + if (!weechat_infolist_new_var_string (ptr_item, "default_msg_kick", + IRC_SERVER_OPTION_STRING(server, IRC_SERVER_OPTION_DEFAULT_MSG_KICK))) + return 0; if (!weechat_infolist_new_var_string (ptr_item, "default_msg_part", IRC_SERVER_OPTION_STRING(server, IRC_SERVER_OPTION_DEFAULT_MSG_PART))) return 0; @@ -5039,6 +5042,13 @@ irc_server_print_log () else weechat_log_printf (" away_check_max_nicks : %d", weechat_config_integer (ptr_server->options[IRC_SERVER_OPTION_AWAY_CHECK_MAX_NICKS])); + /* default_msg_kick */ + if (weechat_config_option_is_null (ptr_server->options[IRC_SERVER_OPTION_DEFAULT_MSG_KICK])) + weechat_log_printf (" default_msg_kick . . : null ('%s')", + IRC_SERVER_OPTION_STRING(ptr_server, IRC_SERVER_OPTION_DEFAULT_MSG_KICK)); + else + weechat_log_printf (" default_msg_kick . . : '%s'", + weechat_config_string (ptr_server->options[IRC_SERVER_OPTION_DEFAULT_MSG_KICK])); /* default_msg_part */ if (weechat_config_option_is_null (ptr_server->options[IRC_SERVER_OPTION_DEFAULT_MSG_PART])) weechat_log_printf (" default_msg_part . . : null ('%s')", diff --git a/src/plugins/irc/irc-server.h b/src/plugins/irc/irc-server.h index 0f746dd8a..27fd22211 100644 --- a/src/plugins/irc/irc-server.h +++ b/src/plugins/irc/irc-server.h @@ -65,6 +65,7 @@ enum t_irc_server_option IRC_SERVER_OPTION_ANTI_FLOOD_PRIO_LOW, /* anti-flood (low priority) */ IRC_SERVER_OPTION_AWAY_CHECK, /* delay between away checks */ IRC_SERVER_OPTION_AWAY_CHECK_MAX_NICKS, /* max nicks for away check */ + IRC_SERVER_OPTION_DEFAULT_MSG_KICK, /* default kick message */ IRC_SERVER_OPTION_DEFAULT_MSG_PART, /* default part message */ IRC_SERVER_OPTION_DEFAULT_MSG_QUIT, /* default quit message */ IRC_SERVER_OPTION_NOTIFY, /* notify list */ |