summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--doc/de/autogen/user/irc_options.txt5
-rw-r--r--doc/en/autogen/user/irc_options.txt5
-rw-r--r--doc/fr/autogen/user/irc_options.txt5
-rw-r--r--doc/it/autogen/user/irc_options.txt5
-rw-r--r--po/cs.po27
-rw-r--r--po/de.po35
-rw-r--r--po/es.po29
-rw-r--r--po/fr.po34
-rw-r--r--po/hu.po21
-rw-r--r--po/it.po29
-rw-r--r--po/pl.po27
-rw-r--r--po/ru.po21
-rw-r--r--po/weechat.pot21
-rw-r--r--src/plugins/irc/irc-config.c94
-rw-r--r--src/plugins/irc/irc-config.h5
-rw-r--r--src/plugins/irc/irc-nick.c46
-rw-r--r--src/plugins/irc/irc-nick.h2
18 files changed, 295 insertions, 117 deletions
diff --git a/ChangeLog b/ChangeLog
index 613c559a6..b46f8ca63 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -29,6 +29,7 @@ Version 0.3.4 (under dev!)
nicklist_group_get_integer, nicklist_group_get_string,
nicklist_group_get_pointer, nicklist_group_set, nicklist_nick_get_integer,
nicklist_nick_get_string, nicklist_nick_get_pointer, nicklist_nick_set
+* irc: add new option irc.look.nick_color_force
* irc: improve nick prefixes, all modes (even unknown) are used with PREFIX
value from message 005
* irc: add command redirection (task #6703)
diff --git a/doc/de/autogen/user/irc_options.txt b/doc/de/autogen/user/irc_options.txt
index b1af6c36f..cb4223352 100644
--- a/doc/de/autogen/user/irc_options.txt
+++ b/doc/de/autogen/user/irc_options.txt
@@ -188,6 +188,11 @@
** Typ: integer
** Werte: none, next, near_server (Standardwert: `none`)
+* *irc.look.nick_color_force*
+** Beschreibung: `force color for some nicks: hash computed with nickname to find color will not be used for these nicks (format is: "nick1:color1;nick2:color2")`
+** Typ: Zeichenkette
+** Werte: beliebige Zeichenkette (Standardwert: `""`)
+
* *irc.look.nick_color_stop_chars*
** Beschreibung: `Zeichen die genutzt werden sollen damit bei der Generierung der Farbe für einen Nicknamen abgebrochen wird. Es muss mindestens ein Zeichen im Nicknamen enthalten sein der nicht in dieser Liste aufgeführt wird, damit eine Farbe für den Nicknamen erstellt werden kann (Beispiel: Der Nickname lautet "|nick|abwesend" wobei das Zeichen "|" ignoriert werden soll. Die Farbe für den Nicknamen wird nun für "|nick" anstelle von "|nick|abwesend" erstellt).`
** Typ: Zeichenkette
diff --git a/doc/en/autogen/user/irc_options.txt b/doc/en/autogen/user/irc_options.txt
index 2f9be501d..7020680a0 100644
--- a/doc/en/autogen/user/irc_options.txt
+++ b/doc/en/autogen/user/irc_options.txt
@@ -188,6 +188,11 @@
** type: integer
** values: none, next, near_server (default value: `none`)
+* *irc.look.nick_color_force*
+** description: `force color for some nicks: hash computed with nickname to find color will not be used for these nicks (format is: "nick1:color1;nick2:color2")`
+** type: string
+** values: any string (default value: `""`)
+
* *irc.look.nick_color_stop_chars*
** description: `chars used to stop in nick when computing color with letters of nick (at least one char outside this list must be in string before stopping) (example: nick "|nick|away" with "|" in chars will return color of nick "|nick")`
** type: string
diff --git a/doc/fr/autogen/user/irc_options.txt b/doc/fr/autogen/user/irc_options.txt
index f11270de6..6dfabc4e9 100644
--- a/doc/fr/autogen/user/irc_options.txt
+++ b/doc/fr/autogen/user/irc_options.txt
@@ -188,6 +188,11 @@
** type: entier
** valeurs: none, next, near_server (valeur par défaut: `none`)
+* *irc.look.nick_color_force*
+** description: `force la couleur pour certains pseudos: le hash calculé avec le pseudo pour trouver la couleur ne sera pas utilisé pour ces pseudos (le format est: "pseudo1:couleur1;pseudo2:couleur2")`
+** type: chaîne
+** valeurs: toute chaîne (valeur par défaut: `""`)
+
* *irc.look.nick_color_stop_chars*
** description: `caractères utilisés pour l'arrêt dans le pseudo lors du calcul de la couleur avec les lettres du pseudo (au moins un caractère en dehors de cette liste doit être dans la chaîne avant de s'arrêter) (exemple: le pseudo "|nick|away" avec "|" dans les caractères retournera la couleur du pseudo "|nick")`
** type: chaîne
diff --git a/doc/it/autogen/user/irc_options.txt b/doc/it/autogen/user/irc_options.txt
index ffb18a0ab..114c06bc3 100644
--- a/doc/it/autogen/user/irc_options.txt
+++ b/doc/it/autogen/user/irc_options.txt
@@ -188,6 +188,11 @@
** tipo: intero
** valori: none, next, near_server (valore predefinito: `none`)
+* *irc.look.nick_color_force*
+** descrizione: `force color for some nicks: hash computed with nickname to find color will not be used for these nicks (format is: "nick1:color1;nick2:color2")`
+** tipo: stringa
+** valori: qualsiasi stringa (valore predefinito: `""`)
+
* *irc.look.nick_color_stop_chars*
** descrizione: `caratteri usati per fermare il calcolo del colore con le lettere del nick (almeno un carattere al di fuori di questa lista deve essere nella lista prima di fermarlo) (esempio: nick "|nick|away" con "|" nei caratteri restituisce il colore del nick "|nick")`
** tipo: stringa
diff --git a/po/cs.po b/po/cs.po
index 0b4bac653..8d9bd350f 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-10-23 09:47+0200\n"
+"POT-Creation-Date: 2010-10-29 22:58+0200\n"
"PO-Revision-Date: 2010-08-07 10:46+0200\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4556,6 +4556,21 @@ msgstr "text pro zobrazení před přezdívkou v okně rozhovoru"
msgid "text to display after nick in chat window"
msgstr "text pro zobrazení za přezdívkou v okně rozhovoru"
+msgid ""
+"force color for some nicks: hash computed with nickname to find color will "
+"not be used for these nicks (format is: \"nick1:color1;nick2:color2\")"
+msgstr ""
+
+msgid ""
+"chars used to stop in nick when computing color with letters of nick (at "
+"least one char outside this list must be in string before stopping) "
+"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick "
+"\"|nick\")"
+msgstr ""
+"znaky zastavující výpočet barvy přezdívky ze znaků přezdívky (alespoň jeden "
+"mimo tento list musí být v řetězci před zastavením) (example: přezdívka \"|"
+"nick|away\" s \"|\" ve znacích vrátí barvu přezdívky \"|nick\")"
+
msgid "smart completion for nicks (completes first with last speakers)"
msgstr "chytré doplňování přezdívek (doplňovat posledně mluvící jako první)"
@@ -4635,16 +4650,6 @@ msgstr ""
"soukromý buffer není nalezen"
msgid ""
-"chars used to stop in nick when computing color with letters of nick (at "
-"least one char outside this list must be in string before stopping) "
-"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick "
-"\"|nick\")"
-msgstr ""
-"znaky zastavující výpočet barvy přezdívky ze znaků přezdívky (alespoň jeden "
-"mimo tento list musí být v řetězci před zastavením) (example: přezdívka \"|"
-"nick|away\" s \"|\" ve znacích vrátí barvu přezdívky \"|nick\")"
-
-msgid ""
"display notices as private messages (if auto, use private buffer if found)"
msgstr ""
"zobrazovat upozornění jako soukromé zprávy (pokud je automaticky, použije se "
diff --git a/po/de.po b/po/de.po
index 100c36730..b70620fde 100644
--- a/po/de.po
+++ b/po/de.po
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.3-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-10-23 09:47+0200\n"
+"POT-Creation-Date: 2010-10-29 22:58+0200\n"
"PO-Revision-Date: 2010-10-13 19:53+0200\n"
"Last-Translator: Nils G.\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4747,6 +4747,25 @@ msgstr "Text, der im Chatfenster vor dem Nickname erscheinen soll"
msgid "text to display after nick in chat window"
msgstr "Text, der im Chatfenster nach dem Nickname erscheinen soll"
+msgid ""
+"force color for some nicks: hash computed with nickname to find color will "
+"not be used for these nicks (format is: \"nick1:color1;nick2:color2\")"
+msgstr ""
+
+msgid ""
+"chars used to stop in nick when computing color with letters of nick (at "
+"least one char outside this list must be in string before stopping) "
+"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick "
+"\"|nick\")"
+msgstr ""
+"Zeichen die genutzt werden sollen damit bei der Generierung der Farbe für "
+"einen Nicknamen abgebrochen wird. Es muss mindestens ein Zeichen im "
+"Nicknamen enthalten sein der nicht in dieser Liste aufgeführt wird, damit "
+"eine Farbe für den Nicknamen erstellt werden kann (Beispiel: Der Nickname "
+"lautet \"|nick|abwesend\" wobei das Zeichen \"|\" ignoriert werden soll. Die "
+"Farbe für den Nicknamen wird nun für \"|nick\" anstelle von \"|nick|abwesend"
+"\" erstellt)."
+
msgid "smart completion for nicks (completes first with last speakers)"
msgstr ""
"Intelligente Vervollständigung von Nicknamen (vervollständigt zuerst den "
@@ -4828,20 +4847,6 @@ msgstr ""
"Buffer nicht gefunden wird."
msgid ""
-"chars used to stop in nick when computing color with letters of nick (at "
-"least one char outside this list must be in string before stopping) "
-"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick "
-"\"|nick\")"
-msgstr ""
-"Zeichen die genutzt werden sollen damit bei der Generierung der Farbe für "
-"einen Nicknamen abgebrochen wird. Es muss mindestens ein Zeichen im "
-"Nicknamen enthalten sein der nicht in dieser Liste aufgeführt wird, damit "
-"eine Farbe für den Nicknamen erstellt werden kann (Beispiel: Der Nickname "
-"lautet \"|nick|abwesend\" wobei das Zeichen \"|\" ignoriert werden soll. Die "
-"Farbe für den Nicknamen wird nun für \"|nick\" anstelle von \"|nick|abwesend"
-"\" erstellt)."
-
-msgid ""
"display notices as private messages (if auto, use private buffer if found)"
msgstr ""
"Zeigt Notizen als private Nachricht an (wird die \"auto\" Option verwendet "
diff --git a/po/es.po b/po/es.po
index 1f59229ba..d2d111d1e 100644
--- a/po/es.po
+++ b/po/es.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-10-23 09:47+0200\n"
+"POT-Creation-Date: 2010-10-29 22:58+0200\n"
"PO-Revision-Date: 2010-08-07 10:46+0200\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4610,6 +4610,22 @@ msgstr "texto a mostrar antes del apodo en la ventana de charla"
msgid "text to display after nick in chat window"
msgstr "texto a mostrar tras el apodo en la ventana de charla"
+msgid ""
+"force color for some nicks: hash computed with nickname to find color will "
+"not be used for these nicks (format is: \"nick1:color1;nick2:color2\")"
+msgstr ""
+
+msgid ""
+"chars used to stop in nick when computing color with letters of nick (at "
+"least one char outside this list must be in string before stopping) "
+"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick "
+"\"|nick\")"
+msgstr ""
+"caracteres para usar como delimitador cuando se computa el color de un apodo "
+"(al menos un carácter fuera de esta lista debe estar en el apodo) (ejemplo: "
+"el apodo \"|apodo|ausente\" con \"|\" en esta opción retornaría el color del "
+"apodo \"|apodo\")"
+
msgid "smart completion for nicks (completes first with last speakers)"
msgstr ""
"autocompletar inteligente para apodos (completa primero con los últimos que "
@@ -4692,17 +4708,6 @@ msgstr ""
"privado y no hay un buffer privado disponible"
msgid ""
-"chars used to stop in nick when computing color with letters of nick (at "
-"least one char outside this list must be in string before stopping) "
-"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick "
-"\"|nick\")"
-msgstr ""
-"caracteres para usar como delimitador cuando se computa el color de un apodo "
-"(al menos un carácter fuera de esta lista debe estar en el apodo) (ejemplo: "
-"el apodo \"|apodo|ausente\" con \"|\" en esta opción retornaría el color del "
-"apodo \"|apodo\")"
-
-msgid ""
"display notices as private messages (if auto, use private buffer if found)"
msgstr ""
"mostrar avisos como mensajes privados (si es auto, usa un buffer privado si "
diff --git a/po/fr.po b/po/fr.po
index ddaa477fc..718d7e93c 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-10-23 09:47+0200\n"
-"PO-Revision-Date: 2010-10-23 09:02+0200\n"
+"POT-Creation-Date: 2010-10-29 22:58+0200\n"
+"PO-Revision-Date: 2010-10-29 22:59+0200\n"
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: French\n"
@@ -4668,6 +4668,25 @@ msgstr "texte à afficher avant le pseudo dans la fenêtre de discussion"
msgid "text to display after nick in chat window"
msgstr "texte à afficher après le pseudo dans la fenêtre de discussion"
+msgid ""
+"force color for some nicks: hash computed with nickname to find color will "
+"not be used for these nicks (format is: \"nick1:color1;nick2:color2\")"
+msgstr ""
+"force la couleur pour certains pseudos: le hash calculé avec le pseudo pour "
+"trouver la couleur ne sera pas utilisé pour ces pseudos (le format est: "
+"\"pseudo1:couleur1;pseudo2:couleur2\")"
+
+msgid ""
+"chars used to stop in nick when computing color with letters of nick (at "
+"least one char outside this list must be in string before stopping) "
+"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick "
+"\"|nick\")"
+msgstr ""
+"caractères utilisés pour l'arrêt dans le pseudo lors du calcul de la couleur "
+"avec les lettres du pseudo (au moins un caractère en dehors de cette liste "
+"doit être dans la chaîne avant de s'arrêter) (exemple: le pseudo \"|nick|away"
+"\" avec \"|\" dans les caractères retournera la couleur du pseudo \"|nick\")"
+
msgid "smart completion for nicks (completes first with last speakers)"
msgstr ""
"complétion intelligente pour les pseudos (complète d'abord avec les "
@@ -4750,17 +4769,6 @@ msgstr ""
"\"private\" et que le tampon privé n'est pas trouvé"
msgid ""
-"chars used to stop in nick when computing color with letters of nick (at "
-"least one char outside this list must be in string before stopping) "
-"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick "
-"\"|nick\")"
-msgstr ""
-"caractères utilisés pour l'arrêt dans le pseudo lors du calcul de la couleur "
-"avec les lettres du pseudo (au moins un caractère en dehors de cette liste "
-"doit être dans la chaîne avant de s'arrêter) (exemple: le pseudo \"|nick|away"
-"\" avec \"|\" dans les caractères retournera la couleur du pseudo \"|nick\")"
-
-msgid ""
"display notices as private messages (if auto, use private buffer if found)"
msgstr ""
"afficher les notices comme des messages privés (si auto, utilise le tampon "
diff --git a/po/hu.po b/po/hu.po
index 2d1b34538..ff772943f 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-10-23 09:47+0200\n"
+"POT-Creation-Date: 2010-10-29 22:58+0200\n"
"PO-Revision-Date: 2010-08-07 10:46+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4337,6 +4337,18 @@ msgstr "a név előtt megjelenítendő szöveg a beszédablakban"
msgid "text to display after nick in chat window"
msgstr "a név után megjelenítendő szöveg a beszédablakban"
+msgid ""
+"force color for some nicks: hash computed with nickname to find color will "
+"not be used for these nicks (format is: \"nick1:color1;nick2:color2\")"
+msgstr ""
+
+msgid ""
+"chars used to stop in nick when computing color with letters of nick (at "
+"least one char outside this list must be in string before stopping) "
+"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick "
+"\"|nick\")"
+msgstr ""
+
#, fuzzy
msgid "smart completion for nicks (completes first with last speakers)"
msgstr "okos névkiegészítés (először az utolsó partnerre egészít ki)"
@@ -4409,13 +4421,6 @@ msgid ""
"private buffer is not found"
msgstr ""
-msgid ""
-"chars used to stop in nick when computing color with letters of nick (at "
-"least one char outside this list must be in string before stopping) "
-"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick "
-"\"|nick\")"
-msgstr ""
-
#, fuzzy
msgid ""
"display notices as private messages (if auto, use private buffer if found)"
diff --git a/po/it.po b/po/it.po
index 4cea2f0fb..88367a445 100644
--- a/po/it.po
+++ b/po/it.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-10-23 09:47+0200\n"
+"POT-Creation-Date: 2010-10-29 22:58+0200\n"
"PO-Revision-Date: 2010-10-10 19:30+0200\n"
"Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4623,6 +4623,22 @@ msgstr "testo da visualizzare prima del nick nella finestra di chat"
msgid "text to display after nick in chat window"
msgstr "testo da visualizzare dopo il nick nella finestra di chat"
+msgid ""
+"force color for some nicks: hash computed with nickname to find color will "
+"not be used for these nicks (format is: \"nick1:color1;nick2:color2\")"
+msgstr ""
+
+msgid ""
+"chars used to stop in nick when computing color with letters of nick (at "
+"least one char outside this list must be in string before stopping) "
+"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick "
+"\"|nick\")"
+msgstr ""
+"caratteri usati per fermare il calcolo del colore con le lettere del nick "
+"(almeno un carattere al di fuori di questa lista deve essere nella lista "
+"prima di fermarlo) (esempio: nick \"|nick|away\" con \"|\" nei caratteri "
+"restituisce il colore del nick \"|nick\")"
+
msgid "smart completion for nicks (completes first with last speakers)"
msgstr ""
"completamento intelligente per i nick (usando prima chi ha parlato per "
@@ -4705,17 +4721,6 @@ msgstr ""
"destinazione è privata ed il buffer privato non viene trovato"
msgid ""
-"chars used to stop in nick when computing color with letters of nick (at "
-"least one char outside this list must be in string before stopping) "
-"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick "
-"\"|nick\")"
-msgstr ""
-"caratteri usati per fermare il calcolo del colore con le lettere del nick "
-"(almeno un carattere al di fuori di questa lista deve essere nella lista "
-"prima di fermarlo) (esempio: nick \"|nick|away\" con \"|\" nei caratteri "
-"restituisce il colore del nick \"|nick\")"
-
-msgid ""
"display notices as private messages (if auto, use private buffer if found)"
msgstr ""
"visualizza notifiche come messaggi privati (se automatico, utilizza il "
diff --git a/po/pl.po b/po/pl.po
index f157dcf17..5ecc1abd0 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-10-23 09:47+0200\n"
+"POT-Creation-Date: 2010-10-29 22:58+0200\n"
"PO-Revision-Date: 2010-08-07 10:46+0200\n"
"Last-Translator: Krzysztof Koroscik <soltys@szluug.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4593,6 +4593,21 @@ msgstr "teks wyświetlany przed nickiem w oknie rozmowy"
msgid "text to display after nick in chat window"
msgstr "teks wyświetlany za nickiem w oknie rozmowy"
+msgid ""
+"force color for some nicks: hash computed with nickname to find color will "
+"not be used for these nicks (format is: \"nick1:color1;nick2:color2\")"
+msgstr ""
+
+msgid ""
+"chars used to stop in nick when computing color with letters of nick (at "
+"least one char outside this list must be in string before stopping) "
+"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick "
+"\"|nick\")"
+msgstr ""
+"znaki używane do zatrzymania odczytywania koloru nicka (przynajmniej jeden "
+"znak poza tą listą musi się znajdować przed zatrzymaniem) (przykład: nick \"|"
+"nick|away\" ze znakami \"|\" zwróci kolor nicka \"|nick\")"
+
msgid "smart completion for nicks (completes first with last speakers)"
msgstr ""
"inteligentne dopełnianie nicków (dopełnia najpierw z ostatnim aktywnym)"
@@ -4672,16 +4687,6 @@ msgstr ""
"odnaleziono tego prywatnego bufora"
msgid ""
-"chars used to stop in nick when computing color with letters of nick (at "
-"least one char outside this list must be in string before stopping) "
-"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick "
-"\"|nick\")"
-msgstr ""
-"znaki używane do zatrzymania odczytywania koloru nicka (przynajmniej jeden "
-"znak poza tą listą musi się znajdować przed zatrzymaniem) (przykład: nick \"|"
-"nick|away\" ze znakami \"|\" zwróci kolor nicka \"|nick\")"
-
-msgid ""
"display notices as private messages (if auto, use private buffer if found)"
msgstr ""
"wyświetlaj powiadomienia jako prywatne wiadomości (jeśli auto, użwa "
diff --git a/po/ru.po b/po/ru.po
index 3246c7862..952157149 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.4-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-10-23 09:47+0200\n"
+"POT-Creation-Date: 2010-10-29 22:58+0200\n"
"PO-Revision-Date: 2010-08-07 10:46+0200\n"
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4344,6 +4344,18 @@ msgstr "текст, который отображать до ника в окн
msgid "text to display after nick in chat window"
msgstr "текст, который отображать после ника в окне чата"
+msgid ""
+"force color for some nicks: hash computed with nickname to find color will "
+"not be used for these nicks (format is: \"nick1:color1;nick2:color2\")"
+msgstr ""
+
+msgid ""
+"chars used to stop in nick when computing color with letters of nick (at "
+"least one char outside this list must be in string before stopping) "
+"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick "
+"\"|nick\")"
+msgstr ""
+
#, fuzzy
msgid "smart completion for nicks (completes first with last speakers)"
msgstr "умное дополнение ников (начинает перебор с последних собеседников)"
@@ -4416,13 +4428,6 @@ msgid ""
"private buffer is not found"
msgstr ""
-msgid ""
-"chars used to stop in nick when computing color with letters of nick (at "
-"least one char outside this list must be in string before stopping) "
-"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick "
-"\"|nick\")"
-msgstr ""
-
#, fuzzy
msgid ""
"display notices as private messages (if auto, use private buffer if found)"
diff --git a/po/weechat.pot b/po/weechat.pot
index 007bc330e..fc43d6ac8 100644
--- a/po/weechat.pot
+++ b/po/weechat.pot
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2010-10-23 09:47+0200\n"
+"POT-Creation-Date: 2010-10-29 22:58+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -3703,6 +3703,18 @@ msgstr ""
msgid "text to display after nick in chat window"
msgstr ""
+msgid ""
+"force color for some nicks: hash computed with nickname to find color will "
+"not be used for these nicks (format is: \"nick1:color1;nick2:color2\")"
+msgstr ""
+
+msgid ""
+"chars used to stop in nick when computing color with letters of nick (at "
+"least one char outside this list must be in string before stopping) "
+"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick "
+"\"|nick\")"
+msgstr ""
+
msgid "smart completion for nicks (completes first with last speakers)"
msgstr ""
@@ -3770,13 +3782,6 @@ msgid ""
msgstr ""
msgid ""
-"chars used to stop in nick when computing color with letters of nick (at "
-"least one char outside this list must be in string before stopping) "
-"(example: nick \"|nick|away\" with \"|\" in chars will return color of nick "
-"\"|nick\")"
-msgstr ""
-
-msgid ""
"display notices as private messages (if auto, use private buffer if found)"
msgstr ""
diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c
index c7a48cc97..f64048ab4 100644
--- a/src/plugins/irc/irc-config.c
+++ b/src/plugins/irc/irc-config.c
@@ -56,6 +56,8 @@ struct t_config_option *irc_config_look_new_channel_position;
struct t_config_option *irc_config_look_new_pv_position;
struct t_config_option *irc_config_look_nick_prefix;
struct t_config_option *irc_config_look_nick_suffix;
+struct t_config_option *irc_config_look_nick_color_force;
+struct t_config_option *irc_config_look_nick_color_stop_chars;
struct t_config_option *irc_config_look_nick_completion_smart;
struct t_config_option *irc_config_look_display_away;
struct t_config_option *irc_config_look_display_ctcp_blocked;
@@ -76,7 +78,6 @@ struct t_config_option *irc_config_look_hide_nickserv_pwd;
struct t_config_option *irc_config_look_highlight_tags;
struct t_config_option *irc_config_look_item_display_server;
struct t_config_option *irc_config_look_msgbuffer_fallback;
-struct t_config_option *irc_config_look_nick_color_stop_chars;
struct t_config_option *irc_config_look_notice_as_pv;
struct t_config_option *irc_config_look_part_closes_buffer;
struct t_config_option *irc_config_look_raw_messages;
@@ -121,6 +122,7 @@ struct t_config_option *irc_config_network_send_unknown_commands;
struct t_config_option *irc_config_server_default[IRC_SERVER_NUM_OPTIONS];
struct t_hook *hook_config_color_nicks_number = NULL;
+struct t_hashtable *irc_config_hashtable_nick_color_force = NULL;
int irc_config_write_temp_servers = 0;
@@ -171,7 +173,9 @@ irc_config_compute_nick_colors ()
for (ptr_nick = ptr_channel->nicks; ptr_nick;
ptr_nick = ptr_nick->next_nick)
{
- ptr_nick->color = irc_nick_find_color (ptr_nick->name);
+ if (ptr_nick->color)
+ free (ptr_nick->color);
+ ptr_nick->color = strdup (irc_nick_find_color (ptr_nick->name));
}
}
}
@@ -363,6 +367,54 @@ irc_config_change_look_highlight_tags (void *data,
}
/*
+ * irc_config_change_look_nick_color_force: called when the "nick color force"
+ * option is changed
+ */
+
+void
+irc_config_change_look_nick_color_force (void *data,
+ struct t_config_option *option)
+{
+ char **items, *pos;
+ int num_items, i;
+
+ /* make C compiler happy */
+ (void) data;
+ (void) option;
+
+ if (!irc_config_hashtable_nick_color_force)
+ {
+ irc_config_hashtable_nick_color_force = weechat_hashtable_new (8,
+ WEECHAT_HASHTABLE_STRING,
+ WEECHAT_HASHTABLE_STRING,
+ NULL,
+ NULL);
+ }
+ else
+ weechat_hashtable_remove_all (irc_config_hashtable_nick_color_force);
+
+ items = weechat_string_split (weechat_config_string (irc_config_look_nick_color_force),
+ ";", 0, 0, &num_items);
+ if (items)
+ {
+ for (i = 0; i < num_items; i++)
+ {
+ pos = strchr (items[i], ':');
+ if (pos)
+ {
+ pos[0] = '\0';
+ weechat_hashtable_set (irc_config_hashtable_nick_color_force,
+ items[i],
+ pos + 1);
+ }
+ }
+ weechat_string_free_split (items);
+ }
+
+ irc_config_compute_nick_colors ();
+}
+
+/*
* irc_config_change_look_nick_color_stop_chars: called when the "nick color
* stop chars" option is changed
*/
@@ -1591,6 +1643,12 @@ irc_config_init ()
{
struct t_config_section *ptr_section;
+ irc_config_hashtable_nick_color_force = weechat_hashtable_new (8,
+ WEECHAT_HASHTABLE_STRING,
+ WEECHAT_HASHTABLE_STRING,
+ NULL,
+ NULL);
+
irc_config_file = weechat_config_new (IRC_CONFIG_NAME,
&irc_config_reload, NULL);
if (!irc_config_file)
@@ -1655,6 +1713,23 @@ irc_config_init ()
"nick_suffix", "string",
N_("text to display after nick in chat window"),
NULL, 0, 0, "", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_nick_color_force = weechat_config_new_option (
+ irc_config_file, ptr_section,
+ "nick_color_force", "string",
+ N_("force color for some nicks: hash computed with nickname "
+ "to find color will not be used for these nicks (format is: "
+ "\"nick1:color1;nick2:color2\")"),
+ NULL, 0, 0, "", NULL, 0, NULL, NULL,
+ &irc_config_change_look_nick_color_force, NULL, NULL, NULL);
+ irc_config_look_nick_color_stop_chars = weechat_config_new_option (
+ irc_config_file, ptr_section,
+ "nick_color_stop_chars", "string",
+ N_("chars used to stop in nick when computing color with letters of "
+ "nick (at least one char outside this list must be in string before "
+ "stopping) (example: nick \"|nick|away\" with \"|\" in chars will "
+ "return color of nick \"|nick\")"),
+ NULL, 0, 0, "_|[", NULL, 0, NULL, NULL,
+ &irc_config_change_look_nick_color_stop_chars, NULL, NULL, NULL);
irc_config_look_nick_completion_smart = weechat_config_new_option (
irc_config_file, ptr_section,
"nick_completion_smart", "integer",
@@ -1778,15 +1853,6 @@ irc_config_init ()
"private and that private buffer is not found"),
"current|server", 0, 0, "current", NULL, 0, NULL, NULL,
NULL, NULL, NULL, NULL);
- irc_config_look_nick_color_stop_chars = weechat_config_new_option (
- irc_config_file, ptr_section,
- "nick_color_stop_chars", "string",
- N_("chars used to stop in nick when computing color with letters of "
- "nick (at least one char outside this list must be in string before "
- "stopping) (example: nick \"|nick|away\" with \"|\" in chars will "
- "return color of nick \"|nick\")"),
- NULL, 0, 0, "_|[", NULL, 0, NULL, NULL,
- &irc_config_change_look_nick_color_stop_chars, NULL, NULL, NULL);
irc_config_look_notice_as_pv = weechat_config_new_option (
irc_config_file, ptr_section,
"notice_as_pv", "integer",
@@ -2121,4 +2187,10 @@ irc_config_free ()
weechat_unhook (hook_config_color_nicks_number);
hook_config_color_nicks_number = NULL;
}
+
+ if (irc_config_hashtable_nick_color_force)
+ {
+ weechat_hashtable_free (irc_config_hashtable_nick_color_force);
+ irc_config_hashtable_nick_color_force = NULL;
+ }
}
diff --git a/src/plugins/irc/irc-config.h b/src/plugins/irc/irc-config.h
index 9a85862ce..043a56129 100644
--- a/src/plugins/irc/irc-config.h
+++ b/src/plugins/irc/irc-config.h
@@ -82,6 +82,8 @@ extern struct t_config_option *irc_config_look_new_channel_position;
extern struct t_config_option *irc_config_look_new_pv_position;
extern struct t_config_option *irc_config_look_nick_prefix;
extern struct t_config_option *irc_config_look_nick_suffix;
+extern struct t_config_option *irc_config_look_nick_color_force;
+extern struct t_config_option *irc_config_look_nick_color_stop_chars;
extern struct t_config_option *irc_config_look_nick_completion_smart;
extern struct t_config_option *irc_config_look_display_away;
extern struct t_config_option *irc_config_look_display_ctcp_blocked;
@@ -102,7 +104,6 @@ extern struct t_config_option *irc_config_look_hide_nickserv_pwd;
extern struct t_config_option *irc_config_look_highlight_tags;
extern struct t_config_option *irc_config_look_item_display_server;
extern struct t_config_option *irc_config_look_msgbuffer_fallback;
-extern struct t_config_option *irc_config_look_nick_color_stop_chars;
extern struct t_config_option *irc_config_look_notice_as_pv;
extern struct t_config_option *irc_config_look_part_closes_buffer;
extern struct t_config_option *irc_config_look_raw_messages;
@@ -140,6 +141,8 @@ extern struct t_config_option *irc_config_network_send_unknown_commands;
extern struct t_config_option *irc_config_server_default[];
+extern struct t_hashtable *irc_config_hashtable_nick_color_force;
+
extern void irc_config_server_change_cb (void *data,
struct t_config_option *option);
struct t_config_option *irc_config_server_new_option (struct t_config_file *config_file,
diff --git a/src/plugins/irc/irc-nick.c b/src/plugins/irc/irc-nick.c
index f368aab90..b350616cb 100644
--- a/src/plugins/irc/irc-nick.c
+++ b/src/plugins/irc/irc-nick.c
@@ -162,15 +162,32 @@ irc_nick_find_color (const char *nickname)
{
int color;
char *nickname2, color_name[64];
+ const char *forced_color;
nickname2 = irc_nick_strdup_for_color (nickname);
+
+ /* look if color is forced */
+ forced_color = weechat_hashtable_get (irc_config_hashtable_nick_color_force,
+ (nickname2) ? nickname2 : nickname);
+ if (forced_color)
+ {
+ forced_color = weechat_color (forced_color);
+ if (forced_color && forced_color[0])
+ {
+ if (nickname2)
+ free (nickname2);
+ return forced_color;
+ }
+ }
+
+ /* hash nickname to get color */
color = irc_nick_hash_color ((nickname2) ? nickname2 : nickname);
if (nickname2)
free (nickname2);
+ /* return color */
snprintf (color_name, sizeof (color_name),
"chat_nick_color%02d", color + 1);
-
return weechat_color (color_name);
}
@@ -184,15 +201,28 @@ irc_nick_find_color_name (const char *nickname)
{
int color;
char *nickname2, color_name[128];
+ const char *forced_color;
nickname2 = irc_nick_strdup_for_color (nickname);
+
+ /* look if color is forced */
+ forced_color = weechat_hashtable_get (irc_config_hashtable_nick_color_force,
+ (nickname2) ? nickname2 : nickname);
+ if (forced_color)
+ {
+ if (nickname2)
+ free (nickname2);
+ return forced_color;
+ }
+
+ /* hash nickname to get color */
color = irc_nick_hash_color ((nickname2) ? nickname2 : nickname);
if (nickname2)
free (nickname2);
+ /* return color name */
snprintf (color_name, sizeof (color_name),
"weechat.color.chat_nick_color%02d", color + 1);
-
return weechat_config_color (weechat_config_get (color_name));
}
@@ -493,9 +523,9 @@ irc_nick_new (struct t_irc_server *server, struct t_irc_channel *channel,
irc_nick_set_prefixes (server, new_nick, prefixes);
new_nick->away = away;
if (weechat_strcasecmp (new_nick->name, server->nick) == 0)
- new_nick->color = IRC_COLOR_CHAT_NICK_SELF;
+ new_nick->color = strdup (IRC_COLOR_CHAT_NICK_SELF);
else
- new_nick->color = irc_nick_find_color (new_nick->name);
+ new_nick->color = strdup (irc_nick_find_color (new_nick->name));
/* add nick to end of list */
new_nick->prev_nick = channel->last_nick;
@@ -539,10 +569,12 @@ irc_nick_change (struct t_irc_server *server, struct t_irc_channel *channel,
if (nick->name)
free (nick->name);
nick->name = strdup (new_nick);
+ if (nick->color)
+ free (nick->color);
if (nick_is_me)
- nick->color = IRC_COLOR_CHAT_NICK_SELF;
+ nick->color = strdup (IRC_COLOR_CHAT_NICK_SELF);
else
- nick->color = irc_nick_find_color (nick->name);
+ nick->color = strdup (irc_nick_find_color (nick->name));
/* add nick in nicklist */
irc_nick_nicklist_add (server, channel, nick);
@@ -616,6 +648,8 @@ irc_nick_free (struct t_irc_server *server, struct t_irc_channel *channel,
free (nick->host);
if (nick->prefixes)
free (nick->prefixes);
+ if (nick->color)
+ free (nick->color);
free (nick);
diff --git a/src/plugins/irc/irc-nick.h b/src/plugins/irc/irc-nick.h
index d1d787652..ed283da96 100644
--- a/src/plugins/irc/irc-nick.h
+++ b/src/plugins/irc/irc-nick.h
@@ -36,7 +36,7 @@ struct t_irc_nick
char prefix[2]; /* current prefix (higher prefix set in */
/* prefixes) */
int away; /* 1 if nick is away */
- const char *color; /* color for nickname in chat window */
+ char *color; /* color for nickname in chat window */
struct t_irc_nick *prev_nick; /* link to previous nick on channel */
struct t_irc_nick *next_nick; /* link to next nick on channel */
};