summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.asciidoc1
-rw-r--r--doc/de/autogen/user/irc_options.txt4
-rw-r--r--doc/en/autogen/user/irc_options.txt4
-rw-r--r--doc/fr/autogen/user/irc_options.txt4
-rw-r--r--doc/it/autogen/user/irc_options.txt4
-rw-r--r--doc/ja/autogen/user/irc_options.txt4
-rw-r--r--doc/pl/autogen/user/irc_options.txt4
-rw-r--r--po/cs.po8
-rw-r--r--po/de.po9
-rw-r--r--po/es.po8
-rw-r--r--po/fr.po17
-rw-r--r--po/hu.po8
-rw-r--r--po/it.po8
-rw-r--r--po/ja.po9
-rw-r--r--po/pl.po9
-rw-r--r--po/pt_BR.po8
-rw-r--r--po/ru.po8
-rw-r--r--po/tr.po8
-rw-r--r--po/weechat.pot8
-rw-r--r--src/plugins/irc/irc-config.c9
-rw-r--r--src/plugins/irc/irc-nick.c10
21 files changed, 95 insertions, 57 deletions
diff --git a/ChangeLog.asciidoc b/ChangeLog.asciidoc
index 82b5abe2e..2accc064d 100644
--- a/ChangeLog.asciidoc
+++ b/ChangeLog.asciidoc
@@ -81,6 +81,7 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
* alias: change default command for alias /beep to "/print -beep"
* exec: add exec plugin: new command /exec and file exec.conf
* guile: fix module used after unload of a script
+* irc: allow "$ident" in option irc.network.ban_mask_default (closes #18)
* irc: add support of "away-notify" capability (closes #12)
* irc: add command /unquiet (closes #36)
* irc: add command /allpv (task #13111)
diff --git a/doc/de/autogen/user/irc_options.txt b/doc/de/autogen/user/irc_options.txt
index 68ebfc32b..6f4097897 100644
--- a/doc/de/autogen/user/irc_options.txt
+++ b/doc/de/autogen/user/irc_options.txt
@@ -354,9 +354,9 @@
** Werte: 0 .. 604800 (Standardwert: `600`)
* [[option_irc.network.ban_mask_default]] *irc.network.ban_mask_default*
-** Beschreibung: `Vorgabewert für Befehle /ban, /unban und /kickban; Variablen $nick, $user und $host werden durch den jeweiligen Wert ersetzt (extrahiert aus "nick!user@host"); diese Vorgabemaske wird nur angewendet, sofern WeeChat den Host des Nicks ermitteln kann`
+** Beschreibung: `default ban mask for commands /ban, /unban and /kickban; variables $nick, $user, $ident and $host are replaced by their values (extracted from "nick!user@host"); $ident is the same as $user if $user does not start with "~", otherwise it is set to "*"; this default mask is used only if WeeChat knows the host for the nick`
** Typ: Zeichenkette
-** Werte: beliebige Zeichenkette (Standardwert: `"*!$user@$host"`)
+** Werte: beliebige Zeichenkette (Standardwert: `"*!$ident@$host"`)
* [[option_irc.network.colors_receive]] *irc.network.colors_receive*
** Beschreibung: `wenn deaktiviert, werden Farben-Codes von eingehenden Nachrichten ignoriert`
diff --git a/doc/en/autogen/user/irc_options.txt b/doc/en/autogen/user/irc_options.txt
index 3920de6b8..708a34717 100644
--- a/doc/en/autogen/user/irc_options.txt
+++ b/doc/en/autogen/user/irc_options.txt
@@ -354,9 +354,9 @@
** values: 0 .. 604800 (default value: `600`)
* [[option_irc.network.ban_mask_default]] *irc.network.ban_mask_default*
-** description: `default ban mask for commands /ban, /unban and /kickban; variables $nick, $user and $host are replaced by their values (extracted from "nick!user@host"); this default mask is used only if WeeChat knows the host for the nick`
+** description: `default ban mask for commands /ban, /unban and /kickban; variables $nick, $user, $ident and $host are replaced by their values (extracted from "nick!user@host"); $ident is the same as $user if $user does not start with "~", otherwise it is set to "*"; this default mask is used only if WeeChat knows the host for the nick`
** type: string
-** values: any string (default value: `"*!$user@$host"`)
+** values: any string (default value: `"*!$ident@$host"`)
* [[option_irc.network.colors_receive]] *irc.network.colors_receive*
** description: `when off, colors codes are ignored in incoming messages`
diff --git a/doc/fr/autogen/user/irc_options.txt b/doc/fr/autogen/user/irc_options.txt
index c71344668..8585511da 100644
--- a/doc/fr/autogen/user/irc_options.txt
+++ b/doc/fr/autogen/user/irc_options.txt
@@ -354,9 +354,9 @@
** valeurs: 0 .. 604800 (valeur par défaut: `600`)
* [[option_irc.network.ban_mask_default]] *irc.network.ban_mask_default*
-** description: `masque de bannissement par défaut pour les commandes /ban, /unban et /kickban; les variables $nick, $user et $host sont remplacées par leurs valeurs (extraites de "nick!user@host"); ce masque par défaut est utilisé seulement si WeeChat connaît l'hôte pour le pseudo`
+** description: `masque de bannissement par défaut pour les commandes /ban, /unban et /kickban; les variables $nick, $user, $ident et $host sont remplacées par leurs valeurs (extraites de "nick!user@host"); $ident est identique à $user si $user ne commence pas par "~", sinon $ident vaut "*"; ce masque par défaut est utilisé seulement si WeeChat connaît l'hôte pour le pseudo`
** type: chaîne
-** valeurs: toute chaîne (valeur par défaut: `"*!$user@$host"`)
+** valeurs: toute chaîne (valeur par défaut: `"*!$ident@$host"`)
* [[option_irc.network.colors_receive]] *irc.network.colors_receive*
** description: `si désactivé, les codes couleurs des messages entrants sont ignorés`
diff --git a/doc/it/autogen/user/irc_options.txt b/doc/it/autogen/user/irc_options.txt
index 0efc560fb..9b365ff8d 100644
--- a/doc/it/autogen/user/irc_options.txt
+++ b/doc/it/autogen/user/irc_options.txt
@@ -354,9 +354,9 @@
** valori: 0 .. 604800 (valore predefinito: `600`)
* [[option_irc.network.ban_mask_default]] *irc.network.ban_mask_default*
-** descrizione: `default ban mask for commands /ban, /unban and /kickban; variables $nick, $user and $host are replaced by their values (extracted from "nick!user@host"); this default mask is used only if WeeChat knows the host for the nick`
+** descrizione: `default ban mask for commands /ban, /unban and /kickban; variables $nick, $user, $ident and $host are replaced by their values (extracted from "nick!user@host"); $ident is the same as $user if $user does not start with "~", otherwise it is set to "*"; this default mask is used only if WeeChat knows the host for the nick`
** tipo: stringa
-** valori: qualsiasi stringa (valore predefinito: `"*!$user@$host"`)
+** valori: qualsiasi stringa (valore predefinito: `"*!$ident@$host"`)
* [[option_irc.network.colors_receive]] *irc.network.colors_receive*
** descrizione: `se disabilitato, i codici colori vengono ignorati nei messaggi in entrata`
diff --git a/doc/ja/autogen/user/irc_options.txt b/doc/ja/autogen/user/irc_options.txt
index ef66cfdc2..94ddef907 100644
--- a/doc/ja/autogen/user/irc_options.txt
+++ b/doc/ja/autogen/user/irc_options.txt
@@ -354,9 +354,9 @@
** 値: 0 .. 604800 (デフォルト値: `600`)
* [[option_irc.network.ban_mask_default]] *irc.network.ban_mask_default*
-** 説明: `/ban、/unban、/kickban コマンドが使うデフォルトの禁止マスク; 変数 $nick、$user、$host はそれぞれの値に置換 ("nick!user@host" から展開) されます; このデフォルトマスクはニックネームのホスト名がわかる場合のみ利用されます`
+** 説明: `default ban mask for commands /ban, /unban and /kickban; variables $nick, $user, $ident and $host are replaced by their values (extracted from "nick!user@host"); $ident is the same as $user if $user does not start with "~", otherwise it is set to "*"; this default mask is used only if WeeChat knows the host for the nick`
** タイプ: 文字列
-** 値: 未制約文字列 (デフォルト値: `"*!$user@$host"`)
+** 値: 未制約文字列 (デフォルト値: `"*!$ident@$host"`)
* [[option_irc.network.colors_receive]] *irc.network.colors_receive*
** 説明: `オフの場合、到着メッセージに含まれる色コードを無視`
diff --git a/doc/pl/autogen/user/irc_options.txt b/doc/pl/autogen/user/irc_options.txt
index 194999c92..04297643e 100644
--- a/doc/pl/autogen/user/irc_options.txt
+++ b/doc/pl/autogen/user/irc_options.txt
@@ -354,9 +354,9 @@
** wartości: 0 .. 604800 (domyślna wartość: `600`)
* [[option_irc.network.ban_mask_default]] *irc.network.ban_mask_default*
-** opis: `domyślna maska dla bana dla komend /ban, /unban i /kickban; zmienne $nick, $user, i $host są zastępowane odpowiednimi wartościami (pobranymi z "nick!user@host"); domyślna maska używana jest tylko, kiedy WeeChat zna nazwę hosta dla nicka`
+** opis: `default ban mask for commands /ban, /unban and /kickban; variables $nick, $user, $ident and $host are replaced by their values (extracted from "nick!user@host"); $ident is the same as $user if $user does not start with "~", otherwise it is set to "*"; this default mask is used only if WeeChat knows the host for the nick`
** typ: ciąg
-** wartości: dowolny ciąg (domyślna wartość: `"*!$user@$host"`)
+** wartości: dowolny ciąg (domyślna wartość: `"*!$ident@$host"`)
* [[option_irc.network.colors_receive]] *irc.network.colors_receive*
** opis: `kiedy wyłączone (off) kody kolorów są ignorowane w przychodzących wiadomościach`
diff --git a/po/cs.po b/po/cs.po
index 6e7955042..cdbff6f13 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2014-03-30 16:11+0200\n"
+"POT-Creation-Date: 2014-03-30 18:55+0200\n"
"PO-Revision-Date: 2014-03-24 14:23+0100\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -7071,8 +7071,10 @@ msgstr ""
msgid ""
"default ban mask for commands /ban, /unban and /kickban; variables $nick, "
-"$user and $host are replaced by their values (extracted from \"nick!user@host"
-"\"); this default mask is used only if WeeChat knows the host for the nick"
+"$user, $ident and $host are replaced by their values (extracted from \"nick!"
+"user@host\"); $ident is the same as $user if $user does not start with \"~"
+"\", otherwise it is set to \"*\"; this default mask is used only if WeeChat "
+"knows the host for the nick"
msgstr ""
msgid "when off, colors codes are ignored in incoming messages"
diff --git a/po/de.po b/po/de.po
index f04a1c03d..4a74d8e3f 100644
--- a/po/de.po
+++ b/po/de.po
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2014-03-30 16:11+0200\n"
+"POT-Creation-Date: 2014-03-30 18:55+0200\n"
"PO-Revision-Date: 2014-03-27 19:25+0100\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <weechatter@arcor.de>\n"
@@ -8122,10 +8122,13 @@ msgstr ""
"maximale Verzögerung bei der automatischen Wiederverbindung zum Server (in "
"Sekunden, 0 = keine Begrenzung)"
+#, fuzzy
msgid ""
"default ban mask for commands /ban, /unban and /kickban; variables $nick, "
-"$user and $host are replaced by their values (extracted from \"nick!user@host"
-"\"); this default mask is used only if WeeChat knows the host for the nick"
+"$user, $ident and $host are replaced by their values (extracted from \"nick!"
+"user@host\"); $ident is the same as $user if $user does not start with \"~"
+"\", otherwise it is set to \"*\"; this default mask is used only if WeeChat "
+"knows the host for the nick"
msgstr ""
"Vorgabewert für Befehle /ban, /unban und /kickban; Variablen $nick, $user "
"und $host werden durch den jeweiligen Wert ersetzt (extrahiert aus \"nick!"
diff --git a/po/es.po b/po/es.po
index 257b84f7d..42473f411 100644
--- a/po/es.po
+++ b/po/es.po
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2014-03-30 16:11+0200\n"
+"POT-Creation-Date: 2014-03-30 18:55+0200\n"
"PO-Revision-Date: 2014-03-24 14:23+0100\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -7348,8 +7348,10 @@ msgstr "retraso máximo para la autoreconexión (en segundos, 0 = sin máximo)"
msgid ""
"default ban mask for commands /ban, /unban and /kickban; variables $nick, "
-"$user and $host are replaced by their values (extracted from \"nick!user@host"
-"\"); this default mask is used only if WeeChat knows the host for the nick"
+"$user, $ident and $host are replaced by their values (extracted from \"nick!"
+"user@host\"); $ident is the same as $user if $user does not start with \"~"
+"\", otherwise it is set to \"*\"; this default mask is used only if WeeChat "
+"knows the host for the nick"
msgstr ""
msgid "when off, colors codes are ignored in incoming messages"
diff --git a/po/fr.po b/po/fr.po
index e2aaa2e2b..ff27aa162 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2014-03-30 16:11+0200\n"
-"PO-Revision-Date: 2014-03-30 16:12+0200\n"
+"POT-Creation-Date: 2014-03-30 18:55+0200\n"
+"PO-Revision-Date: 2014-03-30 18:55+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@@ -7904,13 +7904,16 @@ msgstr ""
msgid ""
"default ban mask for commands /ban, /unban and /kickban; variables $nick, "
-"$user and $host are replaced by their values (extracted from \"nick!user@host"
-"\"); this default mask is used only if WeeChat knows the host for the nick"
+"$user, $ident and $host are replaced by their values (extracted from \"nick!"
+"user@host\"); $ident is the same as $user if $user does not start with \"~"
+"\", otherwise it is set to \"*\"; this default mask is used only if WeeChat "
+"knows the host for the nick"
msgstr ""
"masque de bannissement par défaut pour les commandes /ban, /unban et /"
-"kickban; les variables $nick, $user et $host sont remplacées par leurs "
-"valeurs (extraites de \"nick!user@host\"); ce masque par défaut est utilisé "
-"seulement si WeeChat connaît l'hôte pour le pseudo"
+"kickban; les variables $nick, $user, $ident et $host sont remplacées par "
+"leurs valeurs (extraites de \"nick!user@host\"); $ident est identique à "
+"$user si $user ne commence pas par \"~\", sinon $ident vaut \"*\"; ce masque "
+"par défaut est utilisé seulement si WeeChat connaît l'hôte pour le pseudo"
msgid "when off, colors codes are ignored in incoming messages"
msgstr "si désactivé, les codes couleurs des messages entrants sont ignorés"
diff --git a/po/hu.po b/po/hu.po
index 1d6ccd502..95b33e95b 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2014-03-30 16:11+0200\n"
+"POT-Creation-Date: 2014-03-30 18:55+0200\n"
"PO-Revision-Date: 2014-03-24 14:23+0100\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -6532,8 +6532,10 @@ msgstr ""
msgid ""
"default ban mask for commands /ban, /unban and /kickban; variables $nick, "
-"$user and $host are replaced by their values (extracted from \"nick!user@host"
-"\"); this default mask is used only if WeeChat knows the host for the nick"
+"$user, $ident and $host are replaced by their values (extracted from \"nick!"
+"user@host\"); $ident is the same as $user if $user does not start with \"~"
+"\", otherwise it is set to \"*\"; this default mask is used only if WeeChat "
+"knows the host for the nick"
msgstr ""
msgid "when off, colors codes are ignored in incoming messages"
diff --git a/po/it.po b/po/it.po
index a815bbd06..7a837d9f5 100644
--- a/po/it.po
+++ b/po/it.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2014-03-30 16:11+0200\n"
+"POT-Creation-Date: 2014-03-30 18:55+0200\n"
"PO-Revision-Date: 2014-03-24 14:23+0100\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -7500,8 +7500,10 @@ msgstr ""
msgid ""
"default ban mask for commands /ban, /unban and /kickban; variables $nick, "
-"$user and $host are replaced by their values (extracted from \"nick!user@host"
-"\"); this default mask is used only if WeeChat knows the host for the nick"
+"$user, $ident and $host are replaced by their values (extracted from \"nick!"
+"user@host\"); $ident is the same as $user if $user does not start with \"~"
+"\", otherwise it is set to \"*\"; this default mask is used only if WeeChat "
+"knows the host for the nick"
msgstr ""
msgid "when off, colors codes are ignored in incoming messages"
diff --git a/po/ja.po b/po/ja.po
index fedec1eb1..4cc6cbe31 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2014-03-30 16:11+0200\n"
+"POT-Creation-Date: 2014-03-30 18:55+0200\n"
"PO-Revision-Date: 2014-03-29 20:07+0900\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/translation_ja>\n"
@@ -7603,10 +7603,13 @@ msgstr ""
msgid "maximum autoreconnect delay to server (in seconds, 0 = no maximum)"
msgstr "サーバへの自動接続の遅延時間の最大値 (秒単位、0 = 制限無し)"
+#, fuzzy
msgid ""
"default ban mask for commands /ban, /unban and /kickban; variables $nick, "
-"$user and $host are replaced by their values (extracted from \"nick!user@host"
-"\"); this default mask is used only if WeeChat knows the host for the nick"
+"$user, $ident and $host are replaced by their values (extracted from \"nick!"
+"user@host\"); $ident is the same as $user if $user does not start with \"~"
+"\", otherwise it is set to \"*\"; this default mask is used only if WeeChat "
+"knows the host for the nick"
msgstr ""
"/ban、/unban、/kickban コマンドが使うデフォルトの禁止マスク; 変数 "
"$nick、$user、$host はそれぞれの値に置換 (\"nick!user@host\" から展開) されま"
diff --git a/po/pl.po b/po/pl.po
index e34ec28f1..337137ea1 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2014-03-30 16:11+0200\n"
+"POT-Creation-Date: 2014-03-30 18:55+0200\n"
"PO-Revision-Date: 2014-03-24 14:23+0100\n"
"Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -7679,10 +7679,13 @@ msgstr ""
"maksymalne opóźnienie do ponownego połączenia z serwerem (w sekundach, 0 = "
"brak maksimum)"
+#, fuzzy
msgid ""
"default ban mask for commands /ban, /unban and /kickban; variables $nick, "
-"$user and $host are replaced by their values (extracted from \"nick!user@host"
-"\"); this default mask is used only if WeeChat knows the host for the nick"
+"$user, $ident and $host are replaced by their values (extracted from \"nick!"
+"user@host\"); $ident is the same as $user if $user does not start with \"~"
+"\", otherwise it is set to \"*\"; this default mask is used only if WeeChat "
+"knows the host for the nick"
msgstr ""
"domyślna maska dla bana dla komend /ban, /unban i /kickban; zmienne $nick, "
"$user, i $host są zastępowane odpowiednimi wartościami (pobranymi z \"nick!"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 6803a8b93..d30e7cb44 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: 2014-03-30 16:11+0200\n"
+"POT-Creation-Date: 2014-03-30 18:55+0200\n"
"PO-Revision-Date: 2014-03-24 14:23+0100\n"
"Last-Translator: Sergio Durigan Junior <sergiosdj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -6767,8 +6767,10 @@ msgstr ""
msgid ""
"default ban mask for commands /ban, /unban and /kickban; variables $nick, "
-"$user and $host are replaced by their values (extracted from \"nick!user@host"
-"\"); this default mask is used only if WeeChat knows the host for the nick"
+"$user, $ident and $host are replaced by their values (extracted from \"nick!"
+"user@host\"); $ident is the same as $user if $user does not start with \"~"
+"\", otherwise it is set to \"*\"; this default mask is used only if WeeChat "
+"knows the host for the nick"
msgstr ""
msgid "when off, colors codes are ignored in incoming messages"
diff --git a/po/ru.po b/po/ru.po
index de7541374..9f87edc7b 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2014-03-30 16:11+0200\n"
+"POT-Creation-Date: 2014-03-30 18:55+0200\n"
"PO-Revision-Date: 2014-03-24 14:23+0100\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -6554,8 +6554,10 @@ msgstr ""
msgid ""
"default ban mask for commands /ban, /unban and /kickban; variables $nick, "
-"$user and $host are replaced by their values (extracted from \"nick!user@host"
-"\"); this default mask is used only if WeeChat knows the host for the nick"
+"$user, $ident and $host are replaced by their values (extracted from \"nick!"
+"user@host\"); $ident is the same as $user if $user does not start with \"~"
+"\", otherwise it is set to \"*\"; this default mask is used only if WeeChat "
+"knows the host for the nick"
msgstr ""
msgid "when off, colors codes are ignored in incoming messages"
diff --git a/po/tr.po b/po/tr.po
index 0d9a9adfc..b587ad980 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2014-03-30 16:11+0200\n"
+"POT-Creation-Date: 2014-03-30 18:55+0200\n"
"PO-Revision-Date: 2014-03-24 14:23+0100\n"
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5834,8 +5834,10 @@ msgstr ""
msgid ""
"default ban mask for commands /ban, /unban and /kickban; variables $nick, "
-"$user and $host are replaced by their values (extracted from \"nick!user@host"
-"\"); this default mask is used only if WeeChat knows the host for the nick"
+"$user, $ident and $host are replaced by their values (extracted from \"nick!"
+"user@host\"); $ident is the same as $user if $user does not start with \"~"
+"\", otherwise it is set to \"*\"; this default mask is used only if WeeChat "
+"knows the host for the nick"
msgstr ""
msgid "when off, colors codes are ignored in incoming messages"
diff --git a/po/weechat.pot b/po/weechat.pot
index 74d3fa91a..7c8814ced 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: 2014-03-30 16:11+0200\n"
+"POT-Creation-Date: 2014-03-30 18:55+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"
@@ -5780,8 +5780,10 @@ msgstr ""
msgid ""
"default ban mask for commands /ban, /unban and /kickban; variables $nick, "
-"$user and $host are replaced by their values (extracted from \"nick!user@host"
-"\"); this default mask is used only if WeeChat knows the host for the nick"
+"$user, $ident and $host are replaced by their values (extracted from \"nick!"
+"user@host\"); $ident is the same as $user if $user does not start with \"~"
+"\", otherwise it is set to \"*\"; this default mask is used only if WeeChat "
+"knows the host for the nick"
msgstr ""
msgid "when off, colors codes are ignored in incoming messages"
diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c
index 0405e27ba..9ad03f6a6 100644
--- a/src/plugins/irc/irc-config.c
+++ b/src/plugins/irc/irc-config.c
@@ -2766,10 +2766,11 @@ irc_config_init ()
irc_config_file, ptr_section,
"ban_mask_default", "string",
N_("default ban mask for commands /ban, /unban and /kickban; variables "
- "$nick, $user and $host are replaced by their values (extracted "
- "from \"nick!user@host\"); this default mask is used only if "
- "WeeChat knows the host for the nick"),
- NULL, 0, 0, "*!$user@$host", NULL, 0, NULL, NULL,
+ "$nick, $user, $ident and $host are replaced by their values "
+ "(extracted from \"nick!user@host\"); $ident is the same as $user if "
+ "$user does not start with \"~\", otherwise it is set to \"*\"; this "
+ "default mask is used only if WeeChat knows the host for the nick"),
+ NULL, 0, 0, "*!$ident@$host", NULL, 0, NULL, NULL,
NULL, NULL, NULL, NULL);
irc_config_network_colors_receive = weechat_config_new_option (
irc_config_file, ptr_section,
diff --git a/src/plugins/irc/irc-nick.c b/src/plugins/irc/irc-nick.c
index 370a275e9..f5c05c1a1 100644
--- a/src/plugins/irc/irc-nick.c
+++ b/src/plugins/irc/irc-nick.c
@@ -1056,7 +1056,7 @@ char *
irc_nick_default_ban_mask (struct t_irc_nick *nick)
{
const char *ptr_ban_mask;
- char *pos_hostname, user[128], *res, *temp;
+ char *pos_hostname, user[128], ident[128], *res, *temp;
if (!nick)
return NULL;
@@ -1073,6 +1073,7 @@ irc_nick_default_ban_mask (struct t_irc_nick *nick)
strncpy (user, nick->host, pos_hostname - nick->host);
user[pos_hostname - nick->host] = '\0';
+ strcpy (ident, (user[0] != '~') ? user : "*");
pos_hostname++;
/* replace nick */
@@ -1088,6 +1089,13 @@ irc_nick_default_ban_mask (struct t_irc_nick *nick)
return NULL;
res = temp;
+ /* replace ident */
+ temp = weechat_string_replace (res, "$ident", ident);
+ free (res);
+ if (!temp)
+ return NULL;
+ res = temp;
+
/* replace hostname */
temp = weechat_string_replace (res, "$host", pos_hostname);
free (res);