core: move nick coloring from irc plugin to core (closes #262)

Options moved from irc.conf to weechat.conf:

* "irc.look.nick_color_force" moved to "weechat.look.nick_color_force"
* "irc.look.nick_color_hash" moved to "weechat.look.nick_color_hash"
* "irc.look.nick_color_stop_chars" moved to
  "weechat.look.nick_color_stop_chars"

New info (for API function "info_get"):

* "nick_color" (replaces "irc_nick_color")
* "nick_color_name" (replaced "irc_nick_color_name")

Info "irc_nick_color" and "irc_nick_color_name" are now deprecated.

And a bug has been fixed in nick coloring: stop chars are removed before
looking at a forced color.
v2.8-utf8proc
Sébastien Helleu 2016-04-05 07:56:43 +02:00
parent e80ff72b97
commit fabd48cc6c
49 changed files with 1196 additions and 869 deletions

View File

@ -21,6 +21,13 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
[[1.5_features]]
=== New features
* core: fix nick coloring when stop chars and a forced color are used: first
remove chars then look for forced color
* core: move nick coloring from irc plugin to core, move options
"irc.look.nick_color_force", "irc.look.nick_color_hash" and
"irc.look.nick_color_stop_chars" to core, add info "nick_color" and
"nick_color_name", deprecate info "irc_nick_color" and "irc_color_name"
(issue #262)
* core: move irc bar item "away" to core, move options
"irc.look.item_away_message" and "irc.color.item_away" to core (issue #692)
* api: add pointer in callbacks used in scripting API (issue #406)

View File

@ -20,6 +20,27 @@ https://weechat.org/files/changelog/ChangeLog-devel.html[ChangeLog]
[[1.5]]
== Version 1.5 (under dev)
[[1.5_nick_coloring]]
=== Nick coloring moved to core
The nick coloring feature has been moved from irc plugin to core.
Two options have been moved from irc plugin (irc.conf) to core (weechat.conf),
and you must set new value if you customized them:
* 'irc.look.nick_color_force' moved to 'weechat.look.nick_color_force'
* 'irc.look.nick_color_hash' moved to 'weechat.look.nick_color_hash'
* 'irc.look.nick_color_stop_chars' moved to 'weechat.look.nick_color_stop_chars'
The following info names (used by API function "info_get") are renamed as well:
* 'irc_nick_color' renamed to 'nick_color'
* 'irc_nick_color_name' renamed to 'nick_color_name'
[NOTE]
The old info 'irc_nick_color' and 'irc_nick_color_name' are kept for
compatibility (especially scripts) and will be removed in an upcoming release.
[[1.5_callbacks_pointer]]
=== Pointer in callbacks

View File

@ -18,9 +18,9 @@
| irc | irc_nick | aktuellen Nicknamen für den Server erhalten | Servername
| irc | irc_nick_color | zeigt Farbecode des Nick | Nickname
| irc | irc_nick_color | get nick color code (*deprecated* since version 1.5, replaced by "nick_color") | Nickname
| irc | irc_nick_color_name | zeigt Farbnamen des Nick | Nickname
| irc | irc_nick_color_name | get nick color name (*deprecated* since version 1.5, replaced by "nick_color_name") | Nickname
| irc | irc_nick_from_host | Nicknamen des IRC-Hosts erhalten | IRC host (in der Form `:nick!name@server.com`)
@ -54,6 +54,10 @@
| weechat | locale | Lokalisation welche für die übersetzten Nachrichten verwendet werden soll | -
| weechat | nick_color | zeigt Farbecode des Nick | Nickname
| weechat | nick_color_name | zeigt Farbnamen des Nick | Nickname
| weechat | term_height | Höhe des Terminals | -
| weechat | term_width | Breite des Terminals | -

View File

@ -232,21 +232,6 @@
** Typ: integer
** Werte: none, next, near_server (Standardwert: `none`)
* [[option_irc.look.nick_color_force]] *irc.look.nick_color_force*
** Beschreibung: `erzwingt für einen Nick eine spezielle Farbe. Die standardmäßig, mittels Streuwertfunktion aus dem Nicknamen, generierte Farbe findet für diese Nicks keine Anwendung (Format:"Nick1:Farbe1;Nick2:Farbe2"). Zuerst wird beim Namen des Nick nach Groß- und Kleinschreibung unterschieden. Sollte der Nick nicht gefunden werden findet keine Unterscheidung mehr statt. Somit ist es möglich die Nicks, für diese Einstellung, ausschließlich in Kleinschrift aufzuführen`
** Typ: Zeichenkette
** Werte: beliebige Zeichenkette (Standardwert: `""`)
* [[option_irc.look.nick_color_hash]] *irc.look.nick_color_hash*
** Beschreibung: `Gibt an welcher Hash-Algorithmus zur Farbauswahl für Nicks genutzt werden soll: djb2 = Variante des djb2 (Position der Buchstaben innerhalb des Nicks werden berücksichtigt: Anagramme eines Nick erhalten eine andere Farbe), sum = hier ist nur die Anzahl der Buchstaben maßgeblich`
** Typ: integer
** Werte: djb2, sum (Standardwert: `sum`)
* [[option_irc.look.nick_color_stop_chars]] *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
** Werte: beliebige Zeichenkette (Standardwert: `"_|["`)
* [[option_irc.look.nick_completion_smart]] *irc.look.nick_completion_smart*
** Beschreibung: `intelligente Vervollständigung für Nicks (es wird zuerst mit den letzten Rednern vervollständigt): speakers = alle Redner (einschließlich Highlights), speakers_highlight = nur Redner die eine Highlight Nachricht geschrieben haben`
** Typ: integer

View File

@ -742,6 +742,21 @@
** Typ: integer
** Werte: 1 .. 10000 (Standardwert: `100`)
* [[option_weechat.look.nick_color_force]] *weechat.look.nick_color_force*
** Beschreibung: `erzwingt für einen Nick eine spezielle Farbe. Die standardmäßig, mittels Streuwertfunktion aus dem Nicknamen, generierte Farbe findet für diese Nicks keine Anwendung (Format:"Nick1:Farbe1;Nick2:Farbe2"). Zuerst wird beim Namen des Nick nach Groß- und Kleinschreibung unterschieden. Sollte der Nick nicht gefunden werden findet keine Unterscheidung mehr statt. Somit ist es möglich die Nicks, für diese Einstellung, ausschließlich in Kleinschrift aufzuführen`
** Typ: Zeichenkette
** Werte: beliebige Zeichenkette (Standardwert: `""`)
* [[option_weechat.look.nick_color_hash]] *weechat.look.nick_color_hash*
** Beschreibung: `Gibt an welcher Hash-Algorithmus zur Farbauswahl für Nicks genutzt werden soll: djb2 = Variante des djb2 (Position der Buchstaben innerhalb des Nicks werden berücksichtigt: Anagramme eines Nick erhalten eine andere Farbe), sum = hier ist nur die Anzahl der Buchstaben maßgeblich`
** Typ: integer
** Werte: djb2, sum (Standardwert: `sum`)
* [[option_weechat.look.nick_color_stop_chars]] *weechat.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
** Werte: beliebige Zeichenkette (Standardwert: `"_|["`)
* [[option_weechat.look.nick_prefix]] *weechat.look.nick_prefix*
** Beschreibung: `Text, der vor dem Nick dargestellt werden soll, Beispiel: "<"`
** Typ: Zeichenkette

View File

@ -18,9 +18,9 @@
| irc | irc_nick | get current nick on a server | server name
| irc | irc_nick_color | get nick color code | nickname
| irc | irc_nick_color | get nick color code (*deprecated* since version 1.5, replaced by "nick_color") | nickname
| irc | irc_nick_color_name | get nick color name | nickname
| irc | irc_nick_color_name | get nick color name (*deprecated* since version 1.5, replaced by "nick_color_name") | nickname
| irc | irc_nick_from_host | get nick from IRC host | IRC host (like `:nick!name@server.com`)
@ -54,6 +54,10 @@
| weechat | locale | locale used for translating messages | -
| weechat | nick_color | get nick color code | nickname
| weechat | nick_color_name | get nick color name | nickname
| weechat | term_height | height of terminal | -
| weechat | term_width | width of terminal | -

View File

@ -232,21 +232,6 @@
** type: integer
** values: none, next, near_server (default value: `none`)
* [[option_irc.look.nick_color_force]] *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"); look up for nicks is with exact case then lower case, so it's possible to use only lower case for nicks in this option`
** type: string
** values: any string (default value: `""`)
* [[option_irc.look.nick_color_hash]] *irc.look.nick_color_hash*
** description: `hash algorithm used to find the color for a nick: djb2 = variant of djb2 (position of letters matters: anagrams of a nick have different color), sum = sum of letters`
** type: integer
** values: djb2, sum (default value: `sum`)
* [[option_irc.look.nick_color_stop_chars]] *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
** values: any string (default value: `"_|["`)
* [[option_irc.look.nick_completion_smart]] *irc.look.nick_completion_smart*
** description: `smart completion for nicks (completes first with last speakers): speakers = all speakers (including highlights), speakers_highlights = only speakers with highlight`
** type: integer

View File

@ -742,6 +742,21 @@
** type: integer
** values: 1 .. 10000 (default value: `100`)
* [[option_weechat.look.nick_color_force]] *weechat.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"); look up for nicks is with exact case then lower case, so it's possible to use only lower case for nicks in this option`
** type: string
** values: any string (default value: `""`)
* [[option_weechat.look.nick_color_hash]] *weechat.look.nick_color_hash*
** description: `hash algorithm used to find the color for a nick: djb2 = variant of djb2 (position of letters matters: anagrams of a nick have different color), sum = sum of letters`
** type: integer
** values: djb2, sum (default value: `sum`)
* [[option_weechat.look.nick_color_stop_chars]] *weechat.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
** values: any string (default value: `"_|["`)
* [[option_weechat.look.nick_prefix]] *weechat.look.nick_prefix*
** description: `text to display before nick in prefix of message, example: "<"`
** type: string

View File

@ -150,6 +150,7 @@ WeeChat "core" is located in following directories:
| gui-layout.c | Layout
| gui-line.c | Lines in buffers
| gui-mouse.c | Mouse
| gui-nick.c | Nick functions
| gui-nicklist.c | Nicklist in buffers
| gui-window.c | Windows
| curses/ | Curses interface

View File

@ -18,9 +18,9 @@
| irc | irc_nick | retourne le pseudo utilisé actuellement sur un serveur | nom de serveur
| irc | irc_nick_color | retourne le code couleur du pseudo | pseudo
| irc | irc_nick_color | retourne le code couleur du pseudo (*obsolète* depuis la version 1.5, remplacé par "nick_color") | pseudo
| irc | irc_nick_color_name | retourne le nom de la couleur du pseudo | pseudo
| irc | irc_nick_color_name | retourne le nom de la couleur du pseudo (*obsolète* depuis la version 1.5, remplacé par "nick_color_name") | pseudo
| irc | irc_nick_from_host | retourne le pseudo à partir d'un host IRC | host IRC (comme `:pseudo!nom@serveur.com`)
@ -54,6 +54,10 @@
| weechat | locale | locale utilisée pour la traduction des messages | -
| weechat | nick_color | retourne le code couleur du pseudo | pseudo
| weechat | nick_color_name | retourne le nom de la couleur du pseudo | pseudo
| weechat | term_height | hauteur du terminal | -
| weechat | term_width | largeur du terminal | -

View File

@ -232,21 +232,6 @@
** type: entier
** valeurs: none, next, near_server (valeur par défaut: `none`)
* [[option_irc.look.nick_color_force]] *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") ; la recherche de pseudos s'effectue avec la casse exacte puis en minuscules, donc il est possible d'utiliser uniquement des minuscules pour les pseudos dans cette option`
** type: chaîne
** valeurs: toute chaîne (valeur par défaut: `""`)
* [[option_irc.look.nick_color_hash]] *irc.look.nick_color_hash*
** description: `algorithme de hash utilisé pour trouver la couleur du pseudo : djb2 = variante de djb2 (la position des lettres compte : les anagrammes d'un pseudo ont une couleur différente), sum = somme des lettres`
** type: entier
** valeurs: djb2, sum (valeur par défaut: `sum`)
* [[option_irc.look.nick_color_stop_chars]] *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
** valeurs: toute chaîne (valeur par défaut: `"_|["`)
* [[option_irc.look.nick_completion_smart]] *irc.look.nick_completion_smart*
** description: `complétion intelligente pour les pseudos (complète d'abord avec les personnes qui ont parlé récemment) : speakers = tous ceux qui ont parlé (incluant les highlights), speakers_highlights = seulement ceux qui ont parlé avec un highlight`
** type: entier

View File

@ -742,6 +742,21 @@
** type: entier
** valeurs: 1 .. 10000 (valeur par défaut: `100`)
* [[option_weechat.look.nick_color_force]] *weechat.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") ; la recherche de pseudos s'effectue avec la casse exacte puis en minuscules, donc il est possible d'utiliser uniquement des minuscules pour les pseudos dans cette option`
** type: chaîne
** valeurs: toute chaîne (valeur par défaut: `""`)
* [[option_weechat.look.nick_color_hash]] *weechat.look.nick_color_hash*
** description: `algorithme de hash utilisé pour trouver la couleur du pseudo : djb2 = variante de djb2 (la position des lettres compte : les anagrammes d'un pseudo ont une couleur différente), sum = somme des lettres`
** type: entier
** valeurs: djb2, sum (valeur par défaut: `sum`)
* [[option_weechat.look.nick_color_stop_chars]] *weechat.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
** valeurs: toute chaîne (valeur par défaut: `"_|["`)
* [[option_weechat.look.nick_prefix]] *weechat.look.nick_prefix*
** description: `texte à afficher avant le pseudo dans le préfixe, exemple : "<"`
** type: chaîne

View File

@ -151,6 +151,7 @@ Le cœur de WeeChat est situé dans les répertoires suivants :
| gui-layout.c | Dispositions ("layouts")
| gui-line.c | Lignes dans les tampons
| gui-mouse.c | Souris
| gui-nick.c | Fonctions pour les pseudos
| gui-nicklist.c | Liste de pseudos dans les tampons
| gui-window.c | Fenêtres
| curses/ | Interface Curses

View File

@ -18,9 +18,9 @@
| irc | irc_nick | ottiene nick corrente su un server | nome server
| irc | irc_nick_color | ottiene il codice del colore del nick | nick
| irc | irc_nick_color | get nick color code (*deprecated* since version 1.5, replaced by "nick_color") | nick
| irc | irc_nick_color_name | ottiene il nome del colore del nick | nick
| irc | irc_nick_color_name | get nick color name (*deprecated* since version 1.5, replaced by "nick_color_name") | nick
| irc | irc_nick_from_host | ottiene nick dall'host IRC | host IRC (come `:nick!nome@server.com`)
@ -54,6 +54,10 @@
| weechat | locale | locale usato per la traduzione dei messaggi | -
| weechat | nick_color | ottiene il codice del colore del nick | nick
| weechat | nick_color_name | ottiene il nome del colore del nick | nick
| weechat | term_height | height of terminal | -
| weechat | term_width | width of terminal | -

View File

@ -232,21 +232,6 @@
** tipo: intero
** valori: none, next, near_server (valore predefinito: `none`)
* [[option_irc.look.nick_color_force]] *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"); look up for nicks is with exact case then lower case, so it's possible to use only lower case for nicks in this option`
** tipo: stringa
** valori: qualsiasi stringa (valore predefinito: `""`)
* [[option_irc.look.nick_color_hash]] *irc.look.nick_color_hash*
** descrizione: `hash algorithm used to find the color for a nick: djb2 = variant of djb2 (position of letters matters: anagrams of a nick have different color), sum = sum of letters`
** tipo: intero
** valori: djb2, sum (valore predefinito: `sum`)
* [[option_irc.look.nick_color_stop_chars]] *irc.look.nick_color_stop_chars*
** descrizione: `caratteri usati per interrompere il calcolo del colore con le lettere del nick (almeno un carattere al di fuori di questa lista deve essere nella lista prima di interromperlo) (esempio: nick "|nick|away" con "|" nei caratteri restituisce il colore del nick "|nick")`
** tipo: stringa
** valori: qualsiasi stringa (valore predefinito: `"_|["`)
* [[option_irc.look.nick_completion_smart]] *irc.look.nick_completion_smart*
** descrizione: `completamento intelligente per i nick (completa il primo con gli ultimi a parlare sul canale): speakers = tutti i nick (notifiche comprese), speakers_highlight = solo i nick con le notifiche`
** tipo: intero

View File

@ -742,6 +742,21 @@
** tipo: intero
** valori: 1 .. 10000 (valore predefinito: `100`)
* [[option_weechat.look.nick_color_force]] *weechat.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"); look up for nicks is with exact case then lower case, so it's possible to use only lower case for nicks in this option`
** tipo: stringa
** valori: qualsiasi stringa (valore predefinito: `""`)
* [[option_weechat.look.nick_color_hash]] *weechat.look.nick_color_hash*
** descrizione: `hash algorithm used to find the color for a nick: djb2 = variant of djb2 (position of letters matters: anagrams of a nick have different color), sum = sum of letters`
** tipo: intero
** valori: djb2, sum (valore predefinito: `sum`)
* [[option_weechat.look.nick_color_stop_chars]] *weechat.look.nick_color_stop_chars*
** descrizione: `caratteri usati per interrompere il calcolo del colore con le lettere del nick (almeno un carattere al di fuori di questa lista deve essere nella lista prima di interromperlo) (esempio: nick "|nick|away" con "|" nei caratteri restituisce il colore del nick "|nick")`
** tipo: stringa
** valori: qualsiasi stringa (valore predefinito: `"_|["`)
* [[option_weechat.look.nick_prefix]] *weechat.look.nick_prefix*
** descrizione: `testo da visualizzare prima del nick nel prefisso del messaggio, esempio: "<"`
** tipo: stringa

View File

@ -18,9 +18,9 @@
| irc | irc_nick | あるサーバの現在のニックネームを取得 | サーバ名
| irc | irc_nick_color | ニックネームの色コードを取得 | ニックネーム
| irc | irc_nick_color | get nick color code (*deprecated* since version 1.5, replaced by "nick_color") | ニックネーム
| irc | irc_nick_color_name | ニックネームの色名を取得 | ニックネーム
| irc | irc_nick_color_name | get nick color name (*deprecated* since version 1.5, replaced by "nick_color_name") | ニックネーム
| irc | irc_nick_from_host | IRC ホストからニックネームを取得 | IRC ホスト (例: `:nick!name@server.com`)
@ -54,6 +54,10 @@
| weechat | locale | 翻訳メッセージに利用するロケール | -
| weechat | nick_color | ニックネームの色コードを取得 | ニックネーム
| weechat | nick_color_name | ニックネームの色名を取得 | ニックネーム
| weechat | term_height | 端末の高さ | -
| weechat | term_width | 端末の幅 | -

View File

@ -232,21 +232,6 @@
** タイプ: 整数
** 値: none, next, near_server (デフォルト値: `none`)
* [[option_irc.look.nick_color_force]] *irc.look.nick_color_force*
** 説明: `一部のニックネームでニックネーム色を強制する: ニックネームから計算されるハッシュを元にした色を利用しない (書式: "nick1:color1;nick2:color2"); ニックネームの検索はまず大文字小文字が区別された状態で行われ、そのあとに小文字で行われます。このため、このオプションのニックネーム部分を小文字だけで書く事もできます`
** タイプ: 文字列
** 値: 未制約文字列 (デフォルト値: `""`)
* [[option_irc.look.nick_color_hash]] *irc.look.nick_color_hash*
** 説明: `ニックネームに対する色を見つけるハッシュアルゴリズム: djb2 = djb2 (文字の位置が重要: ニックネームに同じ色が使われにくくなる) の亜種、sum = 文字の総和`
** タイプ: 整数
** 値: djb2, sum (デフォルト値: `sum`)
* [[option_irc.look.nick_color_stop_chars]] *irc.look.nick_color_stop_chars*
** 説明: `ニックネーム内の色計算に使用する部分を制限する文字 (このリストに含まれない文字が、このリストの文字の前に少なくとも一つ以上含まれなければいけない) (例: "|" を設定した場合、"|nick|away" はニックネーム "|nick" と同じ色になる)`
** タイプ: 文字列
** 値: 未制約文字列 (デフォルト値: `"_|["`)
* [[option_irc.look.nick_completion_smart]] *irc.look.nick_completion_smart*
** 説明: `ニックネームのスマート補完 (発言日時の新しいものから順にニックネームを補完): speakers = すべてのニックネーム (ハイライトされたニックネームを含む)、speakers_highlights = ハイライトされたニックネームのみ`
** タイプ: 整数

View File

@ -742,6 +742,21 @@
** タイプ: 整数
** 値: 1 .. 10000 (デフォルト値: `100`)
* [[option_weechat.look.nick_color_force]] *weechat.look.nick_color_force*
** 説明: `一部のニックネームでニックネーム色を強制する: ニックネームから計算されるハッシュを元にした色を利用しない (書式: "nick1:color1;nick2:color2"); ニックネームの検索はまず大文字小文字が区別された状態で行われ、そのあとに小文字で行われます。このため、このオプションのニックネーム部分を小文字だけで書く事もできます`
** タイプ: 文字列
** 値: 未制約文字列 (デフォルト値: `""`)
* [[option_weechat.look.nick_color_hash]] *weechat.look.nick_color_hash*
** 説明: `ニックネームに対する色を見つけるハッシュアルゴリズム: djb2 = djb2 (文字の位置が重要: ニックネームに同じ色が使われにくくなる) の亜種、sum = 文字の総和`
** タイプ: 整数
** 値: djb2, sum (デフォルト値: `sum`)
* [[option_weechat.look.nick_color_stop_chars]] *weechat.look.nick_color_stop_chars*
** 説明: `ニックネーム内の色計算に使用する部分を制限する文字 (このリストに含まれない文字が、このリストの文字の前に少なくとも一つ以上含まれなければいけない) (例: "|" を設定した場合、"|nick|away" はニックネーム "|nick" と同じ色になる)`
** タイプ: 文字列
** 値: 未制約文字列 (デフォルト値: `"_|["`)
* [[option_weechat.look.nick_prefix]] *weechat.look.nick_prefix*
** 説明: `メッセージプレフィックス中のニックネームの前に表示するテキスト、例: "<"`
** タイプ: 文字列

View File

@ -155,6 +155,8 @@ WeeChat "core" は以下のディレクトリに配置されています:
| gui-layout.c | レイアウト
| gui-line.c | バッファ中の行
| gui-mouse.c | マウス
// TRANSLATION MISSING
| gui-nick.c | Nick functions
| gui-nicklist.c | バッファのニックネームリスト
| gui-window.c | ウィンドウ
| curses/ | curses インターフェイス

View File

@ -18,9 +18,9 @@
| irc | irc_nick | pobiera aktualny nick z serwera | nazwa serwera
| irc | irc_nick_color | pobiera kod koloru nicka | nazwa użytkownika
| irc | irc_nick_color | get nick color code (*deprecated* since version 1.5, replaced by "nick_color") | nazwa użytkownika
| irc | irc_nick_color_name | pobiera nazwę koloru nicka | nazwa użytkownika
| irc | irc_nick_color_name | get nick color name (*deprecated* since version 1.5, replaced by "nick_color_name") | nazwa użytkownika
| irc | irc_nick_from_host | pobiera nick z hosta IRC | host IRC (jak `:nick!nazwa@serwer.com`)
@ -54,6 +54,10 @@
| weechat | locale | zestaw znaków użyty do tłumaczenia wiadomości | -
| weechat | nick_color | pobiera kod koloru nicka | nazwa użytkownika
| weechat | nick_color_name | pobiera nazwę koloru nicka | nazwa użytkownika
| weechat | term_height | wysokość terminala | -
| weechat | term_width | szerokość terminala | -

View File

@ -232,21 +232,6 @@
** typ: liczba
** wartości: none, next, near_server (domyślna wartość: `none`)
* [[option_irc.look.nick_color_force]] *irc.look.nick_color_force*
** opis: `wymusza kolory dla niektórych nicków: hash połączony z nickiem w celu znalezienia koloru nie zostanie użyty dla tych nicków (format: "nick1:kolor1;nick2:kolor2"); wyszukiwanie nicków odbywa się na zasadzie dopasowania porównania dokładnego, następnie z małych liter, jest więc możliwe używanie tylko małych liter w tej opcji`
** typ: ciąg
** wartości: dowolny ciąg (domyślna wartość: `""`)
* [[option_irc.look.nick_color_hash]] *irc.look.nick_color_hash*
** opis: `algorytm haszujący używany do znalezienia koloru dla nicka: djb2 = odmiana djb2 (pozycja liter ma znaczenie: anagramy nicka mają różne kolory), sum = suma liter`
** typ: liczba
** wartości: djb2, sum (domyślna wartość: `sum`)
* [[option_irc.look.nick_color_stop_chars]] *irc.look.nick_color_stop_chars*
** opis: `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")`
** typ: ciąg
** wartości: dowolny ciąg (domyślna wartość: `"_|["`)
* [[option_irc.look.nick_completion_smart]] *irc.look.nick_completion_smart*
** opis: `inteligentne dopełnianie nicków (dopełnia najpierw ostatnimi rozmówcami): speakers = wszyscy rozmówcy (włączając podświetlenia), speakers_highlights = tylko rozmówcy z podświetleniem`
** typ: liczba

View File

@ -742,6 +742,21 @@
** typ: liczba
** wartości: 1 .. 10000 (domyślna wartość: `100`)
* [[option_weechat.look.nick_color_force]] *weechat.look.nick_color_force*
** opis: `wymusza kolory dla niektórych nicków: hash połączony z nickiem w celu znalezienia koloru nie zostanie użyty dla tych nicków (format: "nick1:kolor1;nick2:kolor2"); wyszukiwanie nicków odbywa się na zasadzie dopasowania porównania dokładnego, następnie z małych liter, jest więc możliwe używanie tylko małych liter w tej opcji`
** typ: ciąg
** wartości: dowolny ciąg (domyślna wartość: `""`)
* [[option_weechat.look.nick_color_hash]] *weechat.look.nick_color_hash*
** opis: `algorytm haszujący używany do znalezienia koloru dla nicka: djb2 = odmiana djb2 (pozycja liter ma znaczenie: anagramy nicka mają różne kolory), sum = suma liter`
** typ: liczba
** wartości: djb2, sum (domyślna wartość: `sum`)
* [[option_weechat.look.nick_color_stop_chars]] *weechat.look.nick_color_stop_chars*
** opis: `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")`
** typ: ciąg
** wartości: dowolny ciąg (domyślna wartość: `"_|["`)
* [[option_weechat.look.nick_prefix]] *weechat.look.nick_prefix*
** opis: `teks wyświetlany przed nickiem w prefiksie wiadomości, przykład: "<"`
** typ: ciąg

View File

@ -91,6 +91,8 @@
./src/gui/gui-main.h
./src/gui/gui-mouse.c
./src/gui/gui-mouse.h
./src/gui/gui-nick.c
./src/gui/gui-nick.h
./src/gui/gui-nicklist.c
./src/gui/gui-nicklist.h
./src/gui/gui-window.c

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2016-03-17 20:41+0100\n"
"POT-Creation-Date: 2016-04-04 14:36+0200\n"
"PO-Revision-Date: 2016-01-17 08:52+0100\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -3238,6 +3238,33 @@ msgstr ""
"zpoždění (v milisekundách) k převzetí události od myši: Weechat počká tuto "
"dobu před zpracovánim události"
#, fuzzy
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\"); look "
"up for nicks is with exact case then lower case, so it's possible to use "
"only lower case for nicks in this option"
msgstr ""
"vynutit barvu u některých přezdívek: hash spočítaný z přezdívky pro nalezení "
"barvy nebude použit pro tyto přezdívky (formát je: \"přezdívka1:barva1;"
"přezdívka2:barva2\")"
msgid ""
"hash algorithm used to find the color for a nick: djb2 = variant of djb2 "
"(position of letters matters: anagrams of a nick have different color), sum "
"= sum of letters"
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\")"
#, fuzzy
msgid "text to display before nick in prefix of message, example: \"<\""
msgstr "text pro zobrazení před přezdívkou v okně rozhovoru"
@ -7317,33 +7344,6 @@ msgstr ""
"pozice (měl by být poslední buffer), next = aktuální buffer + 1, near_server "
"= za posledním kanálem/pv serveru)"
#, fuzzy
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\"); look "
"up for nicks is with exact case then lower case, so it's possible to use "
"only lower case for nicks in this option"
msgstr ""
"vynutit barvu u některých přezdívek: hash spočítaný z přezdívky pro nalezení "
"barvy nebude použit pro tyto přezdívky (formát je: \"přezdívka1:barva1;"
"přezdívka2:barva2\")"
msgid ""
"hash algorithm used to find the color for a nick: djb2 = variant of djb2 "
"(position of letters matters: anagrams of a nick have different color), sum "
"= sum of letters"
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): speakers = "
"all speakers (including highlights), speakers_highlights = only speakers "
@ -7707,11 +7707,15 @@ msgstr "získat přezdívku od IRC hosta"
msgid "IRC host (like `:nick!name@server.com`)"
msgstr "IRC host (jako `:nick!name@server.com`)"
msgid "get nick color code"
msgstr "získat kód barvy přezdívky"
msgid ""
"get nick color code (*deprecated* since version 1.5, replaced by \"nick_color"
"\")"
msgstr ""
msgid "get nick color name"
msgstr "získat jméno barvy přezdívky"
msgid ""
"get nick color name (*deprecated* since version 1.5, replaced by "
"\"nick_color_name\")"
msgstr ""
msgid "get buffer pointer for an IRC server/channel/nick"
msgstr "získat ukazatel bufferu pro IRC server/kanál/přezdívku"
@ -8926,6 +8930,12 @@ msgstr "RGB barva konvertována do barev terminálu (0-255)"
msgid "rgb,limit (limit is optional and is set to 256 by default)"
msgstr "rgb,limit (limit je volitelný a nastaven na výchozí hodnotu 256)"
msgid "get nick color code"
msgstr "získat kód barvy přezdívky"
msgid "get nick color name"
msgstr "získat jméno barvy přezdívky"
msgid "list of bars"
msgstr "seznam polí"
@ -9262,10 +9272,6 @@ msgstr "ukazatel skriptu (volitelný)"
msgid "script name (wildcard \"*\" is allowed) (optional)"
msgstr "jméno serveru (zástupný znak \"*\" je povolen) (volitelný)"
#, fuzzy
msgid "callback of a script"
msgstr "Skript"
#, fuzzy, c-format
msgid ""
"%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)"
@ -11318,3 +11324,7 @@ msgstr "%s%s: vypršel časový limit \"%s\" pro %s"
#, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: nemohu se připojit\" neočekávaná chyba (%d)"
#, fuzzy
#~ msgid "callback of a script"
#~ msgstr "Skript"

102
po/de.po
View File

@ -23,7 +23,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2016-03-17 20:41+0100\n"
"POT-Creation-Date: 2016-04-04 14:36+0200\n"
"PO-Revision-Date: 2016-03-17 20:42+0100\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <>\n"
@ -3828,6 +3828,44 @@ msgstr ""
"Verzögerung (in Millisekunden) um eine Mauseingabe zu fangen: WeeChat wartet "
"zuerst diese Verzögerung ab bevor das Kommando verarbeitet wird"
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\"); look "
"up for nicks is with exact case then lower case, so it's possible to use "
"only lower case for nicks in this option"
msgstr ""
"erzwingt für einen Nick eine spezielle Farbe. Die standardmäßig, mittels "
"Streuwertfunktion aus dem Nicknamen, generierte Farbe findet für diese Nicks "
"keine Anwendung (Format:\"Nick1:Farbe1;Nick2:Farbe2\"). Zuerst wird beim "
"Namen des Nick nach Groß- und Kleinschreibung unterschieden. Sollte der Nick "
"nicht gefunden werden findet keine Unterscheidung mehr statt. Somit ist es "
"möglich die Nicks, für diese Einstellung, ausschließlich in Kleinschrift "
"aufzuführen"
msgid ""
"hash algorithm used to find the color for a nick: djb2 = variant of djb2 "
"(position of letters matters: anagrams of a nick have different color), sum "
"= sum of letters"
msgstr ""
"Gibt an welcher Hash-Algorithmus zur Farbauswahl für Nicks genutzt werden "
"soll: djb2 = Variante des djb2 (Position der Buchstaben innerhalb des Nicks "
"werden berücksichtigt: Anagramme eines Nick erhalten eine andere Farbe), sum "
"= hier ist nur die Anzahl der Buchstaben maßgeblich"
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 "text to display before nick in prefix of message, example: \"<\""
msgstr "Text, der vor dem Nick dargestellt werden soll, Beispiel: \"<\""
@ -8486,44 +8524,6 @@ msgstr ""
"aktueller Buffer + 1, near_server = nach dem letztem Channel/privaten Buffer "
"des jeweiligen Servers)"
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\"); look "
"up for nicks is with exact case then lower case, so it's possible to use "
"only lower case for nicks in this option"
msgstr ""
"erzwingt für einen Nick eine spezielle Farbe. Die standardmäßig, mittels "
"Streuwertfunktion aus dem Nicknamen, generierte Farbe findet für diese Nicks "
"keine Anwendung (Format:\"Nick1:Farbe1;Nick2:Farbe2\"). Zuerst wird beim "
"Namen des Nick nach Groß- und Kleinschreibung unterschieden. Sollte der Nick "
"nicht gefunden werden findet keine Unterscheidung mehr statt. Somit ist es "
"möglich die Nicks, für diese Einstellung, ausschließlich in Kleinschrift "
"aufzuführen"
msgid ""
"hash algorithm used to find the color for a nick: djb2 = variant of djb2 "
"(position of letters matters: anagrams of a nick have different color), sum "
"= sum of letters"
msgstr ""
"Gibt an welcher Hash-Algorithmus zur Farbauswahl für Nicks genutzt werden "
"soll: djb2 = Variante des djb2 (Position der Buchstaben innerhalb des Nicks "
"werden berücksichtigt: Anagramme eines Nick erhalten eine andere Farbe), sum "
"= hier ist nur die Anzahl der Buchstaben maßgeblich"
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): speakers = "
"all speakers (including highlights), speakers_highlights = only speakers "
@ -8973,11 +8973,15 @@ msgstr "Nicknamen des IRC-Hosts erhalten"
msgid "IRC host (like `:nick!name@server.com`)"
msgstr "IRC host (in der Form `:nick!name@server.com`)"
msgid "get nick color code"
msgstr "zeigt Farbecode des Nick"
msgid ""
"get nick color code (*deprecated* since version 1.5, replaced by \"nick_color"
"\")"
msgstr ""
msgid "get nick color name"
msgstr "zeigt Farbnamen des Nick"
msgid ""
"get nick color name (*deprecated* since version 1.5, replaced by "
"\"nick_color_name\")"
msgstr ""
msgid "get buffer pointer for an IRC server/channel/nick"
msgstr "holt Buffer Pointer für einen IRC Server/Channel/Nick"
@ -10238,6 +10242,12 @@ msgstr "RGB Farbe wurde umgewandelt in Terminalfarbe (0-255)"
msgid "rgb,limit (limit is optional and is set to 256 by default)"
msgstr "RGB,limit (Obergrenze ist optional und ist Standardmäßig 256)"
msgid "get nick color code"
msgstr "zeigt Farbecode des Nick"
msgid "get nick color name"
msgstr "zeigt Farbnamen des Nick"
msgid "list of bars"
msgstr "Auflistung der Bars"
@ -10569,9 +10579,6 @@ msgstr "Skript Pointer (optional)"
msgid "script name (wildcard \"*\" is allowed) (optional)"
msgstr "Name des Skriptes (Platzhalter \"*\" kann verwendet werden) (optional)"
msgid "callback of a script"
msgstr "Callback eines Skripts"
#, c-format
msgid ""
"%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)"
@ -12870,3 +12877,6 @@ msgstr "%s%s: Zeitüberschreitung für \"%s\" mit %s"
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr ""
"%s%s: Verbindung konnte nicht hergestellt werden: unerwarteter Fehler (%d)"
#~ msgid "callback of a script"
#~ msgstr "Callback eines Skripts"

View File

@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2016-03-17 20:41+0100\n"
"POT-Creation-Date: 2016-04-04 14:36+0200\n"
"PO-Revision-Date: 2016-01-17 08:52+0100\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -3391,6 +3391,35 @@ msgstr ""
"retraso (en milisegundos) para tomar un evento del ratón: WeeChat esperará "
"este retraso antes de procesar un evento"
#, fuzzy
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\"); look "
"up for nicks is with exact case then lower case, so it's possible to use "
"only lower case for nicks in this option"
msgstr ""
"fuerza color para algunos apodos: hash calculado con el apodo para encontrar "
"el color no se utilizará para los siguientes apodos (el formato es: \"apodo1:"
"color1;apodo2:color2\"); búsquedas de apodos son exactamente igual que en "
"minúsculas, así que es posible usar minúsculas para apodos con esta opción"
msgid ""
"hash algorithm used to find the color for a nick: djb2 = variant of djb2 "
"(position of letters matters: anagrams of a nick have different color), sum "
"= sum of letters"
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\")"
#, fuzzy
msgid "text to display before nick in prefix of message, example: \"<\""
msgstr "texto a mostrar antes del apodo en la ventana de charla"
@ -7591,35 +7620,6 @@ msgstr ""
"posición predeterminada (último buffer), next = buffer actual + 1, "
"near_server = después del último canal/privado del server)"
#, fuzzy
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\"); look "
"up for nicks is with exact case then lower case, so it's possible to use "
"only lower case for nicks in this option"
msgstr ""
"fuerza color para algunos apodos: hash calculado con el apodo para encontrar "
"el color no se utilizará para los siguientes apodos (el formato es: \"apodo1:"
"color1;apodo2:color2\"); búsquedas de apodos son exactamente igual que en "
"minúsculas, así que es posible usar minúsculas para apodos con esta opción"
msgid ""
"hash algorithm used to find the color for a nick: djb2 = variant of djb2 "
"(position of letters matters: anagrams of a nick have different color), sum "
"= sum of letters"
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): speakers = "
"all speakers (including highlights), speakers_highlights = only speakers "
@ -8000,11 +8000,15 @@ msgstr "devuelve apodo de un host IRC"
msgid "IRC host (like `:nick!name@server.com`)"
msgstr "IRC host (como `:apodo!nombre@servidor.com`)"
msgid "get nick color code"
msgstr "obtiene el código del color del apodo"
msgid ""
"get nick color code (*deprecated* since version 1.5, replaced by \"nick_color"
"\")"
msgstr ""
msgid "get nick color name"
msgstr "obtiene el nombre del color del apodo"
msgid ""
"get nick color name (*deprecated* since version 1.5, replaced by "
"\"nick_color_name\")"
msgstr ""
msgid "get buffer pointer for an IRC server/channel/nick"
msgstr "devuelve el puntero del buffer de un servidor/canal/apodo IRC"
@ -9233,6 +9237,12 @@ msgstr ""
msgid "rgb,limit (limit is optional and is set to 256 by default)"
msgstr ""
msgid "get nick color code"
msgstr "obtiene el código del color del apodo"
msgid "get nick color name"
msgstr "obtiene el nombre del color del apodo"
msgid "list of bars"
msgstr "lista de barras"
@ -9582,10 +9592,6 @@ msgstr ""
"nombre del script (puede empezar o terminar con \"*\" como comodín) "
"(opcional)"
#, fuzzy
msgid "callback of a script"
msgstr "lista de scripts"
#, c-format
msgid ""
"%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)"
@ -11581,3 +11587,7 @@ msgstr "%s%s: tiempo de espera máximo para \"%s\" con %s"
#, fuzzy, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: no es posible conectarse al transmisor"
#, fuzzy
#~ msgid "callback of a script"
#~ msgstr "lista de scripts"

View File

@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2016-03-17 20:41+0100\n"
"PO-Revision-Date: 2016-03-17 20:59+0100\n"
"POT-Creation-Date: 2016-04-04 14:36+0200\n"
"PO-Revision-Date: 2016-04-05 07:40+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@ -3727,6 +3727,39 @@ msgstr ""
"délai (en millisecondes) pour capturer un évènement de la souris : WeeChat "
"attendra ce délai avant de traiter l'évènement"
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\"); look "
"up for nicks is with exact case then lower case, so it's possible to use "
"only lower case for nicks in this option"
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\") ; la recherche de pseudos s'effectue "
"avec la casse exacte puis en minuscules, donc il est possible d'utiliser "
"uniquement des minuscules pour les pseudos dans cette option"
msgid ""
"hash algorithm used to find the color for a nick: djb2 = variant of djb2 "
"(position of letters matters: anagrams of a nick have different color), sum "
"= sum of letters"
msgstr ""
"algorithme de hash utilisé pour trouver la couleur du pseudo : djb2 = "
"variante de djb2 (la position des lettres compte : les anagrammes d'un "
"pseudo ont une couleur différente), sum = somme des lettres"
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 "text to display before nick in prefix of message, example: \"<\""
msgstr "texte à afficher avant le pseudo dans le préfixe, exemple : \"<\""
@ -8294,39 +8327,6 @@ msgstr ""
"position par défaut (devrait être le dernier tampon), next = tampon courant "
"+ 1, near_server = après le dernier canal/privé du serveur)"
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\"); look "
"up for nicks is with exact case then lower case, so it's possible to use "
"only lower case for nicks in this option"
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\") ; la recherche de pseudos s'effectue "
"avec la casse exacte puis en minuscules, donc il est possible d'utiliser "
"uniquement des minuscules pour les pseudos dans cette option"
msgid ""
"hash algorithm used to find the color for a nick: djb2 = variant of djb2 "
"(position of letters matters: anagrams of a nick have different color), sum "
"= sum of letters"
msgstr ""
"algorithme de hash utilisé pour trouver la couleur du pseudo : djb2 = "
"variante de djb2 (la position des lettres compte : les anagrammes d'un "
"pseudo ont une couleur différente), sum = somme des lettres"
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): speakers = "
"all speakers (including highlights), speakers_highlights = only speakers "
@ -8750,11 +8750,19 @@ msgstr "retourne le pseudo à partir d'un host IRC"
msgid "IRC host (like `:nick!name@server.com`)"
msgstr "host IRC (comme `:pseudo!nom@serveur.com`)"
msgid "get nick color code"
msgstr "retourne le code couleur du pseudo"
msgid ""
"get nick color code (*deprecated* since version 1.5, replaced by \"nick_color"
"\")"
msgstr ""
"retourne le code couleur du pseudo (*obsolète* depuis la version 1.5, "
"remplacé par \"nick_color\")"
msgid "get nick color name"
msgstr "retourne le nom de la couleur du pseudo"
msgid ""
"get nick color name (*deprecated* since version 1.5, replaced by "
"\"nick_color_name\")"
msgstr ""
"retourne le nom de la couleur du pseudo (*obsolète* depuis la version 1.5, "
"remplacé par \"nick_color_name\")"
msgid "get buffer pointer for an IRC server/channel/nick"
msgstr "retourne le pointeur vers le tampon pour un serveur/canal/pseudo IRC"
@ -9989,6 +9997,12 @@ msgstr "couleur RGB convertie en couleur du terminal (0-255)"
msgid "rgb,limit (limit is optional and is set to 256 by default)"
msgstr "rgb,limite (la limite est optionnelle et vaut 256 par défaut)"
msgid "get nick color code"
msgstr "retourne le code couleur du pseudo"
msgid "get nick color name"
msgstr "retourne le nom de la couleur du pseudo"
msgid "list of bars"
msgstr "liste des barres"
@ -10316,9 +10330,6 @@ msgstr "pointeur vers le script (optionnel)"
msgid "script name (wildcard \"*\" is allowed) (optional)"
msgstr "nom de script (le caractère joker \"*\" est autorisé) (optionnel)"
msgid "callback of a script"
msgstr "callback d'un script"
#, c-format
msgid ""
"%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)"
@ -12604,6 +12615,9 @@ msgstr "%s%s : délai d'attente dépassé pour \"%s\" avec %s"
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s : impossible de se connecter : erreur inattendue (%d)"
#~ msgid "callback of a script"
#~ msgstr "callback d'un script"
#~ msgid ""
#~ "cause SASL authentication failure when SASL is requested but unavailable "
#~ "on the server"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2016-03-17 20:41+0100\n"
"POT-Creation-Date: 2016-04-04 14:36+0200\n"
"PO-Revision-Date: 2016-01-17 08:52+0100\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2819,6 +2819,26 @@ msgid ""
"before processing event"
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\"); look "
"up for nicks is with exact case then lower case, so it's possible to use "
"only lower case for nicks in this option"
msgstr ""
msgid ""
"hash algorithm used to find the color for a nick: djb2 = variant of djb2 "
"(position of letters matters: anagrams of a nick have different color), sum "
"= sum of letters"
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 "text to display before nick in prefix of message, example: \"<\""
msgstr "a név előtt megjelenítendő szöveg a beszédablakban"
@ -6758,26 +6778,6 @@ msgid ""
"channel/pv of server)"
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\"); look "
"up for nicks is with exact case then lower case, so it's possible to use "
"only lower case for nicks in this option"
msgstr ""
msgid ""
"hash algorithm used to find the color for a nick: djb2 = variant of djb2 "
"(position of letters matters: anagrams of a nick have different color), sum "
"= sum of letters"
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): speakers = "
"all speakers (including highlights), speakers_highlights = only speakers "
@ -7120,13 +7120,15 @@ msgstr "név vagy gép letiltása"
msgid "IRC host (like `:nick!name@server.com`)"
msgstr ""
#, fuzzy
msgid "get nick color code"
msgstr "üzenetek színe"
msgid ""
"get nick color code (*deprecated* since version 1.5, replaced by \"nick_color"
"\")"
msgstr ""
#, fuzzy
msgid "get nick color name"
msgstr "üzenetek színe"
msgid ""
"get nick color name (*deprecated* since version 1.5, replaced by "
"\"nick_color_name\")"
msgstr ""
#, fuzzy
msgid "get buffer pointer for an IRC server/channel/nick"
@ -8298,6 +8300,14 @@ msgstr ""
msgid "rgb,limit (limit is optional and is set to 256 by default)"
msgstr ""
#, fuzzy
msgid "get nick color code"
msgstr "üzenetek színe"
#, fuzzy
msgid "get nick color name"
msgstr "üzenetek színe"
#, fuzzy
msgid "list of bars"
msgstr "Aliaszok listája:\n"
@ -8647,10 +8657,6 @@ msgstr ""
msgid "script name (wildcard \"*\" is allowed) (optional)"
msgstr ""
#, fuzzy
msgid "callback of a script"
msgstr "Aliaszok listája:\n"
#, fuzzy, c-format
msgid ""
"%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)"
@ -10627,3 +10633,7 @@ msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n"
#, fuzzy, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s DCC: nem sikerült kapcsolódni a küldőhöz\n"
#, fuzzy
#~ msgid "callback of a script"
#~ msgstr "Aliaszok listája:\n"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2016-03-17 20:41+0100\n"
"POT-Creation-Date: 2016-04-04 14:36+0200\n"
"PO-Revision-Date: 2016-01-17 08:52+0100\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -3487,6 +3487,30 @@ msgstr ""
"ritardo (in millisecondi) per catturare un evento del mouse: WeeChat attende "
"questo ritardo prima di analizzare l'evento"
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\"); look "
"up for nicks is with exact case then lower case, so it's possible to use "
"only lower case for nicks in this option"
msgstr ""
msgid ""
"hash algorithm used to find the color for a nick: djb2 = variant of djb2 "
"(position of letters matters: anagrams of a nick have different color), sum "
"= sum of letters"
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 interrompere il calcolo del colore con le lettere del "
"nick (almeno un carattere al di fuori di questa lista deve essere nella "
"lista prima di interromperlo) (esempio: nick \"|nick|away\" con \"|\" nei "
"caratteri restituisce il colore del nick \"|nick\")"
msgid "text to display before nick in prefix of message, example: \"<\""
msgstr ""
"testo da visualizzare prima del nick nel prefisso del messaggio, esempio: \"<"
@ -7757,30 +7781,6 @@ msgstr ""
"posizione predefinita (dovrebbe essere l'ultimo buffer), next = buffer "
"corrente + 1, near_server = dopo l'ultimo canale/privato del server)"
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\"); look "
"up for nicks is with exact case then lower case, so it's possible to use "
"only lower case for nicks in this option"
msgstr ""
msgid ""
"hash algorithm used to find the color for a nick: djb2 = variant of djb2 "
"(position of letters matters: anagrams of a nick have different color), sum "
"= sum of letters"
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 interrompere il calcolo del colore con le lettere del "
"nick (almeno un carattere al di fuori di questa lista deve essere nella "
"lista prima di interromperlo) (esempio: nick \"|nick|away\" con \"|\" nei "
"caratteri restituisce il colore del nick \"|nick\")"
msgid ""
"smart completion for nicks (completes first with last speakers): speakers = "
"all speakers (including highlights), speakers_highlights = only speakers "
@ -8170,11 +8170,15 @@ msgstr "ottiene nick dall'host IRC"
msgid "IRC host (like `:nick!name@server.com`)"
msgstr "host IRC (come `:nick!nome@server.com`)"
msgid "get nick color code"
msgstr "ottiene il codice del colore del nick"
msgid ""
"get nick color code (*deprecated* since version 1.5, replaced by \"nick_color"
"\")"
msgstr ""
msgid "get nick color name"
msgstr "ottiene il nome del colore del nick"
msgid ""
"get nick color name (*deprecated* since version 1.5, replaced by "
"\"nick_color_name\")"
msgstr ""
msgid "get buffer pointer for an IRC server/channel/nick"
msgstr "ottiene puntatore al buffer per un server/canale/nick IRC"
@ -9395,6 +9399,12 @@ msgstr ""
msgid "rgb,limit (limit is optional and is set to 256 by default)"
msgstr ""
msgid "get nick color code"
msgstr "ottiene il codice del colore del nick"
msgid "get nick color name"
msgstr "ottiene il nome del colore del nick"
msgid "list of bars"
msgstr "elenco delle barre"
@ -9743,9 +9753,6 @@ msgstr ""
"nome script (può iniziare o terminare con \"*\" come carattere jolly) "
"(opzionale)"
msgid "callback of a script"
msgstr "callback di uno script"
#, c-format
msgid ""
"%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)"
@ -11766,3 +11773,6 @@ msgstr "%s%s: timeout per \"%s\" con %s"
#, fuzzy, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: impossibile connettersi al mittente"
#~ msgid "callback of a script"
#~ msgstr "callback di uno script"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2016-03-17 20:41+0100\n"
"POT-Creation-Date: 2016-04-04 14:36+0200\n"
"PO-Revision-Date: 2016-03-29 09:00+0900\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/translation_ja>\n"
@ -3598,6 +3598,36 @@ msgstr ""
"マウスイベントを横取りするための遅延 (ミリ秒): WeeChat はイベント処理前にこの"
"遅延時間だけ待つ"
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\"); look "
"up for nicks is with exact case then lower case, so it's possible to use "
"only lower case for nicks in this option"
msgstr ""
"一部のニックネームでニックネーム色を強制する: ニックネームから計算されるハッ"
"シュを元にした色を利用しない (書式: \"nick1:color1;nick2:color2\"); ニック"
"ネームの検索はまず大文字小文字が区別された状態で行われ、そのあとに小文字で行"
"われます。このため、このオプションのニックネーム部分を小文字だけで書く事もで"
"きます"
msgid ""
"hash algorithm used to find the color for a nick: djb2 = variant of djb2 "
"(position of letters matters: anagrams of a nick have different color), sum "
"= sum of letters"
msgstr ""
"ニックネームに対する色を見つけるハッシュアルゴリズム: djb2 = djb2 (文字の位置"
"が重要: ニックネームに同じ色が使われにくくなる) の亜種、sum = 文字の総和"
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 ""
"ニックネーム内の色計算に使用する部分を制限する文字 (このリストに含まれない文"
"字が、このリストの文字の前に少なくとも一つ以上含まれなければいけない) (例: "
"\"|\" を設定した場合、\"|nick|away\" はニックネーム \"|nick\" と同じ色になる)"
msgid "text to display before nick in prefix of message, example: \"<\""
msgstr ""
"メッセージプレフィックス中のニックネームの前に表示するテキスト、例: \"<\""
@ -7953,36 +7983,6 @@ msgstr ""
"位置 (一番後ろのバッファ)、next = 現在のバッファ番号 + 1、near_server = サー"
"バの一番後ろのチャンネル/プライベートバッファ)"
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\"); look "
"up for nicks is with exact case then lower case, so it's possible to use "
"only lower case for nicks in this option"
msgstr ""
"一部のニックネームでニックネーム色を強制する: ニックネームから計算されるハッ"
"シュを元にした色を利用しない (書式: \"nick1:color1;nick2:color2\"); ニック"
"ネームの検索はまず大文字小文字が区別された状態で行われ、そのあとに小文字で行"
"われます。このため、このオプションのニックネーム部分を小文字だけで書く事もで"
"きます"
msgid ""
"hash algorithm used to find the color for a nick: djb2 = variant of djb2 "
"(position of letters matters: anagrams of a nick have different color), sum "
"= sum of letters"
msgstr ""
"ニックネームに対する色を見つけるハッシュアルゴリズム: djb2 = djb2 (文字の位置"
"が重要: ニックネームに同じ色が使われにくくなる) の亜種、sum = 文字の総和"
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 ""
"ニックネーム内の色計算に使用する部分を制限する文字 (このリストに含まれない文"
"字が、このリストの文字の前に少なくとも一つ以上含まれなければいけない) (例: "
"\"|\" を設定した場合、\"|nick|away\" はニックネーム \"|nick\" と同じ色になる)"
msgid ""
"smart completion for nicks (completes first with last speakers): speakers = "
"all speakers (including highlights), speakers_highlights = only speakers "
@ -8388,11 +8388,15 @@ msgstr "IRC ホストからニックネームを取得"
msgid "IRC host (like `:nick!name@server.com`)"
msgstr "IRC ホスト (例: `:nick!name@server.com`)"
msgid "get nick color code"
msgstr "ニックネームの色コードを取得"
msgid ""
"get nick color code (*deprecated* since version 1.5, replaced by \"nick_color"
"\")"
msgstr ""
msgid "get nick color name"
msgstr "ニックネームの色名を取得"
msgid ""
"get nick color name (*deprecated* since version 1.5, replaced by "
"\"nick_color_name\")"
msgstr ""
msgid "get buffer pointer for an IRC server/channel/nick"
msgstr "ある IRC サーバ/チャンネル/ニックネームのバッファポインタを取得"
@ -9602,6 +9606,12 @@ msgstr "端末色コード (0-255) に変換されたRGB 色コード"
msgid "rgb,limit (limit is optional and is set to 256 by default)"
msgstr "rgb,limit (limit は任意でデフォルトでは 256 に設定)"
msgid "get nick color code"
msgstr "ニックネームの色コードを取得"
msgid "get nick color name"
msgstr "ニックネームの色名を取得"
msgid "list of bars"
msgstr "バーのリスト"
@ -9918,9 +9928,6 @@ msgstr "スクリプトポインタ (任意)"
msgid "script name (wildcard \"*\" is allowed) (optional)"
msgstr "スクリプト名 (ワイルドカード \"*\" を使うことができます) (任意)"
msgid "callback of a script"
msgstr "スクリプトのコールバック"
#, c-format
msgid ""
"%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)"
@ -12113,3 +12120,6 @@ msgstr "%s%s: \"%s\" のタイムアウト %s"
#, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: 接続できません: 未定義のエラー (%d)"
#~ msgid "callback of a script"
#~ msgstr "スクリプトのコールバック"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2016-03-17 20:41+0100\n"
"POT-Creation-Date: 2016-04-04 14:36+0200\n"
"PO-Revision-Date: 2016-03-17 20:43+0100\n"
"Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -3684,6 +3684,37 @@ msgstr ""
"odstęp (w milisekundach) przechwytywania zdarzeń myszy: WeeChat zawsze "
"poczeka ten czas przed obsługą zdarzenia"
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\"); look "
"up for nicks is with exact case then lower case, so it's possible to use "
"only lower case for nicks in this option"
msgstr ""
"wymusza kolory dla niektórych nicków: hash połączony z nickiem w celu "
"znalezienia koloru nie zostanie użyty dla tych nicków (format: \"nick1:"
"kolor1;nick2:kolor2\"); wyszukiwanie nicków odbywa się na zasadzie "
"dopasowania porównania dokładnego, następnie z małych liter, jest więc "
"możliwe używanie tylko małych liter w tej opcji"
msgid ""
"hash algorithm used to find the color for a nick: djb2 = variant of djb2 "
"(position of letters matters: anagrams of a nick have different color), sum "
"= sum of letters"
msgstr ""
"algorytm haszujący używany do znalezienia koloru dla nicka: djb2 = odmiana "
"djb2 (pozycja liter ma znaczenie: anagramy nicka mają różne kolory), sum = "
"suma liter"
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 "text to display before nick in prefix of message, example: \"<\""
msgstr "teks wyświetlany przed nickiem w prefiksie wiadomości, przykład: \"<\""
@ -8125,37 +8156,6 @@ msgstr ""
"domyślna pozycja (powinien być to ostatni bufor), next = obecny bufor + 1, "
"near_server = po ostatnim kanale/pv serwera)"
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\"); look "
"up for nicks is with exact case then lower case, so it's possible to use "
"only lower case for nicks in this option"
msgstr ""
"wymusza kolory dla niektórych nicków: hash połączony z nickiem w celu "
"znalezienia koloru nie zostanie użyty dla tych nicków (format: \"nick1:"
"kolor1;nick2:kolor2\"); wyszukiwanie nicków odbywa się na zasadzie "
"dopasowania porównania dokładnego, następnie z małych liter, jest więc "
"możliwe używanie tylko małych liter w tej opcji"
msgid ""
"hash algorithm used to find the color for a nick: djb2 = variant of djb2 "
"(position of letters matters: anagrams of a nick have different color), sum "
"= sum of letters"
msgstr ""
"algorytm haszujący używany do znalezienia koloru dla nicka: djb2 = odmiana "
"djb2 (pozycja liter ma znaczenie: anagramy nicka mają różne kolory), sum = "
"suma liter"
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): speakers = "
"all speakers (including highlights), speakers_highlights = only speakers "
@ -8568,11 +8568,15 @@ msgstr "pobiera nick z hosta IRC"
msgid "IRC host (like `:nick!name@server.com`)"
msgstr "host IRC (jak `:nick!nazwa@serwer.com`)"
msgid "get nick color code"
msgstr "pobiera kod koloru nicka"
msgid ""
"get nick color code (*deprecated* since version 1.5, replaced by \"nick_color"
"\")"
msgstr ""
msgid "get nick color name"
msgstr "pobiera nazwę koloru nicka"
msgid ""
"get nick color name (*deprecated* since version 1.5, replaced by "
"\"nick_color_name\")"
msgstr ""
msgid "get buffer pointer for an IRC server/channel/nick"
msgstr "pobiera wskaźnik dla serwera/kanału/nicku IRC"
@ -9788,6 +9792,12 @@ msgstr "kolor RGB skonwertowany na kolor terminala (0-255)"
msgid "rgb,limit (limit is optional and is set to 256 by default)"
msgstr "rgb,limit (limit jest opcjonalny i ustawiony domyślnie na 256)"
msgid "get nick color code"
msgstr "pobiera kod koloru nicka"
msgid "get nick color name"
msgstr "pobiera nazwę koloru nicka"
msgid "list of bars"
msgstr "lista pasków"
@ -10108,9 +10118,6 @@ msgstr "wskaźnik skryptu (opcjonalne)"
msgid "script name (wildcard \"*\" is allowed) (optional)"
msgstr "nazwa skryptu (wildcard \"*\" jest dozwolony) (opcjonalne)"
msgid "callback of a script"
msgstr "callback skryptu"
#, c-format
msgid ""
"%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)"
@ -12340,3 +12347,6 @@ msgstr "%s%s: przekroczono czas na \"%s\" z %s"
#, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: nie można połączyć: niespodziewany błąd (%d)"
#~ msgid "callback of a script"
#~ msgstr "callback skryptu"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2016-03-17 20:41+0100\n"
"POT-Creation-Date: 2016-04-04 14:36+0200\n"
"PO-Revision-Date: 2016-01-17 08:52+0100\n"
"Last-Translator: Eduardo Elias <camponez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -3409,6 +3409,34 @@ msgid ""
"before processing event"
msgstr ""
#, fuzzy
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\"); look "
"up for nicks is with exact case then lower case, so it's possible to use "
"only lower case for nicks in this option"
msgstr ""
"forçar cor para alguns apelidos: hash computado com apelido para encontar "
"cor não será utilizado para estes apelidos (formato: \"apelido1:cor1;"
"apelido2:cor2\")"
msgid ""
"hash algorithm used to find the color for a nick: djb2 = variant of djb2 "
"(position of letters matters: anagrams of a nick have different color), sum "
"= sum of letters"
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 utilizados para parar no apelido quando estiver computando cor "
"com letras do apelido (no mínimo um caractere fora desta lista deve estar na "
"string antes de parar) (exemplo: apelido \"|apelido|ausente\" with \"|\" nos "
"caracteres retornarão cor do apelido \"|apelido\")"
msgid "text to display before nick in prefix of message, example: \"<\""
msgstr ""
"texto a ser exibido antes do apelido no prefixo da mensagem, exemplo: \"<\""
@ -7173,34 +7201,6 @@ msgid ""
"channel/pv of server)"
msgstr ""
#, fuzzy
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\"); look "
"up for nicks is with exact case then lower case, so it's possible to use "
"only lower case for nicks in this option"
msgstr ""
"forçar cor para alguns apelidos: hash computado com apelido para encontar "
"cor não será utilizado para estes apelidos (formato: \"apelido1:cor1;"
"apelido2:cor2\")"
msgid ""
"hash algorithm used to find the color for a nick: djb2 = variant of djb2 "
"(position of letters matters: anagrams of a nick have different color), sum "
"= sum of letters"
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 utilizados para parar no apelido quando estiver computando cor "
"com letras do apelido (no mínimo um caractere fora desta lista deve estar na "
"string antes de parar) (exemplo: apelido \"|apelido|ausente\" with \"|\" nos "
"caracteres retornarão cor do apelido \"|apelido\")"
msgid ""
"smart completion for nicks (completes first with last speakers): speakers = "
"all speakers (including highlights), speakers_highlights = only speakers "
@ -7536,11 +7536,15 @@ msgstr "obter apelido de host IRC"
msgid "IRC host (like `:nick!name@server.com`)"
msgstr "host IRC (exemplo: `:apelido!nome@servidor.com`)"
msgid "get nick color code"
msgstr "obter código de cor do apelido"
msgid ""
"get nick color code (*deprecated* since version 1.5, replaced by \"nick_color"
"\")"
msgstr ""
msgid "get nick color name"
msgstr "obter nome da cor do apelido"
msgid ""
"get nick color name (*deprecated* since version 1.5, replaced by "
"\"nick_color_name\")"
msgstr ""
msgid "get buffer pointer for an IRC server/channel/nick"
msgstr "obter pointeiro do buffer para um servidor/canal/apelido IRC"
@ -8734,6 +8738,12 @@ msgstr ""
msgid "rgb,limit (limit is optional and is set to 256 by default)"
msgstr ""
msgid "get nick color code"
msgstr "obter código de cor do apelido"
msgid "get nick color name"
msgstr "obter nome da cor do apelido"
msgid "list of bars"
msgstr "lista de barras"
@ -9082,10 +9092,6 @@ msgstr ""
"nome do script (pode começar ou terminar com \"*\" como um coringa) "
"(opcional)"
#, fuzzy
msgid "callback of a script"
msgstr "callback do script"
#, fuzzy, c-format
msgid ""
"%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)"
@ -11065,3 +11071,7 @@ msgstr "%s%s: tempo esgotado para \"%s\" com %s"
#, fuzzy, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: não foi possível conectar ao remetente"
#, fuzzy
#~ msgid "callback of a script"
#~ msgstr "callback do script"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2016-03-17 20:41+0100\n"
"POT-Creation-Date: 2016-04-04 14:36+0200\n"
"PO-Revision-Date: 2016-01-17 08:52+0100\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2851,6 +2851,26 @@ msgid ""
"before processing event"
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\"); look "
"up for nicks is with exact case then lower case, so it's possible to use "
"only lower case for nicks in this option"
msgstr ""
msgid ""
"hash algorithm used to find the color for a nick: djb2 = variant of djb2 "
"(position of letters matters: anagrams of a nick have different color), sum "
"= sum of letters"
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 "text to display before nick in prefix of message, example: \"<\""
msgstr "текст, который отображать до ника в окне чата"
@ -6786,26 +6806,6 @@ msgid ""
"channel/pv of server)"
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\"); look "
"up for nicks is with exact case then lower case, so it's possible to use "
"only lower case for nicks in this option"
msgstr ""
msgid ""
"hash algorithm used to find the color for a nick: djb2 = variant of djb2 "
"(position of letters matters: anagrams of a nick have different color), sum "
"= sum of letters"
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): speakers = "
"all speakers (including highlights), speakers_highlights = only speakers "
@ -7153,13 +7153,15 @@ msgstr "банит ник или хост"
msgid "IRC host (like `:nick!name@server.com`)"
msgstr ""
#, fuzzy
msgid "get nick color code"
msgstr "цвет чата"
msgid ""
"get nick color code (*deprecated* since version 1.5, replaced by \"nick_color"
"\")"
msgstr ""
#, fuzzy
msgid "get nick color name"
msgstr "цвет чата"
msgid ""
"get nick color name (*deprecated* since version 1.5, replaced by "
"\"nick_color_name\")"
msgstr ""
#, fuzzy
msgid "get buffer pointer for an IRC server/channel/nick"
@ -8331,6 +8333,14 @@ msgstr ""
msgid "rgb,limit (limit is optional and is set to 256 by default)"
msgstr ""
#, fuzzy
msgid "get nick color code"
msgstr "цвет чата"
#, fuzzy
msgid "get nick color name"
msgstr "цвет чата"
#, fuzzy
msgid "list of bars"
msgstr "Список сокращений:\n"
@ -8679,10 +8689,6 @@ msgstr ""
msgid "script name (wildcard \"*\" is allowed) (optional)"
msgstr ""
#, fuzzy
msgid "callback of a script"
msgstr "Список сокращений:\n"
#, fuzzy, c-format
msgid ""
"%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)"
@ -10655,3 +10661,7 @@ msgstr "%s нет аргумента для параметра \"%s\"\n"
#, fuzzy, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s DCC: не могу соединиться с отправителем\n"
#, fuzzy
#~ msgid "callback of a script"
#~ msgstr "Список сокращений:\n"

View File

@ -92,6 +92,8 @@ SET(WEECHAT_SOURCES
./src/gui/gui-main.h
./src/gui/gui-mouse.c
./src/gui/gui-mouse.h
./src/gui/gui-nick.c
./src/gui/gui-nick.h
./src/gui/gui-nicklist.c
./src/gui/gui-nicklist.h
./src/gui/gui-window.c

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2016-03-17 20:41+0100\n"
"POT-Creation-Date: 2016-04-04 14:36+0200\n"
"PO-Revision-Date: 2016-01-05 07:51+0100\n"
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2561,6 +2561,26 @@ msgid ""
"before processing event"
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\"); look "
"up for nicks is with exact case then lower case, so it's possible to use "
"only lower case for nicks in this option"
msgstr ""
msgid ""
"hash algorithm used to find the color for a nick: djb2 = variant of djb2 "
"(position of letters matters: anagrams of a nick have different color), sum "
"= sum of letters"
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 "text to display before nick in prefix of message, example: \"<\""
msgstr ""
@ -6077,26 +6097,6 @@ msgid ""
"channel/pv of server)"
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\"); look "
"up for nicks is with exact case then lower case, so it's possible to use "
"only lower case for nicks in this option"
msgstr ""
msgid ""
"hash algorithm used to find the color for a nick: djb2 = variant of djb2 "
"(position of letters matters: anagrams of a nick have different color), sum "
"= sum of letters"
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): speakers = "
"all speakers (including highlights), speakers_highlights = only speakers "
@ -6410,11 +6410,15 @@ msgstr ""
msgid "IRC host (like `:nick!name@server.com`)"
msgstr ""
msgid "get nick color code"
msgstr "rumuz renk kodu al"
msgid ""
"get nick color code (*deprecated* since version 1.5, replaced by \"nick_color"
"\")"
msgstr ""
msgid "get nick color name"
msgstr "rumuz renk ismi al"
msgid ""
"get nick color name (*deprecated* since version 1.5, replaced by "
"\"nick_color_name\")"
msgstr ""
msgid "get buffer pointer for an IRC server/channel/nick"
msgstr ""
@ -7523,6 +7527,12 @@ msgstr ""
msgid "rgb,limit (limit is optional and is set to 256 by default)"
msgstr ""
msgid "get nick color code"
msgstr "rumuz renk kodu al"
msgid "get nick color name"
msgstr "rumuz renk ismi al"
msgid "list of bars"
msgstr ""
@ -7812,10 +7822,6 @@ msgstr ""
msgid "script name (wildcard \"*\" is allowed) (optional)"
msgstr ""
#, fuzzy
msgid "callback of a script"
msgstr "betiklerin listesi"
#, c-format
msgid ""
"%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)"
@ -9654,3 +9660,7 @@ msgstr ""
#, c-format
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr ""
#, fuzzy
#~ msgid "callback of a script"
#~ msgstr "betiklerin listesi"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2016-03-17 20:41+0100\n"
"POT-Creation-Date: 2016-04-04 14:36+0200\n"
"PO-Revision-Date: 2014-08-16 10:27+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2556,6 +2556,26 @@ msgid ""
"before processing event"
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\"); look "
"up for nicks is with exact case then lower case, so it's possible to use "
"only lower case for nicks in this option"
msgstr ""
msgid ""
"hash algorithm used to find the color for a nick: djb2 = variant of djb2 "
"(position of letters matters: anagrams of a nick have different color), sum "
"= sum of letters"
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 "text to display before nick in prefix of message, example: \"<\""
msgstr ""
@ -5999,26 +6019,6 @@ msgid ""
"channel/pv of server)"
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\"); look "
"up for nicks is with exact case then lower case, so it's possible to use "
"only lower case for nicks in this option"
msgstr ""
msgid ""
"hash algorithm used to find the color for a nick: djb2 = variant of djb2 "
"(position of letters matters: anagrams of a nick have different color), sum "
"= sum of letters"
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): speakers = "
"all speakers (including highlights), speakers_highlights = only speakers "
@ -6330,10 +6330,14 @@ msgstr ""
msgid "IRC host (like `:nick!name@server.com`)"
msgstr ""
msgid "get nick color code"
msgid ""
"get nick color code (*deprecated* since version 1.5, replaced by \"nick_color"
"\")"
msgstr ""
msgid "get nick color name"
msgid ""
"get nick color name (*deprecated* since version 1.5, replaced by "
"\"nick_color_name\")"
msgstr ""
msgid "get buffer pointer for an IRC server/channel/nick"
@ -7447,6 +7451,12 @@ msgstr ""
msgid "rgb,limit (limit is optional and is set to 256 by default)"
msgstr ""
msgid "get nick color code"
msgstr ""
msgid "get nick color name"
msgstr ""
msgid "list of bars"
msgstr ""
@ -7736,9 +7746,6 @@ msgstr ""
msgid "script name (wildcard \"*\" is allowed) (optional)"
msgstr ""
msgid "callback of a script"
msgstr ""
#, c-format
msgid ""
"%s%s: warning, invalid pointer (\"%s\") for function \"%s\" (script: %s)"

View File

@ -37,6 +37,7 @@
#include "weechat.h"
#include "wee-config.h"
#include "wee-hashtable.h"
#include "wee-hook.h"
#include "wee-log.h"
#include "wee-network.h"
@ -148,6 +149,9 @@ struct t_config_option *config_look_key_bind_safe;
struct t_config_option *config_look_key_grab_delay;
struct t_config_option *config_look_mouse;
struct t_config_option *config_look_mouse_timer_delay;
struct t_config_option *config_look_nick_color_force;
struct t_config_option *config_look_nick_color_hash;
struct t_config_option *config_look_nick_color_stop_chars;
struct t_config_option *config_look_nick_prefix;
struct t_config_option *config_look_nick_suffix;
struct t_config_option *config_look_paste_auto_add_newline;
@ -307,6 +311,9 @@ struct t_config_look_word_char_item *config_word_chars_highlight = NULL;
int config_word_chars_highlight_count = 0;
struct t_config_look_word_char_item *config_word_chars_input = NULL;
int config_word_chars_input_count = 0;
char **config_nick_colors = NULL;
int config_num_nick_colors = 0;
struct t_hashtable *config_hashtable_nick_color_force = NULL;
/*
@ -659,6 +666,74 @@ config_compute_prefix_max_length_all_buffers ()
}
}
/*
* Sets nick colors using option "weechat.color.chat_nick_colors".
*/
void
config_set_nick_colors ()
{
if (config_nick_colors)
{
string_free_split (config_nick_colors);
config_nick_colors = NULL;
config_num_nick_colors = 0;
}
config_nick_colors = string_split (
CONFIG_STRING(config_color_chat_nick_colors),
",", 0, 0,
&config_num_nick_colors);
}
/*
* Callback for changes on option "weechat.look.nick_color_force".
*/
void
config_change_look_nick_color_force (const void *pointer, void *data,
struct t_config_option *option)
{
char **items, *pos;
int num_items, i;
/* make C compiler happy */
(void) pointer;
(void) data;
(void) option;
if (!config_hashtable_nick_color_force)
{
config_hashtable_nick_color_force = hashtable_new (
32,
WEECHAT_HASHTABLE_STRING,
WEECHAT_HASHTABLE_STRING,
NULL, NULL);
}
else
{
hashtable_remove_all (config_hashtable_nick_color_force);
}
items = string_split (CONFIG_STRING(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';
hashtable_set (config_hashtable_nick_color_force,
items[i],
pos + 1);
}
}
string_free_split (items);
}
}
/*
* Callback for changes on options "weechat.look.nick_prefix" and
* "weechat.look.nick_suffix".
@ -1047,6 +1122,7 @@ config_change_nick_colors (const void *pointer, void *data,
(void) data;
(void) option;
config_set_nick_colors ();
gui_color_buffer_display ();
}
@ -1208,6 +1284,8 @@ config_weechat_init_after_read ()
/* apply filters on all buffers */
gui_filter_all_buffers ();
config_change_look_nick_color_force (NULL, NULL, NULL);
}
/*
@ -2926,6 +3004,37 @@ config_weechat_init_options ()
"wait this delay before processing event"),
NULL, 1, 10000, "100", NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
config_look_nick_color_force = config_file_new_option (
weechat_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\"); look up for nicks is with "
"exact case then lower case, so it's possible to use only lower "
"case for nicks in this option"),
NULL, 0, 0, "", NULL, 0,
NULL, NULL, NULL,
&config_change_look_nick_color_force, NULL, NULL,
NULL, NULL, NULL);
config_look_nick_color_hash = config_file_new_option (
weechat_config_file, ptr_section,
"nick_color_hash", "integer",
N_("hash algorithm used to find the color for a nick: djb2 = variant "
"of djb2 (position of letters matters: anagrams of a nick have "
"different color), sum = sum of letters"),
"djb2|sum", 0, 0, "sum", NULL, 0,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
config_look_nick_color_stop_chars = config_file_new_option (
weechat_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, NULL,
NULL, NULL, NULL,
NULL, NULL, NULL);
config_look_nick_prefix = config_file_new_option (
weechat_config_file, ptr_section,
"nick_prefix", "string",
@ -4387,4 +4496,17 @@ config_weechat_free ()
config_word_chars_input = NULL;
config_word_chars_input_count = 0;
}
if (config_nick_colors)
{
string_free_split (config_nick_colors);
config_nick_colors = NULL;
config_num_nick_colors = 0;
}
if (config_hashtable_nick_color_force)
{
hashtable_free (config_hashtable_nick_color_force);
config_hashtable_nick_color_force = NULL;
}
}

View File

@ -53,6 +53,12 @@ enum t_config_look_buffer_search_where
CONFIG_LOOK_BUFFER_SEARCH_PREFIX_MESSAGE,
};
enum t_config_look_nick_color_hash
{
CONFIG_LOOK_NICK_COLOR_HASH_DJB2 = 0,
CONFIG_LOOK_NICK_COLOR_HASH_SUM,
};
enum t_config_look_prefix_align
{
CONFIG_LOOK_PREFIX_ALIGN_NONE = 0,
@ -193,6 +199,9 @@ extern struct t_config_option *config_look_key_bind_safe;
extern struct t_config_option *config_look_key_grab_delay;
extern struct t_config_option *config_look_mouse;
extern struct t_config_option *config_look_mouse_timer_delay;
extern struct t_config_option *config_look_nick_color_force;
extern struct t_config_option *config_look_nick_color_hash;
extern struct t_config_option *config_look_nick_color_stop_chars;
extern struct t_config_option *config_look_nick_prefix;
extern struct t_config_option *config_look_nick_suffix;
extern struct t_config_option *config_look_paste_auto_add_newline;
@ -338,7 +347,11 @@ extern struct t_config_look_word_char_item *config_word_chars_highlight;
extern int config_word_chars_highlight_count;
extern struct t_config_look_word_char_item *config_word_chars_input;
extern int config_word_chars_input_count;
extern char **config_nick_colors;
extern int config_num_nick_colors;
extern struct t_hashtable *config_hashtable_nick_color_force;
extern void config_set_nick_colors ();
extern struct t_config_option *config_weechat_debug_get (const char *plugin_name);
extern int config_weechat_debug_set (const char *plugin_name,
const char *value);

View File

@ -36,11 +36,13 @@ gui-layout.c gui-layout.h
gui-line.c gui-line.h
gui-main.h
gui-mouse.c gui-mouse.h
gui-nick.c gui-nick.h
gui-nicklist.c gui-nicklist.h
gui-window.c gui-window.h)
include_directories(${CMAKE_BINARY_DIR})
add_library(weechat_gui_common STATIC ${LIB_GUI_COMMON_SRC})
list(APPEND STATIC_LIBS weechat_gui_common)
if(ENABLE_NCURSES)
subdirs(curses)

View File

@ -56,6 +56,8 @@ lib_weechat_gui_common_a_SOURCES = gui-bar.c \
gui-main.h \
gui-mouse.c \
gui-mouse.h \
gui-nick.c \
gui-nick.h \
gui-nicklist.c \
gui-nicklist.h \
gui-window.c \

View File

@ -81,7 +81,7 @@ add_executable(${EXECUTABLE} ${WEECHAT_CURSES_MAIN_SRC})
add_dependencies(${EXECUTABLE} weechat_gui_curses)
# Due to circular references, we must link two times with libweechat_core.a
# Due to circular references, we must link two times with libweechat_core.a and libweechat_gui_common.a
target_link_libraries(${EXECUTABLE} ${STATIC_LIBS} weechat_gui_curses ${EXTRA_LIBS} ${STATIC_LIBS})
# Create a symbolic link weechat-curses -> weechat

259
src/gui/gui-nick.c Normal file
View File

@ -0,0 +1,259 @@
/*
* gui-nick.c - nick functions (used by all GUI)
*
* Copyright (C) 2003-2016 Sébastien Helleu <flashcode@flashtux.org>
*
* This file is part of WeeChat, the extensible chat client.
*
* WeeChat is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* WeeChat is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdlib.h>
#include <string.h>
#include "../core/weechat.h"
#include "../core/wee-config.h"
#include "../core/wee-hashtable.h"
#include "../core/wee-string.h"
#include "../core/wee-utf8.h"
#include "gui-nick.h"
#include "gui-color.h"
/*
* Hashes a nickname to find color.
*
* Returns a number which is the index of color in the nicks colors of option
* "weechat.color.chat_nick_colors".
*/
int
gui_nick_hash_color (const char *nickname)
{
unsigned long color;
const char *ptr_nick;
if (!nickname || !nickname[0])
return 0;
if (!config_nick_colors)
config_set_nick_colors ();
if (config_num_nick_colors == 0)
return 0;
ptr_nick = nickname;
color = 0;
switch (CONFIG_INTEGER(config_look_nick_color_hash))
{
case CONFIG_LOOK_NICK_COLOR_HASH_DJB2:
/* variant of djb2 hash */
color = 5381;
while (ptr_nick && ptr_nick[0])
{
color ^= (color << 5) + (color >> 2) + utf8_char_int (ptr_nick);
ptr_nick = utf8_next_char (ptr_nick);
}
break;
case CONFIG_LOOK_NICK_COLOR_HASH_SUM:
/* sum of letters */
color = 0;
while (ptr_nick && ptr_nick[0])
{
color += utf8_char_int (ptr_nick);
ptr_nick = utf8_next_char (ptr_nick);
}
break;
}
return (color % config_num_nick_colors);
}
/*
* Gets forced color for a nick.
*
* Returns the name of color (for example: "green"), NULL if no color is forced
* for nick.
*/
const char *
gui_nick_get_forced_color (const char *nickname)
{
const char *forced_color;
char *nick_lower;
if (!nickname || !nickname[0])
return NULL;
forced_color = hashtable_get (config_hashtable_nick_color_force, nickname);
if (forced_color)
return forced_color;
nick_lower = strdup (nickname);
if (nick_lower)
{
string_tolower (nick_lower);
forced_color = hashtable_get (config_hashtable_nick_color_force,
nick_lower);
free (nick_lower);
}
return forced_color;
}
/*
* Duplicates a nick and stops at first char in list (using option
* weechat.look.nick_color_stop_chars).
*
* Note: result must be freed after use.
*/
char *
gui_nick_strdup_for_color (const char *nickname)
{
int char_size, other_char_seen;
char *result, *pos, utf_char[16];
if (!nickname)
return NULL;
result = malloc (strlen (nickname) + 1);
pos = result;
other_char_seen = 0;
while (nickname[0])
{
char_size = utf8_char_size (nickname);
memcpy (utf_char, nickname, char_size);
utf_char[char_size] = '\0';
if (strstr (CONFIG_STRING(config_look_nick_color_stop_chars),
utf_char))
{
if (other_char_seen)
{
pos[0] = '\0';
return result;
}
}
else
{
other_char_seen = 1;
}
memcpy (pos, utf_char, char_size);
pos += char_size;
nickname += char_size;
}
pos[0] = '\0';
return result;
}
/*
* Finds a color code for a nick (according to nick letters).
*
* Returns a WeeChat color code (that can be used for display).
*/
const char *
gui_nick_find_color (const char *nickname)
{
int color;
char *nickname2;
const char *forced_color, *str_color;
if (!nickname || !nickname[0])
return gui_color_get_custom ("default");
if (!config_nick_colors)
config_set_nick_colors ();
if (config_num_nick_colors == 0)
return gui_color_get_custom ("default");
nickname2 = gui_nick_strdup_for_color (nickname);
/* look if color is forced */
forced_color = gui_nick_get_forced_color (
(nickname2) ? nickname2 : nickname);
if (forced_color)
{
forced_color = gui_color_get_custom (forced_color);
if (forced_color && forced_color[0])
{
if (nickname2)
free (nickname2);
return forced_color;
}
}
/* hash nickname to get color */
color = gui_nick_hash_color ((nickname2) ? nickname2 : nickname);
if (nickname2)
free (nickname2);
/* return color */
str_color = gui_color_get_custom (config_nick_colors[color]);
return (str_color[0]) ? str_color : gui_color_get_custom ("default");
}
/*
* Finds a color name for a nick (according to nick letters).
*
* Returns the name of a color (for example: "green").
*/
const char *
gui_nick_find_color_name (const char *nickname)
{
int color;
char *nickname2;
const char *forced_color;
static char *default_color = "default";
if (!nickname || !nickname[0])
return default_color;
if (!config_nick_colors)
config_set_nick_colors ();
if (config_num_nick_colors == 0)
return default_color;
nickname2 = gui_nick_strdup_for_color (nickname);
/* look if color is forced */
forced_color = gui_nick_get_forced_color (
(nickname2) ? nickname2 : nickname);
if (forced_color)
{
if (nickname2)
free (nickname2);
return forced_color;
}
/* hash nickname to get color */
color = gui_nick_hash_color ((nickname2) ? nickname2 : nickname);
if (nickname2)
free (nickname2);
/* return color name */
return config_nick_colors[color];
}

26
src/gui/gui-nick.h Normal file
View File

@ -0,0 +1,26 @@
/*
* Copyright (C) 2003-2016 Sébastien Helleu <flashcode@flashtux.org>
*
* This file is part of WeeChat, the extensible chat client.
*
* WeeChat is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* WeeChat is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with WeeChat. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef WEECHAT_GUI_NICK_H
#define WEECHAT_GUI_NICK_H 1
extern const char *gui_nick_find_color (const char *nickname);
extern const char *gui_nick_find_color_name (const char *nickname);
#endif /* WEECHAT_GUI_NICK_H */

View File

@ -83,9 +83,6 @@ struct t_config_option *irc_config_look_join_auto_add_chantype;
struct t_config_option *irc_config_look_msgbuffer_fallback;
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_color_force;
struct t_config_option *irc_config_look_nick_color_hash;
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_nick_mode;
struct t_config_option *irc_config_look_nick_mode_empty;
@ -150,11 +147,9 @@ struct t_config_option *irc_config_network_whois_double_nick;
struct t_config_option *irc_config_server_default[IRC_SERVER_NUM_OPTIONS];
struct t_hook *irc_config_hook_config_nick_colors = NULL;
char **irc_config_nick_colors = NULL;
int irc_config_num_nick_colors = 0;
struct t_hook *irc_config_hook_config_nick_color_options = NULL;
struct t_hook *irc_config_hook_config_chat_nick_colors = NULL;
struct t_hashtable *irc_config_hashtable_display_join_message = NULL;
struct t_hashtable *irc_config_hashtable_nick_color_force = NULL;
struct t_hashtable *irc_config_hashtable_nick_prefixes = NULL;
struct t_hashtable *irc_config_hashtable_color_mirc_remap = NULL;
char **irc_config_nicks_hide_password = NULL;
@ -233,28 +228,6 @@ irc_config_compute_nick_colors ()
irc_nick_nicklist_set_color_all ();
}
/*
* Sets nick colors using option "weechat.color.chat_nick_colors".
*/
void
irc_config_set_nick_colors ()
{
if (irc_config_nick_colors)
{
weechat_string_free_split (irc_config_nick_colors);
irc_config_nick_colors = NULL;
irc_config_num_nick_colors = 0;
}
irc_config_nick_colors =
weechat_string_split (
weechat_config_string (
weechat_config_get ("weechat.color.chat_nick_colors")),
",", 0, 0,
&irc_config_num_nick_colors);
}
/*
* Checks if channel modes arguments must be displayed or hidden
* (according to option irc.look.item_channel_modes_hide_args).
@ -295,7 +268,7 @@ irc_config_display_channel_modes_arguments (const char *modes)
}
/*
* Callback for changes on option "weechat.color.chat_nick_colors".
* Callback for changes on options changing nick colors.
*/
int
@ -308,7 +281,6 @@ irc_config_change_nick_colors_cb (const void *pointer, void *data,
(void) option;
(void) value;
irc_config_set_nick_colors ();
irc_config_compute_nick_colors ();
return WEECHAT_RC_OK;
@ -565,71 +537,6 @@ irc_config_change_look_highlight_tags_restrict (const void *pointer, void *data,
}
}
/*
* Callback for changes on option "irc.look.nick_color_force".
*/
void
irc_config_change_look_nick_color_force (const void *pointer, void *data,
struct t_config_option *option)
{
char **items, *pos;
int num_items, i;
/* make C compiler happy */
(void) pointer;
(void) data;
(void) option;
if (!irc_config_hashtable_nick_color_force)
{
irc_config_hashtable_nick_color_force = weechat_hashtable_new (
32,
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 ();
}
/*
* Callback for changes on options that change nick colors.
*/
void
irc_config_change_look_nick_colors (const void *pointer, void *data,
struct t_config_option *option)
{
/* make C compiler happy */
(void) pointer;
(void) data;
(void) option;
irc_config_compute_nick_colors ();
}
/*
* Callback for changes on option "irc.look.item_display_server".
*/
@ -2530,11 +2437,6 @@ irc_config_init ()
WEECHAT_HASHTABLE_STRING,
WEECHAT_HASHTABLE_STRING,
NULL, NULL);
irc_config_hashtable_nick_color_force = weechat_hashtable_new (
32,
WEECHAT_HASHTABLE_STRING,
WEECHAT_HASHTABLE_STRING,
NULL, NULL);
irc_config_hashtable_nick_prefixes = weechat_hashtable_new (
32,
WEECHAT_HASHTABLE_STRING,
@ -2821,39 +2723,6 @@ irc_config_init ()
"of server)"),
"none|next|near_server", 0, 0, "none", NULL, 0,
NULL, NULL, NULL, 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\"); look up for nicks is with "
"exact case then lower case, so it's possible to use only lower "
"case for nicks in this option"),
NULL, 0, 0, "", NULL, 0,
NULL, NULL, NULL,
&irc_config_change_look_nick_color_force, NULL, NULL,
NULL, NULL, NULL);
irc_config_look_nick_color_hash = weechat_config_new_option (
irc_config_file, ptr_section,
"nick_color_hash", "integer",
N_("hash algorithm used to find the color for a nick: djb2 = variant "
"of djb2 (position of letters matters: anagrams of a nick have "
"different color), sum = sum of letters"),
"djb2|sum", 0, 0, "sum", NULL, 0,
NULL, NULL, NULL,
&irc_config_change_look_nick_colors, 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, NULL,
&irc_config_change_look_nick_colors, NULL, NULL,
NULL, NULL, NULL);
irc_config_look_nick_completion_smart = weechat_config_new_option (
irc_config_file, ptr_section,
"nick_completion_smart", "integer",
@ -3396,7 +3265,10 @@ irc_config_init ()
}
irc_config_section_server = ptr_section;
irc_config_hook_config_nick_colors = weechat_hook_config (
irc_config_hook_config_nick_color_options = weechat_hook_config (
"weechat.look.nick_color_*",
&irc_config_change_nick_colors_cb, NULL, NULL);
irc_config_hook_config_chat_nick_colors = weechat_hook_config (
"weechat.color.chat_nick_colors",
&irc_config_change_nick_colors_cb, NULL, NULL);
@ -3420,7 +3292,6 @@ irc_config_read ()
{
irc_notify_new_for_all_servers ();
irc_config_change_look_display_join_message (NULL, NULL, NULL);
irc_config_change_look_nick_color_force (NULL, NULL, NULL);
irc_config_change_look_nicks_hide_password (NULL, NULL, NULL);
irc_config_change_color_nick_prefixes (NULL, NULL, NULL);
irc_config_change_color_mirc_remap (NULL, NULL, NULL);
@ -3452,16 +3323,16 @@ irc_config_free ()
{
weechat_config_free (irc_config_file);
if (irc_config_hook_config_nick_colors)
if (irc_config_hook_config_nick_color_options)
{
weechat_unhook (irc_config_hook_config_nick_colors);
irc_config_hook_config_nick_colors = NULL;
weechat_unhook (irc_config_hook_config_nick_color_options);
irc_config_hook_config_nick_color_options = NULL;
}
if (irc_config_nick_colors)
if (irc_config_hook_config_chat_nick_colors)
{
weechat_string_free_split (irc_config_nick_colors);
irc_config_nick_colors = NULL;
irc_config_num_nick_colors = 0;
weechat_unhook (irc_config_hook_config_chat_nick_colors);
irc_config_hook_config_chat_nick_colors = NULL;
}
if (irc_config_nicks_hide_password)
@ -3477,12 +3348,6 @@ irc_config_free ()
irc_config_hashtable_display_join_message = NULL;
}
if (irc_config_hashtable_nick_color_force)
{
weechat_hashtable_free (irc_config_hashtable_nick_color_force);
irc_config_hashtable_nick_color_force = NULL;
}
if (irc_config_hashtable_nick_prefixes)
{
weechat_hashtable_free (irc_config_hashtable_nick_prefixes);

View File

@ -62,12 +62,6 @@ enum t_irc_config_look_notice_as_pv
IRC_CONFIG_LOOK_NOTICE_AS_PV_ALWAYS,
};
enum t_irc_config_look_nick_color_hash
{
IRC_CONFIG_LOOK_NICK_COLOR_HASH_DJB2 = 0,
IRC_CONFIG_LOOK_NICK_COLOR_HASH_SUM,
};
enum t_irc_config_look_nick_mode
{
IRC_CONFIG_LOOK_NICK_MODE_NONE = 0,
@ -128,9 +122,6 @@ extern struct t_config_option *irc_config_look_join_auto_add_chantype;
extern struct t_config_option *irc_config_look_msgbuffer_fallback;
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_color_force;
extern struct t_config_option *irc_config_look_nick_color_hash;
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_nick_mode;
extern struct t_config_option *irc_config_look_nick_mode_empty;
@ -189,17 +180,12 @@ extern struct t_config_option *irc_config_network_whois_double_nick;
extern struct t_config_option *irc_config_server_default[];
extern char **irc_config_nick_colors;
extern int irc_config_num_nick_colors;
extern struct t_hashtable *irc_config_hashtable_display_join_message;
extern struct t_hashtable *irc_config_hashtable_nick_color_force;
extern struct t_hashtable *irc_config_hashtable_nick_prefixes;
extern struct t_hashtable *irc_config_hashtable_color_mirc_remap;
extern char **irc_config_nicks_hide_password;
extern int irc_config_num_nicks_hide_password;
extern void irc_config_set_nick_colors ();
extern int irc_config_display_channel_modes_arguments (const char *modes);
extern int irc_config_server_check_value_cb (const void *pointer, void *data,
struct t_config_option *option,

View File

@ -847,12 +847,14 @@ irc_info_init ()
&irc_info_info_irc_nick_from_host_cb, NULL, NULL);
weechat_hook_info (
"irc_nick_color",
N_("get nick color code"),
N_("get nick color code "
"(*deprecated* since version 1.5, replaced by \"nick_color\")"),
N_("nickname"),
&irc_info_info_irc_nick_color_cb, NULL, NULL);
weechat_hook_info (
"irc_nick_color_name",
N_("get nick color name"),
N_("get nick color name "
"(*deprecated* since version 1.5, replaced by \"nick_color_name\")"),
N_("nickname"),
&irc_info_info_irc_nick_color_name_cb, NULL, NULL);
weechat_hook_info (

View File

@ -92,130 +92,6 @@ irc_nick_is_nick (const char *string)
return 1;
}
/*
* Duplicates a nick and stops at first char in list (using option
* irc.look.nick_color_stop_chars).
*
* Note: result must be freed after use.
*/
char *
irc_nick_strdup_for_color (const char *nickname)
{
int char_size, other_char_seen;
char *result, *pos, utf_char[16];
result = malloc (strlen (nickname) + 1);
pos = result;
other_char_seen = 0;
while (nickname[0])
{
char_size = weechat_utf8_char_size (nickname);
memcpy (utf_char, nickname, char_size);
utf_char[char_size] = '\0';
if (strstr (weechat_config_string (irc_config_look_nick_color_stop_chars),
utf_char))
{
if (other_char_seen)
{
pos[0] = '\0';
return result;
}
}
else
{
other_char_seen = 1;
}
memcpy (pos, utf_char, char_size);
pos += char_size;
nickname += char_size;
}
pos[0] = '\0';
return result;
}
/*
* Hashes a nickname to find color.
*
* Returns a number which is the index of color in the nicks colors of option
* "weechat.color.chat_nick_colors".
*/
int
irc_nick_hash_color (const char *nickname)
{
unsigned long color;
const char *ptr_nick;
if (!irc_config_nick_colors)
irc_config_set_nick_colors ();
if (irc_config_num_nick_colors == 0)
return 0;
ptr_nick = nickname;
color = 0;
switch (weechat_config_integer (irc_config_look_nick_color_hash))
{
case IRC_CONFIG_LOOK_NICK_COLOR_HASH_DJB2:
/* variant of djb2 hash */
color = 5381;
while (ptr_nick && ptr_nick[0])
{
color ^= (color << 5) + (color >> 2) + weechat_utf8_char_int (ptr_nick);
ptr_nick = weechat_utf8_next_char (ptr_nick);
}
break;
case IRC_CONFIG_LOOK_NICK_COLOR_HASH_SUM:
/* sum of letters */
color = 0;
while (ptr_nick && ptr_nick[0])
{
color += weechat_utf8_char_int (ptr_nick);
ptr_nick = weechat_utf8_next_char (ptr_nick);
}
break;
}
return (color % irc_config_num_nick_colors);
}
/*
* Gets forced color for a nick.
*
* Returns the name of color (for example: "green"), NULL if no color is forced
* for nick.
*/
const char *
irc_nick_get_forced_color (const char *nickname)
{
const char *forced_color;
char *nick_lower;
if (!nickname)
return NULL;
forced_color = weechat_hashtable_get (irc_config_hashtable_nick_color_force,
nickname);
if (forced_color)
return forced_color;
nick_lower = strdup (nickname);
if (nick_lower)
{
weechat_string_tolower (nick_lower);
forced_color = weechat_hashtable_get (irc_config_hashtable_nick_color_force,
nick_lower);
free (nick_lower);
}
return forced_color;
}
/*
* Finds a color code for a nick (according to nick letters).
*
@ -225,34 +101,7 @@ irc_nick_get_forced_color (const char *nickname)
const char *
irc_nick_find_color (const char *nickname)
{
int color;
char *nickname2;
const char *forced_color, *str_color;
if (!irc_config_nick_colors)
irc_config_set_nick_colors ();
if (irc_config_num_nick_colors == 0)
return weechat_color ("default");
/* look if color is forced */
forced_color = irc_nick_get_forced_color (nickname);
if (forced_color)
{
forced_color = weechat_color (forced_color);
if (forced_color && forced_color[0])
return forced_color;
}
/* hash nickname to get color */
nickname2 = irc_nick_strdup_for_color (nickname);
color = irc_nick_hash_color ((nickname2) ? nickname2 : nickname);
if (nickname2)
free (nickname2);
/* return color */
str_color = weechat_color (irc_config_nick_colors[color]);
return (str_color[0]) ? str_color : weechat_color("default");
return weechat_info_get ("nick_color", nickname);
}
/*
@ -264,30 +113,7 @@ irc_nick_find_color (const char *nickname)
const char *
irc_nick_find_color_name (const char *nickname)
{
int color;
char *nickname2;
const char *forced_color;
static char *default_color = "default";
if (!irc_config_nick_colors)
irc_config_set_nick_colors ();
if (irc_config_num_nick_colors == 0)
return default_color;
/* look if color is forced */
forced_color = irc_nick_get_forced_color (nickname);
if (forced_color)
return forced_color;
/* hash nickname to get color */
nickname2 = irc_nick_strdup_for_color (nickname);
color = irc_nick_hash_color ((nickname2) ? nickname2 : nickname);
if (nickname2)
free (nickname2);
/* return color name */
return irc_config_nick_colors[color];
return weechat_info_get ("nick_color_name", nickname);
}
/*

View File

@ -59,6 +59,7 @@
#include "../gui/gui-key.h"
#include "../gui/gui-layout.h"
#include "../gui/gui-line.h"
#include "../gui/gui-nick.h"
#include "../gui/gui-nicklist.h"
#include "../gui/gui-window.h"
#include "plugin.h"
@ -785,6 +786,40 @@ plugin_api_info_color_rgb2term_cb (const void *pointer, void *data,
return value;
}
/*
* Returns nick color code for a nickname.
*/
const char *
plugin_api_info_nick_color_cb (const void *pointer, void *data,
const char *info_name,
const char *arguments)
{
/* make C compiler happy */
(void) pointer;
(void) data;
(void) info_name;
return gui_nick_find_color (arguments);
}
/*
* Returns nick color name for a nickname.
*/
const char *
plugin_api_info_nick_color_name_cb (const void *pointer, void *data,
const char *info_name,
const char *arguments)
{
/* make C compiler happy */
(void) pointer;
(void) data;
(void) info_name;
return gui_nick_find_color_name (arguments);
}
/*
* Returns WeeChat infolist "bar".
*
@ -1855,6 +1890,14 @@ plugin_api_init ()
N_("RGB color converted to terminal color (0-255)"),
N_("rgb,limit (limit is optional and is set to 256 by default)"),
&plugin_api_info_color_rgb2term_cb, NULL, NULL);
hook_info (NULL, "nick_color",
N_("get nick color code"),
N_("nickname"),
&plugin_api_info_nick_color_cb, NULL, NULL);
hook_info (NULL, "nick_color_name",
N_("get nick color name"),
N_("nickname"),
&plugin_api_info_nick_color_name_cb, NULL, NULL);
/* WeeChat core infolist hooks */
hook_infolist (NULL, "bar",