1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

irc: compute color in case insensitive way (closes #194)

Reintroduce infos "irc_nick_color" and "irc_nick_color_name" (that were
marked deprecated since version 1.5).

A server name is added in the two infos and is optional, for backward
compatibility.
This commit is contained in:
Sébastien Helleu
2023-08-24 09:05:35 +02:00
parent c2426e88c9
commit 6aa66b5363
23 changed files with 777 additions and 365 deletions
+1
View File
@@ -22,6 +22,7 @@ New features::
* buflist: increase max number of buflist items from 3 to 5 (issue #1703)
* fset: add variable `allowed_values` in options, add options fset.color.allowed_values and fset.color.allowed_values_selected
* fset: allow long type name in type filter
* irc: compute color in case insensitive way, reintroduce infos "irc_nick_color" and "irc_nick_color_name", add support of server name (issue #194)
* irc: add buffer for /list reply, add options irc.color.list_buffer_line_selected, irc.color.list_buffer_line_selected_bg, irc.look.list_buffer_sort, irc.look.list_buffer_scroll_horizontal, irc.look.new_list_position, irc.look.list_buffer_topic_strip_colors (issue #1972)
* irc: display commands 716/717 in private buffer (if present) (issue #146)
* irc: create default options irc.ctcp.* when file irc.conf is created (issue #1974)
+30
View File
@@ -59,6 +59,36 @@ back with the two following commands:
They will then be advertised in reply to "CTCP CLIENTINFO", which is now built
dynamically with these options.
[[v4.1.0_info_irc_nick_color]]
=== Infos irc_nick_color and irc_nick_color_name
The infos irc_nick_color and irc_nick_color_name, that were deprecated since
version 1.5 are now used again, with a change in parameter: the server is now
optional before the nick: "server,nick". +
The nick is first converted to lower case, following the value of CASEMAPPING
on the server, then hashed to compute the color. +
That means the color for a nick is now case insensitive (in the way IRC servers
are case insensitive, so with a limited range of chars only).
If a script was using this info with a comma in nickname (which should not happen
anyway), this is now interpreted as the server name, and the script must be
modified. +
Anyway, it is recommended to always give the server name to respect the
CASEMAPPING of the server and prevent any issue with a comma in the nickname.
For example nick color of "alice" and "ALICE" is now always guaranteed to be the
same:
----
# with server name (recommended)
weechat.info_get("irc_nick_color", "libera,alice") == weechat.info_get("irc_nick_color", "libera,ALICE")
weechat.info_get("irc_nick_color_name", "libera,alice") == weechat.info_get("irc_nick_color_name", "libera,ALICE")
# without server name (allowed but not recommended, kept for compatibility)
weechat.info_get("irc_nick_color", "alice") == weechat.info_get("irc_nick_color", "ALICE")
weechat.info_get("irc_nick_color_name", "alice") == weechat.info_get("irc_nick_color_name", "ALICE")
----
[[v4.1.0_fset_allowed_values]]
=== Allowed values for options on fset buffer
+10 -8
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-08-22 09:26+0200\n"
"POT-Creation-Date: 2023-08-24 09:00+0200\n"
"PO-Revision-Date: 2023-06-26 21:34+0200\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -9689,16 +9689,15 @@ msgid "IRC host (like `:nick!name@server.com`)"
msgstr "IRC host (jako `:nick!name@server.com`)"
msgid ""
"get nick color code (*deprecated* since version 1.5, replaced by "
"\"nick_color\")"
"get nick color code (nick is first converted to lower case, following the "
"value of CASEMAPPING on the server, defaulting to \"rfc1459\" if the server "
"is not given)"
msgstr ""
msgid "nickname"
msgstr "přezdívka"
msgid ""
"get nick color name (*deprecated* since version 1.5, replaced by "
"\"nick_color_name\")"
"get nick color name (nick is first converted to lower case, following the "
"value of CASEMAPPING on the server, defaulting to \"rfc1459\" if the server "
"is not given)"
msgstr ""
msgid "get buffer pointer for an IRC server/channel/nick"
@@ -14318,6 +14317,9 @@ msgstr "%s%s: vypršel časový limit \"%s\" pro %s"
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: nemohu se připojit\" neočekávaná chyba (%d)"
#~ msgid "nickname"
#~ msgstr "přezdívka"
#, fuzzy
#~ msgid "color for selected line"
#~ msgstr "sekce konfigu"
+36 -202
View File
@@ -26,7 +26,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-08-22 09:26+0200\n"
"POT-Creation-Date: 2023-08-24 09:00+0200\n"
"PO-Revision-Date: 2023-08-22 11:30+0200\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n"
@@ -5648,13 +5648,12 @@ msgstr ""
"\"%s\": %s"
#, c-format
#| msgid "%sWarning: %s, line %d: ignoring invalid value for option: %s"
msgid ""
"%sWarning: %s, line %d: ignoring invalid value for option in section \"%s\": "
"%s"
msgstr ""
"%sWarnung: %s, Zeile %d: ungültigen Wert ignoriert für Option in Sektion \""
"%s\": %s"
"%sWarnung: %s, Zeile %d: ungültigen Wert ignoriert für Option in Sektion "
"\"%s\": %s"
#, c-format
msgid "Reloading configuration file %s"
@@ -6655,87 +6654,6 @@ msgstr ""
msgid "bar item with list of buffers"
msgstr "Bar-Item mit der Liste von Buffern"
#| msgid ""
#| " enable: enable buflist\n"
#| "disable: disable buflist\n"
#| " toggle: toggle buflist\n"
#| " bar: add the \"buflist\" bar\n"
#| "refresh: force the refresh of the bar items (buflist, buflist2 and "
#| "buflist3)\n"
#| "\n"
#| "The lines with buffers are displayed using string evaluation (see /help "
#| "eval for the format), with these options:\n"
#| " - buflist.look.display_conditions: conditions to display a buffer in "
#| "the list\n"
#| " - buflist.format.buffer: format for a buffer which is not current "
#| "buffer\n"
#| " - buflist.format.buffer_current: format for the current buffer\n"
#| "\n"
#| "The following variables can be used in these options:\n"
#| " - bar item data (see hdata \"bar_item\" in API doc for a complete "
#| "list), for example:\n"
#| " - ${bar_item.name}\n"
#| " - window data, where the bar item is displayed (there's no window in "
#| "root bars, see hdata \"window\" in API doc for a complete list), for "
#| "example:\n"
#| " - ${window.number}\n"
#| " - ${window.buffer.full_name}\n"
#| " - buffer data (see hdata \"buffer\" in API doc for a complete list), "
#| "for example:\n"
#| " - ${buffer.number}\n"
#| " - ${buffer.name}\n"
#| " - ${buffer.full_name}\n"
#| " - ${buffer.short_name}\n"
#| " - ${buffer.nicklist_nicks_count}\n"
#| " - irc_server: IRC server data, defined only on an IRC buffer (see hdata "
#| "\"irc_server\" in API doc)\n"
#| " - irc_channel: IRC channel data, defined only on an IRC channel buffer "
#| "(see hdata \"irc_channel\" in API doc)\n"
#| " - extra variables added by buflist for convenience:\n"
#| " - ${format_buffer}: the evaluated value of option buflist.format."
#| "buffer; this can be used in option buflist.format.buffer_current to just "
#| "change the background color for example\n"
#| " - ${current_buffer}: a boolean (\"0\" or \"1\"), \"1\" if this is the "
#| "current buffer; it can be used in a condition: ${if:"
#| "${current_buffer}?...:...}\n"
#| " - ${merged}: a boolean (\"0\" or \"1\"), \"1\" if the buffer is "
#| "merged with at least another buffer; it can be used in a condition: ${if:"
#| "${merged}?...:...}\n"
#| " - ${format_number}: indented number with separator (evaluation of "
#| "option buflist.format.number)\n"
#| " - ${number}: indented number, for example \" 1\" if there are between "
#| "10 and 99 buffers; for merged buffers, this variable is set with number "
#| "for the first buffer and spaces for the next buffers with same number\n"
#| " - ${number2}: indented number, for example \" 1\" if there are "
#| "between 10 and 99 buffers\n"
#| " - ${number_displayed}: \"1\" if the number is displayed, otherwise "
#| "\"0\"\n"
#| " - ${indent}: indentation for name (channel and private buffers are "
#| "indented) (evaluation of option buflist.format.indent)\n"
#| " - ${format_nick_prefix}: colored nick prefix for a channel "
#| "(evaluation of option buflist.format.nick_prefix)\n"
#| " - ${color_nick_prefix}: color of nick prefix for a channel (set only "
#| "if the option buflist.look.nick_prefix is enabled)\n"
#| " - ${nick_prefix}: nick prefix for a channel (set only if the option "
#| "buflist.look.nick_prefix is enabled)\n"
#| " - ${format_name}: formatted name (evaluation of option buflist.format."
#| "name)\n"
#| " - ${name}: the short name (if set), with a fallback on the name\n"
#| " - ${color_hotlist}: the color depending on the highest hotlist level "
#| "for the buffer (evaluation of option buflist.format.hotlist_xxx where xxx "
#| "is the level)\n"
#| " - ${format_hotlist}: the formatted hotlist (evaluation of option "
#| "buflist.format.hotlist)\n"
#| " - ${hotlist}: the raw hotlist\n"
#| " - ${hotlist_priority}: \"none\", \"low\", \"message\", \"private\" or "
#| "\"highlight\"\n"
#| " - ${hotlist_priority_number}: -1 = none, 0 = low, 1 = message, 2 = "
#| "private, 3 = highlight\n"
#| " - ${format_lag}: the lag for an IRC server buffer, empty if there's "
#| "no lag (evaluation of option buflist.format.lag)\n"
#| " - ${format_tls_version}: indicator of TLS version for a server "
#| "buffer, empty for channels (evaluation of option buflist.format."
#| "tls_version)"
msgid ""
" enable: enable buflist\n"
"disable: disable buflist\n"
@@ -7106,15 +7024,12 @@ msgstr ""
"Trennzeichen for counts in hotlist (Hinweis: Inhalt wird evaluiert, siehe /"
"help buflist)"
#| msgid ""
#| "string displayed to indent channel and private buffers (note: content is "
#| "evaluated, see /help buflist)"
msgid ""
"string displayed to indent channel, private and list buffers (note: content "
"is evaluated, see /help buflist)"
msgstr ""
"Zeichen, welches zum Einrücken von Kanal-, Privat- und List-Buffern genutzt"
" wird (Hinweis: Inhalt ist evaluiert, siehe /help buflist)"
"Zeichen, welches zum Einrücken von Kanal-, Privat- und List-Buffern genutzt "
"wird (Hinweis: Inhalt ist evaluiert, siehe /help buflist)"
msgid ""
"format for lag on an IRC server buffer (note: content is evaluated, see /"
@@ -12142,21 +12057,16 @@ msgid "IRC host (like `:nick!name@server.com`)"
msgstr "IRC host (in der Form `:nick!name@server.com`)"
msgid ""
"get nick color code (*deprecated* since version 1.5, replaced by "
"\"nick_color\")"
"get nick color code (nick is first converted to lower case, following the "
"value of CASEMAPPING on the server, defaulting to \"rfc1459\" if the server "
"is not given)"
msgstr ""
"erhalte nick color code (*veraltet* ab Version 1.5, wird ersetzt durch "
"\"nick_color\")"
msgid "nickname"
msgstr "Nickname"
msgid ""
"get nick color name (*deprecated* since version 1.5, replaced by "
"\"nick_color_name\")"
"get nick color name (nick is first converted to lower case, following the "
"value of CASEMAPPING on the server, defaulting to \"rfc1459\" if the server "
"is not given)"
msgstr ""
"erhalte nick color name (*veraltet* ab Version 1.5, wird ersetzt durch "
"\"nick_color_name\")"
msgid "get buffer pointer for an IRC server/channel/nick"
msgstr "holt Buffer Pointer für einen IRC Server/Kanal/Nick"
@@ -15346,11 +15256,6 @@ msgstr ""
msgid "WeeChat script manager"
msgstr "WeeChat Skriptmanager"
#| msgid ""
#| "list [-o|-ol|-i|-il] || search <text> || show <script> || load|unload|"
#| "reload <script> [<script>...] || autoload|noautoload|toggleautoload "
#| "<script> [<script>...] || install|remove|installremove|hold [-q] <script> "
#| "[<script>...] || upgrade || update"
msgid ""
"list [-o|-ol|-i|-il] || search <text> || show <script> || load|unload|reload "
"<script> [<script>...] || autoload|noautoload|toggleautoload <script> "
@@ -15362,91 +15267,6 @@ msgstr ""
"[<script>...] || install|remove|installremove|hold [-q] <script> "
"[<script>...] || upgrade || update || up|down [<number>] || go <line>|end"
#| msgid ""
#| " list: list loaded scripts (all languages)\n"
#| " -o: send list of loaded scripts to buffer (string in "
#| "English)\n"
#| " -ol: send list of loaded scripts to buffer (translated "
#| "string)\n"
#| " -i: copy list of loaded scripts in command line (for sending "
#| "to buffer) (string in English)\n"
#| " -il: copy list of loaded scripts in command line (for sending "
#| "to buffer) (translated string)\n"
#| " search: search scripts by tags, language (python, perl, ...), "
#| "filename extension (py, pl, ...) or text; result is displayed on scripts "
#| "buffer\n"
#| " show: show detailed info about a script\n"
#| " load: load script(s)\n"
#| " unload: unload script(s)\n"
#| " reload: reload script(s)\n"
#| " autoload: autoload the script\n"
#| " noautoload: do not autoload the script\n"
#| "toggleautoload: toggle autoload\n"
#| " install: install/upgrade script(s)\n"
#| " remove: remove script(s)\n"
#| " installremove: install or remove script(s), depending on current state\n"
#| " hold: hold/unhold script(s) (a script held will not be upgraded "
#| "any more and cannot be removed)\n"
#| " -q: quiet mode: do not display messages\n"
#| " upgrade: upgrade all installed scripts which are obsolete (new "
#| "version available)\n"
#| " update: update local scripts cache\n"
#| "\n"
#| "Without argument, this command opens a buffer with list of scripts.\n"
#| "\n"
#| "On script buffer, the possible status for each script are:\n"
#| " * i a H r N\n"
#| " | | | | | |\n"
#| " | | | | | obsolete (new version available)\n"
#| " | | | | running (loaded)\n"
#| " | | | held\n"
#| " | | autoloaded\n"
#| " | installed\n"
#| " popular script\n"
#| "\n"
#| "In output of /script list, the possible status for each script are:\n"
#| " * ? i a H N\n"
#| " | | | | | |\n"
#| " | | | | | obsolete (new version available)\n"
#| " | | | | held\n"
#| " | | | autoloaded\n"
#| " | | installed\n"
#| " | unknown script (can not be downloaded/updated)\n"
#| " popular script\n"
#| "\n"
#| "Keys on script buffer:\n"
#| " alt+i install script\n"
#| " alt+r remove script\n"
#| " alt+l load script\n"
#| " alt+L reload script\n"
#| " alt+u unload script\n"
#| " alt+A autoload script\n"
#| " alt+h (un)hold script\n"
#| " alt+v view script\n"
#| "\n"
#| "Input allowed on script buffer:\n"
#| " i/r/l/L/u/A/h/v action on script (same as keys above)\n"
#| " q close buffer\n"
#| " $ refresh buffer\n"
#| " s:x,y sort buffer using keys x and y (see /help script.look."
#| "sort)\n"
#| " s: reset sort (use default sort)\n"
#| " word(s) filter scripts: search word(s) in scripts "
#| "(description, tags, ...)\n"
#| " * remove filter\n"
#| "\n"
#| "Mouse actions on script buffer:\n"
#| " wheel scroll list\n"
#| " left button select script\n"
#| " right button install/remove script\n"
#| "\n"
#| "Examples:\n"
#| " /script search url\n"
#| " /script install go.py urlserver.py\n"
#| " /script remove go.py\n"
#| " /script hold urlserver.py\n"
#| " /script reload urlserver\n"
#| " /script upgrade"
msgid ""
" list: list loaded scripts (all languages)\n"
" -o: send list of loaded scripts to buffer (string in English)\n"
@@ -15568,13 +15388,12 @@ msgstr ""
" upgrade: aktualisiert alle veralteten, installierten Skripten (sofern "
"eine neue Version verfügbar ist)\n"
" update: aktualisiert den lokalen Cache für die Skripten\n"
" up: bewegt die Auswahlzeile um die \"Anzahl\" der Zeilen nach"
" oben\n"
" down: bewegt die Auswahlziele um die \"Anzahl\" der Zeilen nach"
" unten\n"
" go: springt zu einer Zeile mit der entsprechenden Nummer, erste"
" Zeile ist 0 (\"end\" springt "
"zur letzten Zeile)\n"
" up: bewegt die Auswahlzeile um die \"Anzahl\" der Zeilen nach "
"oben\n"
" down: bewegt die Auswahlziele um die \"Anzahl\" der Zeilen nach "
"unten\n"
" go: springt zu einer Zeile mit der entsprechenden Nummer, erste "
"Zeile ist 0 (\"end\" springt zur letzten Zeile)\n"
"\n"
"Ohne Angaben von Argumenten öffnet dieser Befehl einen Buffer, in welchem "
"eine Liste der Skripten dargestellt wird.\n"
@@ -16431,8 +16250,7 @@ msgstr "verwaltet Trigger, das Schweizer Armeemesser für WeeChat"
msgid ""
"list [-o|-ol|-i|-il] || listfull || listdefault || add|addoff|addreplace "
"<name> <hook> "
"[\"<arguments>\" [\"<conditions>\" [\"<regex>\" [\"<command>\" [\"<"
"return_code>\" [\"<post_action>\"]]]]]] "
"[\"<arguments>\" [\"<conditions>\" [\"<regex>\" [\"<command>\" [\"<return_code>\" [\"<post_action>\"]]]]]] "
"|| addinput [<hook>] || input|output|recreate <name> || set <name> <option> "
"<value> || rename|copy <name> <new_name> || enable|disable|toggle [<name>|-"
"all [<name>...]] || restart <name>|-all [<name>...] || show <name> || del "
@@ -16441,8 +16259,7 @@ msgid ""
msgstr ""
"list [-o|-ol|-i|-il] || listfull || listdefault || add|addoff|addreplace "
"<name> <hook> "
"[\"<arguments>\" [\"<conditions>\" [\"<regex>\" [\"<command>\" [\"<"
"return_code>\" [\"<post_action>\"]]]]]] "
"[\"<arguments>\" [\"<conditions>\" [\"<regex>\" [\"<command>\" [\"<return_code>\" [\"<post_action>\"]]]]]] "
"|| addinput [<hook>] || input|output|recreate <name> || set <name> <option> "
"<value> || rename|copy <name> <new_name> || enable|disable|toggle [<name>|-"
"all [<name>...]] || restart <name>|-all [<name>...] || show <name> || del "
@@ -17358,6 +17175,23 @@ msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr ""
"%s%s: Verbindung konnte nicht hergestellt werden: unerwarteter Fehler (%d)"
#~ msgid ""
#~ "get nick color code (*deprecated* since version 1.5, replaced by "
#~ "\"nick_color\")"
#~ msgstr ""
#~ "erhalte nick color code (*veraltet* ab Version 1.5, wird ersetzt durch "
#~ "\"nick_color\")"
#~ msgid "nickname"
#~ msgstr "Nickname"
#~ msgid ""
#~ "get nick color name (*deprecated* since version 1.5, replaced by "
#~ "\"nick_color_name\")"
#~ msgstr ""
#~ "erhalte nick color name (*veraltet* ab Version 1.5, wird ersetzt durch "
#~ "\"nick_color_name\")"
#, fuzzy
#~| msgid "color for section"
#~ msgid "color for selected line"
+10 -8
View File
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-08-22 09:26+0200\n"
"POT-Creation-Date: 2023-08-24 09:00+0200\n"
"PO-Revision-Date: 2023-06-26 21:34+0200\n"
"Last-Translator: Santiago Forero <santiago@forero.xyz>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -10415,16 +10415,15 @@ msgid "IRC host (like `:nick!name@server.com`)"
msgstr "IRC host (como `:apodo!nombre@servidor.com`)"
msgid ""
"get nick color code (*deprecated* since version 1.5, replaced by "
"\"nick_color\")"
"get nick color code (nick is first converted to lower case, following the "
"value of CASEMAPPING on the server, defaulting to \"rfc1459\" if the server "
"is not given)"
msgstr ""
msgid "nickname"
msgstr "apodo"
msgid ""
"get nick color name (*deprecated* since version 1.5, replaced by "
"\"nick_color_name\")"
"get nick color name (nick is first converted to lower case, following the "
"value of CASEMAPPING on the server, defaulting to \"rfc1459\" if the server "
"is not given)"
msgstr ""
msgid "get buffer pointer for an IRC server/channel/nick"
@@ -14998,6 +14997,9 @@ msgstr "%s%s: tiempo de espera máximo para \"%s\" con %s"
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: no es posible conectarse: error (%d)"
#~ msgid "nickname"
#~ msgstr "apodo"
#, fuzzy
#~ msgid "color for selected line"
#~ msgstr "sección de configuración"
+31 -13
View File
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-08-22 09:26+0200\n"
"PO-Revision-Date: 2023-08-22 09:28+0200\n"
"POT-Creation-Date: 2023-08-24 09:00+0200\n"
"PO-Revision-Date: 2023-08-24 09:01+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@@ -11821,21 +11821,22 @@ msgid "IRC host (like `:nick!name@server.com`)"
msgstr "host IRC (comme `:pseudo!nom@serveur.com`)"
msgid ""
"get nick color code (*deprecated* since version 1.5, replaced by "
"\"nick_color\")"
"get nick color code (nick is first converted to lower case, following the "
"value of CASEMAPPING on the server, defaulting to \"rfc1459\" if the server "
"is not given)"
msgstr ""
"retourne le code couleur du pseudo (*obsolète* depuis la version 1.5, "
"remplacé par \"nick_color\")"
msgid "nickname"
msgstr "pseudo"
"retourne le code couleur du pseudo (le pseudo est d'abord converti en "
"minuscules, en suivant la valeur de CASEMAPPING sur le serveur, par défaut "
"\"rfc1459\" si le serveur n'est pas fourni)"
msgid ""
"get nick color name (*deprecated* since version 1.5, replaced by "
"\"nick_color_name\")"
"get nick color name (nick is first converted to lower case, following the "
"value of CASEMAPPING on the server, defaulting to \"rfc1459\" if the server "
"is not given)"
msgstr ""
"retourne le nom de la couleur du pseudo (*obsolète* depuis la version 1.5, "
"remplacé par \"nick_color_name\")"
"retourne le nom de la couleur du pseudo (le pseudo est d'abord converti en "
"minuscules, en suivant la valeur de CASEMAPPING sur le serveur, par défaut "
"\"rfc1459\" si le serveur n'est pas fourni)"
msgid "get buffer pointer for an IRC server/channel/nick"
msgstr "retourne le pointeur vers le tampon pour un serveur/canal/pseudo IRC"
@@ -16877,6 +16878,23 @@ 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 ""
#~ "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 "nickname"
#~ msgstr "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 "color for selected line"
#~ msgstr "couleur pour la ligne sélectionnée"
+11 -9
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-08-22 09:26+0200\n"
"POT-Creation-Date: 2023-08-24 09:00+0200\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -9126,17 +9126,15 @@ msgid "IRC host (like `:nick!name@server.com`)"
msgstr ""
msgid ""
"get nick color code (*deprecated* since version 1.5, replaced by "
"\"nick_color\")"
"get nick color code (nick is first converted to lower case, following the "
"value of CASEMAPPING on the server, defaulting to \"rfc1459\" if the server "
"is not given)"
msgstr ""
#, fuzzy
msgid "nickname"
msgstr "[-all] név"
msgid ""
"get nick color name (*deprecated* since version 1.5, replaced by "
"\"nick_color_name\")"
"get nick color name (nick is first converted to lower case, following the "
"value of CASEMAPPING on the server, defaulting to \"rfc1459\" if the server "
"is not given)"
msgstr ""
#, fuzzy
@@ -13574,6 +13572,10 @@ msgstr "%s hiányzó argumentum a(z) \"%s\" opciónak\n"
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 "nickname"
#~ msgstr "[-all] név"
#, fuzzy
#~ msgid "color for selected line"
#~ msgstr "konfigurációs paraméterek beállítása"
+10 -8
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-08-22 09:26+0200\n"
"POT-Creation-Date: 2023-08-24 09:00+0200\n"
"PO-Revision-Date: 2023-06-26 21:34+0200\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -10146,16 +10146,15 @@ msgid "IRC host (like `:nick!name@server.com`)"
msgstr "host IRC (come `:nick!nome@server.com`)"
msgid ""
"get nick color code (*deprecated* since version 1.5, replaced by "
"\"nick_color\")"
"get nick color code (nick is first converted to lower case, following the "
"value of CASEMAPPING on the server, defaulting to \"rfc1459\" if the server "
"is not given)"
msgstr ""
msgid "nickname"
msgstr "nick"
msgid ""
"get nick color name (*deprecated* since version 1.5, replaced by "
"\"nick_color_name\")"
"get nick color name (nick is first converted to lower case, following the "
"value of CASEMAPPING on the server, defaulting to \"rfc1459\" if the server "
"is not given)"
msgstr ""
msgid "get buffer pointer for an IRC server/channel/nick"
@@ -14768,6 +14767,9 @@ msgstr "%s%s: timeout per \"%s\" con %s"
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: impossibile connettersi al mittente"
#~ msgid "nickname"
#~ msgstr "nick"
#, fuzzy
#~ msgid "color for selected line"
#~ msgstr "sezione di configurazione"
+24 -12
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-08-22 09:26+0200\n"
"POT-Creation-Date: 2023-08-24 09:00+0200\n"
"PO-Revision-Date: 2023-08-08 07:13+0200\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
@@ -11349,21 +11349,16 @@ msgid "IRC host (like `:nick!name@server.com`)"
msgstr "IRC ホスト (例: `:nick!name@server.com`)"
msgid ""
"get nick color code (*deprecated* since version 1.5, replaced by "
"\"nick_color\")"
"get nick color code (nick is first converted to lower case, following the "
"value of CASEMAPPING on the server, defaulting to \"rfc1459\" if the server "
"is not given)"
msgstr ""
"ニックネームの色コードを取得 (バージョン 1.5 で *廃止* されました。代わりに "
"\"nick_color\" を使ってください)"
msgid "nickname"
msgstr "ニックネーム"
msgid ""
"get nick color name (*deprecated* since version 1.5, replaced by "
"\"nick_color_name\")"
"get nick color name (nick is first converted to lower case, following the "
"value of CASEMAPPING on the server, defaulting to \"rfc1459\" if the server "
"is not given)"
msgstr ""
"ニックネームの色名を取得 (バージョン 1.5 で *廃止* されました。代わりに "
"\"nick_color\" を使ってください)"
msgid "get buffer pointer for an IRC server/channel/nick"
msgstr "ある IRC サーバ/チャンネル/ニックネームのバッファポインタを取得"
@@ -16253,6 +16248,23 @@ msgstr "%s%s: \"%s\" のタイムアウト %s"
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: 接続できません: 未定義のエラー (%d)"
#~ msgid ""
#~ "get nick color code (*deprecated* since version 1.5, replaced by "
#~ "\"nick_color\")"
#~ msgstr ""
#~ "ニックネームの色コードを取得 (バージョン 1.5 で *廃止* されました。代わり"
#~ "に \"nick_color\" を使ってください)"
#~ msgid "nickname"
#~ msgstr "ニックネーム"
#~ msgid ""
#~ "get nick color name (*deprecated* since version 1.5, replaced by "
#~ "\"nick_color_name\")"
#~ msgstr ""
#~ "ニックネームの色名を取得 (バージョン 1.5 で *廃止* されました。代わりに "
#~ "\"nick_color\" を使ってください)"
#, fuzzy
#~| msgid "color for section"
#~ msgid "color for selected line"
+24 -12
View File
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-08-22 09:26+0200\n"
"POT-Creation-Date: 2023-08-24 09:00+0200\n"
"PO-Revision-Date: 2023-08-08 07:13+0200\n"
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
"Language-Team: Polish <kde-i18n-doc@kde.org>\n"
@@ -12466,21 +12466,16 @@ msgid "IRC host (like `:nick!name@server.com`)"
msgstr "Host IRC (jak `:nick!nazwa@serwer.com`)"
msgid ""
"get nick color code (*deprecated* since version 1.5, replaced by "
"\"nick_color\")"
"get nick color code (nick is first converted to lower case, following the "
"value of CASEMAPPING on the server, defaulting to \"rfc1459\" if the server "
"is not given)"
msgstr ""
"pobierz kod koloru nicka (*przestarzałe* od wersji 1.5, zamienione przez "
"\"nick_color\")"
msgid "nickname"
msgstr "nazwa użytkownika"
msgid ""
"get nick color name (*deprecated* since version 1.5, replaced by "
"\"nick_color_name\")"
"get nick color name (nick is first converted to lower case, following the "
"value of CASEMAPPING on the server, defaulting to \"rfc1459\" if the server "
"is not given)"
msgstr ""
"pobierz nazwę koloru nicka (*przestarzałe* od wersji 1.5, zamienione przez "
"\"nick_color_name\")"
msgid "get buffer pointer for an IRC server/channel/nick"
msgstr "pobiera wskaźnik dla serwera/kanału/nicku IRC"
@@ -17740,6 +17735,23 @@ msgstr "%s%s: przekroczono czas na \"%s\" z %s"
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: nie można połączyć: niespodziewany błąd (%d)"
#~ msgid ""
#~ "get nick color code (*deprecated* since version 1.5, replaced by "
#~ "\"nick_color\")"
#~ msgstr ""
#~ "pobierz kod koloru nicka (*przestarzałe* od wersji 1.5, zamienione przez "
#~ "\"nick_color\")"
#~ msgid "nickname"
#~ msgstr "nazwa użytkownika"
#~ msgid ""
#~ "get nick color name (*deprecated* since version 1.5, replaced by "
#~ "\"nick_color_name\")"
#~ msgstr ""
#~ "pobierz nazwę koloru nicka (*przestarzałe* od wersji 1.5, zamienione "
#~ "przez \"nick_color_name\")"
#, fuzzy
#~| msgid "color for section"
#~ msgid "color for selected line"
+24 -12
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-08-22 09:26+0200\n"
"POT-Creation-Date: 2023-08-24 09:00+0200\n"
"PO-Revision-Date: 2023-06-26 21:34+0200\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n"
@@ -11099,21 +11099,16 @@ msgid "IRC host (like `:nick!name@server.com`)"
msgstr "host de IRC (tal como `:nick!nome@servidor.com`)"
msgid ""
"get nick color code (*deprecated* since version 1.5, replaced by "
"\"nick_color\")"
"get nick color code (nick is first converted to lower case, following the "
"value of CASEMAPPING on the server, defaulting to \"rfc1459\" if the server "
"is not given)"
msgstr ""
"obter código de cor do nick (*obsoleto* desde a versão 1.5, substituído por "
"\"nick_color\")"
msgid "nickname"
msgstr "nickname"
msgid ""
"get nick color name (*deprecated* since version 1.5, replaced by "
"\"nick_color_name\")"
"get nick color name (nick is first converted to lower case, following the "
"value of CASEMAPPING on the server, defaulting to \"rfc1459\" if the server "
"is not given)"
msgstr ""
"obter nome da cor do nick (*obsoleto* desde a versão 1.5, substituído por "
"\"nick_color_name\")"
msgid "get buffer pointer for an IRC server/channel/nick"
msgstr "obter o ponteiro de buffer para um servidor/canal/nick de IRC"
@@ -15999,6 +15994,23 @@ msgstr "%s%s: tempo limite de \"%s\" com %s"
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: não foi possível conectar: erro inesperado (%d)"
#~ msgid ""
#~ "get nick color code (*deprecated* since version 1.5, replaced by "
#~ "\"nick_color\")"
#~ msgstr ""
#~ "obter código de cor do nick (*obsoleto* desde a versão 1.5, substituído "
#~ "por \"nick_color\")"
#~ msgid "nickname"
#~ msgstr "nickname"
#~ msgid ""
#~ "get nick color name (*deprecated* since version 1.5, replaced by "
#~ "\"nick_color_name\")"
#~ msgstr ""
#~ "obter nome da cor do nick (*obsoleto* desde a versão 1.5, substituído por "
#~ "\"nick_color_name\")"
#, fuzzy
#~ msgid "color for selected line"
#~ msgstr "secção de configuração"
+10 -8
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-08-22 09:26+0200\n"
"POT-Creation-Date: 2023-08-24 09:00+0200\n"
"PO-Revision-Date: 2023-06-26 21:34+0200\n"
"Last-Translator: Érico Nogueira <ericonr@disroot.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -9693,16 +9693,15 @@ msgid "IRC host (like `:nick!name@server.com`)"
msgstr "host IRC (exemplo: `:apelido!nome@servidor.com`)"
msgid ""
"get nick color code (*deprecated* since version 1.5, replaced by "
"\"nick_color\")"
"get nick color code (nick is first converted to lower case, following the "
"value of CASEMAPPING on the server, defaulting to \"rfc1459\" if the server "
"is not given)"
msgstr ""
msgid "nickname"
msgstr "apelido"
msgid ""
"get nick color name (*deprecated* since version 1.5, replaced by "
"\"nick_color_name\")"
"get nick color name (nick is first converted to lower case, following the "
"value of CASEMAPPING on the server, defaulting to \"rfc1459\" if the server "
"is not given)"
msgstr ""
msgid "get buffer pointer for an IRC server/channel/nick"
@@ -14204,6 +14203,9 @@ msgstr "%s%s: tempo esgotado para \"%s\" com %s"
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: não foi possível conectar ao remetente"
#~ msgid "nickname"
#~ msgstr "apelido"
#, fuzzy
#~ msgid "color for selected line"
#~ msgstr "seção de configuração"
+11 -9
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-08-22 09:26+0200\n"
"POT-Creation-Date: 2023-08-24 09:00+0200\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -9163,17 +9163,15 @@ msgid "IRC host (like `:nick!name@server.com`)"
msgstr ""
msgid ""
"get nick color code (*deprecated* since version 1.5, replaced by "
"\"nick_color\")"
"get nick color code (nick is first converted to lower case, following the "
"value of CASEMAPPING on the server, defaulting to \"rfc1459\" if the server "
"is not given)"
msgstr ""
#, fuzzy
msgid "nickname"
msgstr "[-all] ник"
msgid ""
"get nick color name (*deprecated* since version 1.5, replaced by "
"\"nick_color_name\")"
"get nick color name (nick is first converted to lower case, following the "
"value of CASEMAPPING on the server, defaulting to \"rfc1459\" if the server "
"is not given)"
msgstr ""
#, fuzzy
@@ -13608,6 +13606,10 @@ msgstr "%s нет аргумента для параметра \"%s\"\n"
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s DCC: не могу соединиться с отправителем\n"
#, fuzzy
#~ msgid "nickname"
#~ msgstr "[-all] ник"
#, fuzzy
#~ msgid "color for selected line"
#~ msgstr "настроить параметры конфигурации"
+24 -11
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-08-22 09:26+0200\n"
"POT-Creation-Date: 2023-08-24 09:00+0200\n"
"PO-Revision-Date: 2023-08-08 07:14+0200\n"
"Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -11512,20 +11512,16 @@ msgid "IRC host (like `:nick!name@server.com`)"
msgstr "IRC хост (као `:надимак!име@сервер.com`)"
msgid ""
"get nick color code (*deprecated* since version 1.5, replaced by "
"\"nick_color\")"
"get nick color code (nick is first converted to lower case, following the "
"value of CASEMAPPING on the server, defaulting to \"rfc1459\" if the server "
"is not given)"
msgstr ""
"враћа кôд боје надимка (*застарело* од верзије 1.5, замењено са „nick_color”)"
msgid "nickname"
msgstr "надимак"
msgid ""
"get nick color name (*deprecated* since version 1.5, replaced by "
"\"nick_color_name\")"
"get nick color name (nick is first converted to lower case, following the "
"value of CASEMAPPING on the server, defaulting to \"rfc1459\" if the server "
"is not given)"
msgstr ""
"враћа кôд боје надимка (*застарело* од верзије 1.5, замењено са "
"„nick_color_name”)"
msgid "get buffer pointer for an IRC server/channel/nick"
msgstr "враћа показивач на бафер за IRC сервер/канал/надимак"
@@ -16530,6 +16526,23 @@ msgstr "%s%s: тајмаут за „%s” са %s"
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: повезивање није успело: неочекивана грешка (%d)"
#~ msgid ""
#~ "get nick color code (*deprecated* since version 1.5, replaced by "
#~ "\"nick_color\")"
#~ msgstr ""
#~ "враћа кôд боје надимка (*застарело* од верзије 1.5, замењено са "
#~ "„nick_color”)"
#~ msgid "nickname"
#~ msgstr "надимак"
#~ msgid ""
#~ "get nick color name (*deprecated* since version 1.5, replaced by "
#~ "\"nick_color_name\")"
#~ msgstr ""
#~ "враћа кôд боје надимка (*застарело* од верзије 1.5, замењено са "
#~ "„nick_color_name”)"
#, fuzzy
#~| msgid "color for section"
#~ msgid "color for selected line"
+24 -12
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-08-22 09:26+0200\n"
"POT-Creation-Date: 2023-08-24 09:00+0200\n"
"PO-Revision-Date: 2023-08-08 07:14+0200\n"
"Last-Translator: Emir SARI <emir_sari@icloud.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -12029,21 +12029,16 @@ msgid "IRC host (like `:nick!name@server.com`)"
msgstr "IRC makinesi (örneğin: `:nick!name@server.com`)"
msgid ""
"get nick color code (*deprecated* since version 1.5, replaced by "
"\"nick_color\")"
"get nick color code (nick is first converted to lower case, following the "
"value of CASEMAPPING on the server, defaulting to \"rfc1459\" if the server "
"is not given)"
msgstr ""
"takma ad renk kodunu al (1.5 sürümünden itibaren kullanılmıyor, "
"\"nick_color\" ile değiştirildi)"
msgid "nickname"
msgstr "takma ad"
msgid ""
"get nick color name (*deprecated* since version 1.5, replaced by "
"\"nick_color_name\")"
"get nick color name (nick is first converted to lower case, following the "
"value of CASEMAPPING on the server, defaulting to \"rfc1459\" if the server "
"is not given)"
msgstr ""
"takma ad renk adını al (1.5 sürümünden itibaren kullanılmıyor, "
"\"nick_color_name\" ile değiştirildi)"
msgid "get buffer pointer for an IRC server/channel/nick"
msgstr "bir IRC sunucusu/kanalı/takma adı için arabellek işaretçisini al"
@@ -17120,6 +17115,23 @@ msgstr "%s%s: \"%s\" için %s ile zaman aşımı"
msgid "%s%s: unable to connect: unexpected error (%d)"
msgstr "%s%s: Bağlanılamıyor: Beklenmedik hata (%d)"
#~ msgid ""
#~ "get nick color code (*deprecated* since version 1.5, replaced by "
#~ "\"nick_color\")"
#~ msgstr ""
#~ "takma ad renk kodunu al (1.5 sürümünden itibaren kullanılmıyor, "
#~ "\"nick_color\" ile değiştirildi)"
#~ msgid "nickname"
#~ msgstr "takma ad"
#~ msgid ""
#~ "get nick color name (*deprecated* since version 1.5, replaced by "
#~ "\"nick_color_name\")"
#~ msgstr ""
#~ "takma ad renk adını al (1.5 sürümünden itibaren kullanılmıyor, "
#~ "\"nick_color_name\" ile değiştirildi)"
#, fuzzy
#~| msgid "color for section"
#~ msgid "color for selected line"
+7 -8
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-08-22 09:26+0200\n"
"POT-Creation-Date: 2023-08-24 09:00+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"
@@ -8190,16 +8190,15 @@ msgid "IRC host (like `:nick!name@server.com`)"
msgstr ""
msgid ""
"get nick color code (*deprecated* since version 1.5, replaced by "
"\"nick_color\")"
msgstr ""
msgid "nickname"
"get nick color code (nick is first converted to lower case, following the "
"value of CASEMAPPING on the server, defaulting to \"rfc1459\" if the server "
"is not given)"
msgstr ""
msgid ""
"get nick color name (*deprecated* since version 1.5, replaced by "
"\"nick_color_name\")"
"get nick color name (nick is first converted to lower case, following the "
"value of CASEMAPPING on the server, defaulting to \"rfc1459\" if the server "
"is not given)"
msgstr ""
msgid "get buffer pointer for an IRC server/channel/nick"
+2 -1
View File
@@ -246,7 +246,8 @@ irc_config_compute_nick_colors ()
{
if (ptr_nick->color)
free (ptr_nick->color);
ptr_nick->color = irc_nick_find_color (ptr_nick->name);
ptr_nick->color = irc_nick_find_color (ptr_server,
ptr_nick->name);
}
}
if (ptr_channel->pv_remote_nick_color)
+4 -2
View File
@@ -1241,7 +1241,7 @@ irc_ctcp_recv (struct t_irc_server *server, time_t date,
if (ptr_nick)
nick_color = strdup (ptr_nick->color);
else if (nick)
nick_color = irc_nick_find_color (nick);
nick_color = irc_nick_find_color (server, nick);
else
nick_color = strdup (IRC_COLOR_CHAT_NICK);
if (irc_server_prefix_char_statusmsg (server, target[0]))
@@ -1336,7 +1336,9 @@ irc_ctcp_recv (struct t_irc_server *server, time_t date,
"%s%s%s%s%s%s",
weechat_prefix ("action"),
(nick_is_me) ?
IRC_COLOR_CHAT_NICK_SELF : irc_nick_color_for_pv (ptr_channel, nick),
IRC_COLOR_CHAT_NICK_SELF : irc_nick_color_for_pv (server,
ptr_channel,
nick),
nick,
(pos_args) ? IRC_COLOR_RESET : "",
(pos_args) ? " " : "",
+46 -8
View File
@@ -197,6 +197,10 @@ irc_info_info_irc_nick_color_cb (const void *pointer, void *data,
const char *info_name,
const char *arguments)
{
char *pos_comma, *server;
const char *pos_nick;
struct t_irc_server *ptr_server;
/* make C compiler happy */
(void) pointer;
(void) data;
@@ -205,7 +209,21 @@ irc_info_info_irc_nick_color_cb (const void *pointer, void *data,
if (!arguments || !arguments[0])
return NULL;
return irc_nick_find_color (arguments);
ptr_server = NULL;
pos_nick = arguments;
pos_comma = strchr (arguments, ',');
if (pos_comma)
{
pos_nick = pos_comma + 1;
server = weechat_strndup (arguments, pos_comma - arguments);
if (server)
{
ptr_server = irc_server_search (server);
free (server);
}
}
return irc_nick_find_color (ptr_server, pos_nick);
}
/*
@@ -217,6 +235,10 @@ irc_info_info_irc_nick_color_name_cb (const void *pointer, void *data,
const char *info_name,
const char *arguments)
{
char *pos_comma, *server;
const char *pos_nick;
struct t_irc_server *ptr_server;
/* make C compiler happy */
(void) pointer;
(void) data;
@@ -225,7 +247,21 @@ irc_info_info_irc_nick_color_name_cb (const void *pointer, void *data,
if (!arguments || !arguments[0])
return NULL;
return irc_nick_find_color_name (arguments);
ptr_server = NULL;
pos_nick = arguments;
pos_comma = strchr (arguments, ',');
if (pos_comma)
{
pos_nick = pos_comma + 1;
server = weechat_strndup (arguments, pos_comma - arguments);
if (server)
{
ptr_server = irc_server_search (server);
free (server);
}
}
return irc_nick_find_color_name (ptr_server, pos_nick);
}
/*
@@ -1223,15 +1259,17 @@ irc_info_init ()
&irc_info_info_irc_nick_from_host_cb, NULL, NULL);
weechat_hook_info (
"irc_nick_color",
N_("get nick color code "
"(*deprecated* since version 1.5, replaced by \"nick_color\")"),
N_("nickname"),
N_("get nick color code (nick is first converted to lower case, "
"following the value of CASEMAPPING on the server, "
"defaulting to \"rfc1459\" if the server is not given)"),
N_("server,nickname (server is optional)"),
&irc_info_info_irc_nick_color_cb, NULL, NULL);
weechat_hook_info (
"irc_nick_color_name",
N_("get nick color name "
"(*deprecated* since version 1.5, replaced by \"nick_color_name\")"),
N_("nickname"),
N_("get nick color name (nick is first converted to lower case, "
"following the value of CASEMAPPING on the server, "
"defaulting to \"rfc1459\" if the server is not given)"),
N_("server,nickname (server is optional)"),
&irc_info_info_irc_nick_color_name_cb, NULL, NULL);
weechat_hook_info (
"irc_buffer",
+28 -11
View File
@@ -139,9 +139,17 @@ irc_nick_is_nick (struct t_irc_server *server, const char *string)
*/
char *
irc_nick_find_color (const char *nickname)
irc_nick_find_color (struct t_irc_server *server, const char *nickname)
{
return weechat_info_get ("nick_color", nickname);
char *nickname_lower, *result;
nickname_lower = irc_server_string_tolower (server, nickname);
if (!nickname_lower)
return NULL;
result = weechat_info_get ("nick_color", nickname_lower);
free (nickname_lower);
return result;
}
/*
@@ -151,9 +159,17 @@ irc_nick_find_color (const char *nickname)
*/
char *
irc_nick_find_color_name (const char *nickname)
irc_nick_find_color_name (struct t_irc_server *server, const char *nickname)
{
return weechat_info_get ("nick_color_name", nickname);
char *nickname_lower, *result;
nickname_lower = irc_server_string_tolower (server, nickname);
if (!nickname_lower)
return NULL;
result = weechat_info_get ("nick_color_name", nickname_lower);
free (nickname_lower);
return result;
}
/*
@@ -397,7 +413,7 @@ irc_nick_get_color_for_nicklist (struct t_irc_server *server,
if (irc_server_strcasecmp (server, nick->name, server->nick) == 0)
return strdup (nick_color_self);
else
return irc_nick_find_color_name (nick->name);
return irc_nick_find_color_name (server, nick->name);
}
return strdup (nick_color_bar_fg);
@@ -595,7 +611,7 @@ irc_nick_new (struct t_irc_server *server, struct t_irc_channel *channel,
if (irc_server_strcasecmp (server, new_nick->name, server->nick) == 0)
new_nick->color = strdup (IRC_COLOR_CHAT_NICK_SELF);
else
new_nick->color = irc_nick_find_color (new_nick->name);
new_nick->color = irc_nick_find_color (server, new_nick->name);
/* add nick to end of list */
new_nick->prev_nick = channel->last_nick;
@@ -644,7 +660,7 @@ irc_nick_change (struct t_irc_server *server, struct t_irc_channel *channel,
if (nick_is_me)
nick->color = strdup (IRC_COLOR_CHAT_NICK_SELF);
else
nick->color = irc_nick_find_color (nick->name);
nick->color = irc_nick_find_color (server, nick->name);
/* add nick in nicklist */
irc_nick_nicklist_add (server, channel, nick);
@@ -964,7 +980,7 @@ irc_nick_as_prefix (struct t_irc_server *server, struct t_irc_nick *nick,
else if (nick)
color = strdup (nick->color);
else if (nickname)
color = irc_nick_find_color (nickname);
color = irc_nick_find_color (server, nickname);
else
color = strdup (IRC_COLOR_CHAT_NICK);
@@ -1007,7 +1023,7 @@ irc_nick_color_for_msg (struct t_irc_server *server, int server_message,
{
return IRC_COLOR_CHAT_NICK_SELF;
}
color_found = irc_nick_find_color (nickname);
color_found = irc_nick_find_color (server, nickname);
index_color = (index_color + 1) % 16;
snprintf (color[index_color], sizeof (color[index_color]),
"%s",
@@ -1025,12 +1041,13 @@ irc_nick_color_for_msg (struct t_irc_server *server, int server_message,
*/
const char *
irc_nick_color_for_pv (struct t_irc_channel *channel, const char *nickname)
irc_nick_color_for_pv (struct t_irc_server *server,
struct t_irc_channel *channel, const char *nickname)
{
if (weechat_config_boolean (irc_config_look_color_pv_nick_like_channel))
{
if (!channel->pv_remote_nick_color)
channel->pv_remote_nick_color = irc_nick_find_color (nickname);
channel->pv_remote_nick_color = irc_nick_find_color (server, nickname);
if (channel->pv_remote_nick_color)
return channel->pv_remote_nick_color;
}
+6 -3
View File
@@ -49,8 +49,10 @@ struct t_irc_nick
extern int irc_nick_valid (struct t_irc_channel *channel,
struct t_irc_nick *nick);
extern int irc_nick_is_nick (struct t_irc_server *server, const char *string);
extern char *irc_nick_find_color (const char *nickname);
extern char *irc_nick_find_color_name (const char *nickname);
extern char *irc_nick_find_color (struct t_irc_server *server,
const char *nickname);
extern char *irc_nick_find_color_name (struct t_irc_server *server,
const char *nickname);
extern void irc_nick_set_host (struct t_irc_nick *nick, const char *host);
extern int irc_nick_is_op (struct t_irc_server *server,
struct t_irc_nick *nick);
@@ -103,7 +105,8 @@ extern const char *irc_nick_color_for_msg (struct t_irc_server *server,
int server_message,
struct t_irc_nick *nick,
const char *nickname);
extern const char * irc_nick_color_for_pv (struct t_irc_channel *channel,
extern const char * irc_nick_color_for_pv (struct t_irc_server *server,
struct t_irc_channel *channel,
const char *nickname);
extern char *irc_nick_default_ban_mask (struct t_irc_nick *nick);
extern struct t_hdata *irc_nick_hdata_nick_cb (const void *pointer,
+13 -8
View File
@@ -2310,8 +2310,8 @@ IRC_PROTOCOL_CALLBACK(nick)
{
if (weechat_config_boolean (irc_config_look_color_pv_nick_like_channel))
{
old_color = irc_nick_find_color (nick);
new_color = irc_nick_find_color (params[0]);
old_color = irc_nick_find_color (server, nick);
new_color = irc_nick_find_color (server, params[0]);
}
else
{
@@ -3190,6 +3190,7 @@ IRC_PROTOCOL_CALLBACK(privmsg)
else
{
color = irc_nick_find_color_name (
server,
(ptr_nick) ? ptr_nick->name : nick);
str_color = irc_color_for_tags (color);
if (color)
@@ -3297,7 +3298,7 @@ IRC_PROTOCOL_CALLBACK(privmsg)
{
if (weechat_config_boolean (irc_config_look_color_pv_nick_like_channel))
{
color = irc_nick_find_color_name (nick);
color = irc_nick_find_color_name (server, nick);
str_color = irc_color_for_tags (color);
if (color)
free (color);
@@ -3336,7 +3337,9 @@ IRC_PROTOCOL_CALLBACK(privmsg)
irc_nick_as_prefix (
server, NULL, nick,
(nick_is_me) ?
IRC_COLOR_CHAT_NICK_SELF : irc_nick_color_for_pv (ptr_channel, nick)),
IRC_COLOR_CHAT_NICK_SELF : irc_nick_color_for_pv (server,
ptr_channel,
nick)),
(msg_args2) ? msg_args2 : msg_args);
if (msg_args2)
free (msg_args2);
@@ -3429,7 +3432,8 @@ IRC_PROTOCOL_CALLBACK(quit)
_("%s%s%s%s%s%s%s%s%s%s has quit %s(%s%s%s)"),
weechat_prefix ("quit"),
(ptr_channel->type == IRC_CHANNEL_TYPE_PRIVATE) ?
irc_nick_color_for_pv (ptr_channel, nick) : irc_nick_color_for_msg (server, 1, ptr_nick, nick),
irc_nick_color_for_pv (server, ptr_channel, nick) :
irc_nick_color_for_msg (server, 1, ptr_nick, nick),
nick,
IRC_COLOR_CHAT_DELIMITERS,
(display_host) ? " (" : "",
@@ -3463,7 +3467,8 @@ IRC_PROTOCOL_CALLBACK(quit)
_("%s%s%s%s%s%s%s%s%s%s has quit"),
weechat_prefix ("quit"),
(ptr_channel->type == IRC_CHANNEL_TYPE_PRIVATE) ?
irc_nick_color_for_pv (ptr_channel, nick) : irc_nick_color_for_msg (server, 1, ptr_nick, nick),
irc_nick_color_for_pv (server, ptr_channel, nick) :
irc_nick_color_for_msg (server, 1, ptr_nick, nick),
nick,
IRC_COLOR_CHAT_DELIMITERS,
(display_host) ? " (" : "",
@@ -6292,7 +6297,7 @@ IRC_PROTOCOL_CALLBACK(353)
}
else
{
color = irc_nick_find_color (nickname);
color = irc_nick_find_color (server, nickname);
weechat_string_dyn_concat (str_nicks, color, -1);
if (color)
free (color);
@@ -6551,7 +6556,7 @@ IRC_PROTOCOL_CALLBACK(366)
}
else
{
color = irc_nick_find_color (nickname);
color = irc_nick_find_color (server, nickname);
weechat_string_dyn_concat (str_nicks, color, -1);
if (color)
free (color);
+391
View File
@@ -21,9 +21,12 @@
#include "CppUTest/TestHarness.h"
#include "tests/tests.h"
extern "C"
{
#include <string.h>
#include "src/gui/gui-color.h"
#include "src/plugins/irc/irc-nick.h"
#include "src/plugins/irc/irc-server.h"
}
@@ -172,3 +175,391 @@ TEST(IrcNick, IsNick)
irc_server_free (server);
}
/*
* Tests functions:
* irc_nick_find_color
* irc_nick_find_color_name
*/
TEST(IrcNick, IrcNickFindColor)
{
struct t_irc_server *server;
char *str, str_color[128];
server = irc_server_alloc ("my_ircd");
CHECK(server);
POINTERS_EQUAL(NULL, irc_nick_find_color (NULL, NULL));
POINTERS_EQUAL(NULL, irc_nick_find_color_name (NULL, NULL));
POINTERS_EQUAL(NULL, irc_nick_find_color (server, NULL));
POINTERS_EQUAL(NULL, irc_nick_find_color_name (server, NULL));
snprintf (str_color, sizeof (str_color), "%s", gui_color_get_custom ("162"));
WEE_TEST_STR(str_color, irc_nick_find_color (NULL, "NICK[A]"));
WEE_TEST_STR(str_color, irc_nick_find_color (NULL, "nick{a}"));
WEE_TEST_STR("162", irc_nick_find_color_name (NULL, "NICK[A]"));
WEE_TEST_STR("162", irc_nick_find_color_name (NULL, "nick{a}"));
snprintf (str_color, sizeof (str_color), "%s", gui_color_get_custom ("lightcyan"));
WEE_TEST_STR(str_color, irc_nick_find_color (NULL, "NICK^A"));
WEE_TEST_STR(str_color, irc_nick_find_color (NULL, "nick~a"));
WEE_TEST_STR("lightcyan", irc_nick_find_color_name (NULL, "NICK^A"));
WEE_TEST_STR("lightcyan", irc_nick_find_color_name (NULL, "nick~a"));
snprintf (str_color, sizeof (str_color), "%s", gui_color_get_custom ("162"));
WEE_TEST_STR(str_color, irc_nick_find_color (server, "NICK[A]"));
WEE_TEST_STR(str_color, irc_nick_find_color (server, "nick{a}"));
WEE_TEST_STR("162", irc_nick_find_color_name (server, "NICK[A]"));
WEE_TEST_STR("162", irc_nick_find_color_name (server, "nick{a}"));
snprintf (str_color, sizeof (str_color), "%s", gui_color_get_custom ("lightcyan"));
WEE_TEST_STR(str_color, irc_nick_find_color (server, "NICK^A"));
WEE_TEST_STR(str_color, irc_nick_find_color (server, "nick~a"));
WEE_TEST_STR("lightcyan", irc_nick_find_color_name (server, "NICK^A"));
WEE_TEST_STR("lightcyan", irc_nick_find_color_name (server, "nick~a"));
server->casemapping = IRC_SERVER_CASEMAPPING_STRICT_RFC1459;
snprintf (str_color, sizeof (str_color), "%s", gui_color_get_custom ("162"));
WEE_TEST_STR(str_color, irc_nick_find_color (server, "NICK[A]"));
WEE_TEST_STR(str_color, irc_nick_find_color (server, "nick{a}"));
WEE_TEST_STR("162", irc_nick_find_color_name (server, "NICK[A]"));
WEE_TEST_STR("162", irc_nick_find_color_name (server, "nick{a}"));
snprintf (str_color, sizeof (str_color), "%s", gui_color_get_custom ("176"));
WEE_TEST_STR(str_color, irc_nick_find_color (server, "NICK^A"));
snprintf (str_color, sizeof (str_color), "%s", gui_color_get_custom ("lightcyan"));
WEE_TEST_STR(str_color, irc_nick_find_color (server, "nick~a"));
WEE_TEST_STR("176", irc_nick_find_color_name (server, "NICK^A"));
WEE_TEST_STR("lightcyan", irc_nick_find_color_name (server, "nick~a"));
server->casemapping = IRC_SERVER_CASEMAPPING_ASCII;
snprintf (str_color, sizeof (str_color), "%s", gui_color_get_custom ("212"));
WEE_TEST_STR(str_color, irc_nick_find_color (server, "NICK[A]"));
snprintf (str_color, sizeof (str_color), "%s", gui_color_get_custom ("162"));
WEE_TEST_STR(str_color, irc_nick_find_color (server, "nick{a}"));
WEE_TEST_STR("212", irc_nick_find_color_name (server, "NICK[A]"));
WEE_TEST_STR("162", irc_nick_find_color_name (server, "nick{a}"));
snprintf (str_color, sizeof (str_color), "%s", gui_color_get_custom ("176"));
WEE_TEST_STR(str_color, irc_nick_find_color (server, "NICK^A"));
snprintf (str_color, sizeof (str_color), "%s", gui_color_get_custom ("lightcyan"));
WEE_TEST_STR(str_color, irc_nick_find_color (server, "nick~a"));
WEE_TEST_STR("176", irc_nick_find_color_name (server, "NICK^A"));
WEE_TEST_STR("lightcyan", irc_nick_find_color_name (server, "nick~a"));
irc_server_free (server);
}
/*
* Tests functions:
* irc_nick_set_current_prefix
*/
TEST(IrcNick, IrcNickSetCurrentPrefix)
{
/* TODO: write tests */
}
/*
* Tests functions:
* irc_nick_set_prefix
*/
TEST(IrcNick, IrcNickSetPrefix)
{
/* TODO: write tests */
}
/*
* Tests functions:
* irc_nick_set_prefixes
*/
TEST(IrcNick, IrcNickSetPrefixes)
{
/* TODO: write tests */
}
/*
* Tests functions:
* irc_nick_set_host
*/
TEST(IrcNick, IrcNickSetHost)
{
/* TODO: write tests */
}
/*
* Tests functions:
* irc_nick_is_op
*/
TEST(IrcNick, IrcNickIsOp)
{
/* TODO: write tests */
}
/*
* Tests functions:
* irc_nick_has_prefix_mode
*/
TEST(IrcNick, IrcNickHasPrefixMode)
{
/* TODO: write tests */
}
/*
* Tests functions:
* irc_nick_get_nicklist_group
*/
TEST(IrcNick, IrcNickGetNicklistGroup)
{
/* TODO: write tests */
}
/*
* Tests functions:
* irc_nick_get_prefix_color_name
*/
TEST(IrcNick, IrcNickGetPrefixColorName)
{
/* TODO: write tests */
}
/*
* Tests functions:
* irc_nick_get_color_for_nicklist
*/
TEST(IrcNick, IrcNickGetColorForNicklist)
{
/* TODO: write tests */
}
/*
* Tests functions:
* irc_nick_nicklist_add
*/
TEST(IrcNick, IrcNickNicklistAdd)
{
/* TODO: write tests */
}
/*
* Tests functions:
* irc_nick_nicklist_remove
*/
TEST(IrcNick, IrcNickNicklistRemove)
{
/* TODO: write tests */
}
/*
* Tests functions:
* irc_nick_nicklist_set
*/
TEST(IrcNick, IrcNickNicklistSet)
{
/* TODO: write tests */
}
/*
* Tests functions:
* irc_nick_nicklist_set_prefix_color_all
*/
TEST(IrcNick, IrcNickNicklistSetPrefixColorAll)
{
/* TODO: write tests */
}
/*
* Tests functions:
* irc_nick_nicklist_set_color_all
*/
TEST(IrcNick, IrcNickNicklistSetColorAll)
{
/* TODO: write tests */
}
/*
* Tests functions:
* irc_nick_new
*/
TEST(IrcNick, IrcNickNew)
{
/* TODO: write tests */
}
/*
* Tests functions:
* irc_nick_change
*/
TEST(IrcNick, IrcNickChange)
{
/* TODO: write tests */
}
/*
* Tests functions:
* irc_nick_set_mode
*/
TEST(IrcNick, IrcNickSetMode)
{
/* TODO: write tests */
}
/*
* Tests functions:
* irc_nick_realloc_prefixes
*/
TEST(IrcNick, IrcNickReallocPrefixes)
{
/* TODO: write tests */
}
/*
* Tests functions:
* irc_nick_free
*/
TEST(IrcNick, IrcNickFree)
{
/* TODO: write tests */
}
/*
* Tests functions:
* irc_nick_free_all
*/
TEST(IrcNick, IrcNickFreeAll)
{
/* TODO: write tests */
}
/*
* Tests functions:
* irc_nick_search
*/
TEST(IrcNick, IrcNickSearch)
{
/* TODO: write tests */
}
/*
* Tests functions:
* irc_nick_count
*/
TEST(IrcNick, IrcNickCount)
{
/* TODO: write tests */
}
/*
* Tests functions:
* irc_nick_set_away
*/
TEST(IrcNick, IrcNickSetAway)
{
/* TODO: write tests */
}
/*
* Tests functions:
* irc_nick_mode_for_display
*/
TEST(IrcNick, IrcNickModeForDisplay)
{
/* TODO: write tests */
}
/*
* Tests functions:
* irc_nick_as_prefix
*/
TEST(IrcNick, IrcNickAsPrefix)
{
/* TODO: write tests */
}
/*
* Tests functions:
* irc_nick_color_for_msg
*/
TEST(IrcNick, IrcNickColorForMsg)
{
/* TODO: write tests */
}
/*
* Tests functions:
* irc_nick_color_for_pv
*/
TEST(IrcNick, IrcNickColorForPv)
{
/* TODO: write tests */
}
/*
* Tests functions:
* irc_nick_default_ban_mask
*/
TEST(IrcNick, IrcNickDefaultBanMask)
{
/* TODO: write tests */
}
/*
* Tests functions:
* irc_nick_hdata_nick_cb
*/
TEST(IrcNick, IrcNickHdataNickCb)
{
/* TODO: write tests */
}
/*
* Tests functions:
* irc_nick_add_to_infolist
*/
TEST(IrcNick, IrcNickAddToInfolist)
{
/* TODO: write tests */
}
/*
* Tests functions:
* irc_nick_print_log
*/
TEST(IrcNick, IrcNickPrintLog)
{
/* TODO: write tests */
}