summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--NEWS5
-rw-r--r--doc/de/autogen/user/irc_commands.txt42
-rw-r--r--doc/de/autogen/user/irc_options.txt15
-rw-r--r--doc/de/autogen/user/relay_options.txt2
-rw-r--r--doc/de/autogen/user/rmodifier_commands.txt32
-rw-r--r--doc/de/autogen/user/weechat_commands.txt67
-rw-r--r--doc/de/autogen/user/weechat_options.txt4
-rw-r--r--doc/en/autogen/user/irc_commands.txt4
-rw-r--r--doc/en/autogen/user/irc_options.txt15
-rw-r--r--doc/en/autogen/user/relay_options.txt2
-rw-r--r--doc/en/autogen/user/rmodifier_commands.txt2
-rw-r--r--doc/en/autogen/user/weechat_commands.txt1
-rw-r--r--doc/en/autogen/user/weechat_options.txt4
-rw-r--r--doc/en/weechat_plugin_api.en.txt165
-rw-r--r--doc/fr/autogen/user/irc_commands.txt4
-rw-r--r--doc/fr/autogen/user/irc_options.txt15
-rw-r--r--doc/fr/autogen/user/relay_options.txt2
-rw-r--r--doc/fr/autogen/user/rmodifier_commands.txt2
-rw-r--r--doc/fr/autogen/user/weechat_commands.txt1
-rw-r--r--doc/fr/autogen/user/weechat_options.txt4
-rw-r--r--doc/fr/weechat_plugin_api.fr.txt177
-rw-r--r--doc/it/autogen/user/irc_commands.txt50
-rw-r--r--doc/it/autogen/user/irc_options.txt15
-rw-r--r--doc/it/autogen/user/relay_options.txt2
-rw-r--r--doc/it/autogen/user/rmodifier_commands.txt28
-rw-r--r--doc/it/autogen/user/weechat_commands.txt79
-rw-r--r--doc/it/autogen/user/weechat_options.txt4
-rw-r--r--doc/it/weechat_plugin_api.it.txt149
-rw-r--r--po/cs.po61
-rw-r--r--po/de.po64
-rw-r--r--po/es.po62
-rw-r--r--po/fr.po111
-rw-r--r--po/hu.po58
-rw-r--r--po/it.po64
-rw-r--r--po/pl.po62
-rw-r--r--po/pt_BR.po61
-rw-r--r--po/ru.po58
-rw-r--r--po/weechat.pot57
-rw-r--r--src/core/wee-command.c4
-rw-r--r--src/core/wee-config.c15
-rw-r--r--src/core/wee-string.c216
-rw-r--r--src/core/wee-string.h5
-rw-r--r--src/gui/gui-buffer.c9
-rw-r--r--src/gui/gui-filter.c8
-rw-r--r--src/plugins/irc/irc-channel.c5
-rw-r--r--src/plugins/irc/irc-command.c9
-rw-r--r--src/plugins/irc/irc-config.c39
-rw-r--r--src/plugins/irc/irc-config.h3
-rw-r--r--src/plugins/irc/irc-ignore.c3
-rw-r--r--src/plugins/irc/irc-server.c3
-rw-r--r--src/plugins/plugin.c4
-rw-r--r--src/plugins/relay/relay-config.c7
-rw-r--r--src/plugins/rmodifier/rmodifier-command.c3
-rw-r--r--src/plugins/rmodifier/rmodifier.c4
-rw-r--r--src/plugins/weechat-plugin.h17
56 files changed, 1473 insertions, 441 deletions
diff --git a/ChangeLog b/ChangeLog
index 3a21f66d6..b4318dd2f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,12 +1,13 @@
WeeChat ChangeLog
=================
Sébastien Helleu <flashcode@flashtux.org>
-v0.3.7-dev, 2012-01-16
+v0.3.7-dev, 2012-01-22
Version 0.3.7 (under dev!)
--------------------------
+* core: add support of flags in regular expressions and highlight options
* core: add library "pthread" in cmake file for link on OpenBSD
* core: use extended regex in filters (patch #7616)
* core: save current mouse state in option weechat.look.mouse (set option when
@@ -43,9 +44,12 @@ Version 0.3.7 (under dev!)
reconnection problem (bug #34626)
* api: add support of URL in hook_process/hook_process_hashtable (task #10247)
* api: add new functions strcasecmp_range, strncasecmp_range,
- hashtable_map_string, hook_process_hashtable, hdata_check_pointer, hdata_char,
- hdata_hashtable and nicklist_get_next_item
+ string_regex_flags, string_regcomp, hashtable_map_string,
+ hook_process_hashtable, hdata_check_pointer, hdata_char, hdata_hashtable and
+ nicklist_get_next_item
* alias: add default alias umode => /mode $nick
+* irc: add options irc.look.highlight_{server|channel|pv} to customize or
+ disable default nick highlight (task #11128)
* irc: use low priority for MODE sent automatically by WeeChat (when joining
channel)
* irc: use extended regex in commands /ignore and /list
diff --git a/NEWS b/NEWS
index 12fde38ab..99548961f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,7 @@
WeeChat News
============
Sébastien Helleu <flashcode@flashtux.org>
-v0.3.7-dev, 2012-01-06
+v0.3.7-dev, 2012-01-22
Version 0.3.7 (under dev!)
@@ -10,6 +10,9 @@ Version 0.3.7 (under dev!)
* extented regex is used in filters and irc ignore, so some chars that
needed escape in past do not need any more (for example `[0-9]\+` becomes
`[0-9]+`), filters and ignore have to be manually fixed
+* option 'weechat.look.highlight_regex' becomes case insensitive by default,
+ to make it case insensitive, use "(?-i)" at beginning of string, for example:
+ "(?-i)FlashCode|flashy"
* option 'weechat.history.max_lines' has been renamed to
'weechat.history.max_buffer_lines_number'
diff --git a/doc/de/autogen/user/irc_commands.txt b/doc/de/autogen/user/irc_commands.txt
index 87c998954..ec40d6cf0 100644
--- a/doc/de/autogen/user/irc_commands.txt
+++ b/doc/de/autogen/user/irc_commands.txt
@@ -163,21 +163,23 @@ reason: Begründung der Trennung
add [re:]<nick> [<server> [<channel>]]
del <number>|-all
- list: zeigt alle Ignorierungen an
- add: fügt eine Ignorierung hinzu
- nick: Nick oder Hostname (dies kann ein regulärer Ausdruck sein, sofern "re:" angegeben wird oder eine Maske mittels "*" genutzt wird um ein oder mehrere Zeichen zu ersetzen)
- del: entfernt eine Ignorierung
- number: Nummer der Ignorierung die entfernt werden soll (nutze "list" um den entsprechenden Eintrag zu finden)
- -all: entfernt alle Einträge
- server: interner Name des Server auf welchem die Ignorierung statt finden soll
- channel: Name des Channel, in dem die Ignorierung statt finden soll
-
-Beispiele:
- ignoriert den Nick "toto" global:
+ list: list all ignores
+ add: add an ignore
+ nick: nick or hostname (can be regular expression if "re:" is given or a mask using "*" to replace one or more chars)
+ del: delete an ignore
+ number: number of ignore to delete (look at list to find it)
+ -all: delete all ignores
+ server: internal server name where ignore is working
+ channel: channel name where ignore is working
+
+Note: the regular expression can start with "(?-i)" to become case sensitive.
+
+Examples:
+ ignore nick "toto" everywhere:
/ignore add toto
- ignoriert den Host "toto@domain.com" auf dem freenode Server:
+ ignore host "toto@domain.com" on freenode server:
/ignore add toto@domain.com freenode
- ignoriert den Host "toto*@*.domain.com" im Chat freenode/#weechat:
+ ignore host "toto*@*.domain.com" on freenode/#weechat:
/ignore add toto*@*.domain.com freenode #weechat
........................................
@@ -270,16 +272,16 @@ Servermaske: die aufzulistenden Server sollen diesem Muster entsprechen
........................................
/list [<channel>[,<channel>...]] [<server>] [-re <regex>]
-channel: aufzulistender Channel
- server: Servername
- regexp: regulärer Ausdruck der für die Ausgabe angewendet werden soll
+channel: channel to list
+ server: server name
+ regex: regular expression used to filter results (case insensitive, can start by "(?-i)" to become case sensitive)
-Beispiele:
- listet alle Channels des Servers auf (dies kann bei umfangreichen Netzwerken sehr lange dauern):
+Examples:
+ list all channels on server (can be very slow on large networks):
/list
- listet den Channel #weechat auf:
+ list channel #weechat:
/list #weechat
- listet alle Channels auf die mit "#weechat" beginnen (dies kann bei umfangreichen Netzwerken sehr lange dauern):
+ list all channels beginning with "#weechat" (can be very slow on large networks):
/list -re #weechat.*
........................................
diff --git a/doc/de/autogen/user/irc_options.txt b/doc/de/autogen/user/irc_options.txt
index 71ffec27e..a01e6cc0d 100644
--- a/doc/de/autogen/user/irc_options.txt
+++ b/doc/de/autogen/user/irc_options.txt
@@ -158,6 +158,21 @@
** Typ: boolesch
** Werte: on, off (Standardwert: `on`)
+* [[option_irc.look.highlight_channel]] *irc.look.highlight_channel*
+** Beschreibung: `comma separated list of words to highlight in channel buffers (case insensitive, use "(?-i)" at beginning of words to make them case sensitive; special variables $nick, $channel and $server are replaced by their value), these words are added to buffer local variable "highlight_words" only when buffer is created (it does not affect current buffers), an empty string disables default highlight on nick, examples: "$nick", "(?-i)$nick"`
+** Typ: Zeichenkette
+** Werte: beliebige Zeichenkette (Standardwert: `"$nick"`)
+
+* [[option_irc.look.highlight_pv]] *irc.look.highlight_pv*
+** Beschreibung: `comma separated list of words to highlight in private buffers (case insensitive, use "(?-i)" at beginning of words to make them case sensitive; special variables $nick, $channel and $server are replaced by their value), these words are added to buffer local variable "highlight_words" only when buffer is created (it does not affect current buffers), an empty string disables default highlight on nick, examples: "$nick", "(?-i)$nick"`
+** Typ: Zeichenkette
+** Werte: beliebige Zeichenkette (Standardwert: `"$nick"`)
+
+* [[option_irc.look.highlight_server]] *irc.look.highlight_server*
+** Beschreibung: `comma separated list of words to highlight in server buffers (case insensitive, use "(?-i)" at beginning of words to make them case sensitive; special variables $nick, $channel and $server are replaced by their value), these words are added to buffer local variable "highlight_words" only when buffer is created (it does not affect current buffers), an empty string disables default highlight on nick, examples: "$nick", "(?-i)$nick"`
+** Typ: Zeichenkette
+** Werte: beliebige Zeichenkette (Standardwert: `"$nick"`)
+
* [[option_irc.look.highlight_tags]] *irc.look.highlight_tags*
** Beschreibung: `Eine durch Kommata getrennte Liste von Tags die bei einer Nachricht selbige hervorhebt (Highlight). (normalerweise trifft dies auf jede Nachricht eines Users zu, ausgenommen Nachrichten vom Server,..)`
** Typ: Zeichenkette
diff --git a/doc/de/autogen/user/relay_options.txt b/doc/de/autogen/user/relay_options.txt
index f84e48cf1..0ea4681d7 100644
--- a/doc/de/autogen/user/relay_options.txt
+++ b/doc/de/autogen/user/relay_options.txt
@@ -49,7 +49,7 @@
** Werte: 0 .. 65535 (Standardwert: `256`)
* [[option_relay.network.allowed_ips]] *relay.network.allowed_ips*
-** Beschreibung: `regulärer Ausdruck für IP Adressen die auf das Relay zugreifen dürfen, Beispiel: "^(123.45.67.89|192.160.*)$"`
+** Beschreibung: `regular expression with IPs allowed to use relay (case insensitive, use "(?-i)" at beginning to make it case sensitive), example: "^(123.45.67.89|192.160.*)$"`
** Typ: Zeichenkette
** Werte: beliebige Zeichenkette (Standardwert: `""`)
diff --git a/doc/de/autogen/user/rmodifier_commands.txt b/doc/de/autogen/user/rmodifier_commands.txt
index 0dcaf4ce9..1971b5ef0 100644
--- a/doc/de/autogen/user/rmodifier_commands.txt
+++ b/doc/de/autogen/user/rmodifier_commands.txt
@@ -6,23 +6,23 @@
del <name>|-all [<name>...]
default -yes
- list: zeigt alle rmodifier an
-listdefault: zeigt die Standardeinstellung für rmodifier an
- add: einen rmodifier hinzufügen
- name: Name des rmodifier
- modifiers: durch Kommata getrennte Liste der modifier
- groups: Aktion auf Gruppen anwenden: durch Kommata getrennte Liste der Gruppen (von 1 bis 9). Optional kann nach der Nummer für die Gruppe ein "*" gesetzt werden um diese Gruppe auszublenden
- regex: regulärer Ausdruck
- del: löscht einen rmodifier Eintrag
- -all: löscht alle rmodifiers Einträge
- default: setzt die rmodifier auf Standardwerte zurück
+ list: list all rmodifiers
+listdefault: list default rmodifiers
+ add: add a rmodifier
+ name: name of rmodifier
+ modifiers: comma separated list of modifiers
+ groups: action on groups found: comma separated list of groups (from 1 to 9) with optional "*" after number to hide group
+ regex: regular expression (case insensitive, can start by "(?-i)" to become case sensitive)
+ del: delete a rmodifier
+ -all: delete all rmodifiers
+ default: restore default rmodifiers
-Beispiele:
- verbirgt die Eingabe nach dem Befehl /passwort:
- /rmodifier add passwort input_text_display 1,2* ^(/passwort +)(.*)
- lösche rmodifier "passwort":
- /rmodifier del passwort
- lösche alle rmodifiers:
+Examples:
+ hide everything typed after a command /password:
+ /rmodifier add password input_text_display 1,2* ^(/password +)(.*)
+ delete rmodifier "password":
+ /rmodifier del password
+ delete all rmodifiers:
/rmodifier del -all
........................................
diff --git a/doc/de/autogen/user/weechat_commands.txt b/doc/de/autogen/user/weechat_commands.txt
index 2e94bec59..bf99531a7 100644
--- a/doc/de/autogen/user/weechat_commands.txt
+++ b/doc/de/autogen/user/weechat_commands.txt
@@ -201,47 +201,48 @@ infolists: zeigt Information über die Infolists an
add <name> <buffer>[,<buffer>...] <tags> <regex>
del <name>|-all
- list: alle Filter auflisten
- enable: Filter wird aktiviert (Filter werden standardmäßig aktiviert)
-disable: Filter deaktivieren
- toggle: Filter de-/aktivieren
- name: Name des Filters
- add: Filter hinzufügen
- del: Filter entfernen
- -all: entfernt alle Filter
- buffer: durch Kommata getrennte Liste von Buffern in denen der Filter aktiv sein soll:
- - ist der vollständige Name eines Buffers inklusive seiner Erweiterung (Beispiel: "irc.freenode.#weechat")
- - "*" bedeutet alle Buffer
- - beginnt ein Name mit '!' wird für diesen Buffer kein Filter genutzt
- - ein Name darf mit '*' beginnen oder enden um mehrere Buffer auszuwählen
- tags: durch Kommata getrennte Liste mit Tags. Zum Beispiel: "irc_join,irc_part,irc_quit"
- regex: regulärer Ausdruck um in einer Zeile zu suchen
- - das Präfix (z.B. Nick) wird mittels '\t' von der Nachricht getrennt. Sonderzeichen wie '|' müssen mit einer Escapesequenz : '\|' eingebunden werden)
- - wird ein regulärer Ausdruck mit '!' eingeleitet dann wird das übereinstimmende Ergebnis umgekehrt (nutze '\!' um mit '!' zu beginnen)
- - es werden zwei reguläre Ausdrücke erstellt: Der erste für den Präfix und der zweite für die eigentliche Nachricht
-
-Die Tastenvoreinstellung alt+'=' schaltet die Filterfunktion an/aus.
-
-Die am häufigsten gebrauchten Tags lauten:
- no_filter, no_highlight, no_log, log0..log9 (log Level),
+ list: list all filters
+ enable: enable filters (filters are enabled by default)
+disable: disable filters
+ toggle: toggle filters
+ name: filter name
+ add: add a filter
+ del: delete a filter
+ -all: delete all filters
+ buffer: comma separated list of buffers where filter is active:
+ - this is full name including plugin (example: "irc.freenode.#weechat")
+ - "*" means all buffers
+ - a name starting with '!' is excluded
+ - name can start or end with '*' to match many buffers
+ tags: comma separated list of tags, for example: "irc_join,irc_part,irc_quit"
+ regex: regular expression to search in line
+ - use '\t' to separate prefix from message, special chars like '|' must be escaped: '\|'
+ - if regex starts with '!', then matching result is reversed (use '\!' to start with '!')
+ - two regular expressions are created: one for prefix and one for message
+ - regex are case insensitive, they can start by "(?-i)" to become case sensitive
+
+The default key alt+'=' toggles filtering on/off.
+
+Tags most commonly used:
+ no_filter, no_highlight, no_log, log0..log9 (log level),
notify_none, notify_message, notify_private, notify_highlight,
- nick_xxx (xxx ist durch den Nicknamen zu ersetzen),
- irc_xxx (xxx ist durch einen IRC-Befehl/-Nummer zu ersetzen, siehe /server raw)
+ nick_xxx (xxx is nick in message),
+ irc_xxx (xxx is command name or number, see /server raw),
irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, irc_smart_filter, away_info.
-Um sich die Tags jeder einzelnen Zeile darstellen zu lassen: /debug tags
+To see tags for lines in buffers: /debug tags
-Beispiele:
- aktiviert einen einfachen IRC Filter für join/part/quit/nick Nachrichten für alle Buffer:
+Examples:
+ use IRC smart filter on all buffers:
/filter add irc_smart * irc_smart_filter *
- aktiviert einen einfachen IRC Filter für join/part/quit/nick Nachrichten der für alle Buffer genutzt wird, außer Buffer die "#weechat" im Namen tragen:
+ use IRC smart filter on all buffers except those with "#weechat" in name:
/filter add irc_smart *,!*#weechat* irc_smart_filter *
- filtert alle IRC join/part/quit Nachrichten:
+ filter all IRC join/part/quit messages:
/filter add joinquit * irc_join,irc_part,irc_quit *
- filtert Nicks wenn diese den Channel betreten oder durch den Befehl "/names:" angezeigt werden:
+ filter nicks displayed when joining channels or with /names:
/filter add nicks * irc_366 *
- filtert Nick "toto" im IRC Channel #weechat:
+ filter nick "toto" on IRC channel #weechat:
/filter add toto irc.freenode.#weechat nick_toto *
- filtert Zeilen die "weechat sucks" im IRC Channel #weechat enthalten:
+ filter lines containing "weechat sucks" on IRC channel #weechat:
/filter add sucks irc.freenode.#weechat * weechat sucks
........................................
diff --git a/doc/de/autogen/user/weechat_options.txt b/doc/de/autogen/user/weechat_options.txt
index 38c4e12bc..bdb588f30 100644
--- a/doc/de/autogen/user/weechat_options.txt
+++ b/doc/de/autogen/user/weechat_options.txt
@@ -449,12 +449,12 @@
** Werte: on, off (Standardwert: `off`)
* [[option_weechat.look.highlight]] *weechat.look.highlight*
-** Beschreibung: `Durch Kommata getrennte Liste der hervorzuhebenden Wörter (Groß-/Kleinschreibung wird nicht beachtet. Die Schlagwörter können mit "*", als Joker, beginnen oder enden)`
+** Beschreibung: `comma separated list of words to highlight; case insensitive comparison (use "(?-i)" at beginning of words to make them case sensitive), words may begin or end with "*" for partial match; example: "test,(?-i)*toto*,flash*"`
** Typ: Zeichenkette
** Werte: beliebige Zeichenkette (Standardwert: `""`)
* [[option_weechat.look.highlight_regex]] *weechat.look.highlight_regex*
-** Beschreibung: `Suchmuster (regulärer Ausdrück) dass genutzt werden soll um zu überprüfen ob eine Nachricht ein Highlight enthält oder nicht. Mindestens eine Zeichenkette muss dabei auf das Suchmuster passen (alphanumerisch, "-", "_" oder "|"), das Suchmuster unterscheidet zwischen Groß-und Kleinschreibung. Beispiel: "FlashCode|flashy"`
+** Beschreibung: `regular expression used to check if a message has highlight or not, at least one match in string must be surrounded by word chars (alphanumeric, "-", "_" or "|"), regular expression is case insensitive (use "(?-i)" at beginning to make it case sensitive), examples: "flashcode|flashy", "(?-i)FlashCode|flashy"`
** Typ: Zeichenkette
** Werte: beliebige Zeichenkette (Standardwert: `""`)
diff --git a/doc/en/autogen/user/irc_commands.txt b/doc/en/autogen/user/irc_commands.txt
index 42316c583..3d13c4263 100644
--- a/doc/en/autogen/user/irc_commands.txt
+++ b/doc/en/autogen/user/irc_commands.txt
@@ -172,6 +172,8 @@ reason: reason for quit
server: internal server name where ignore is working
channel: channel name where ignore is working
+Note: the regular expression can start with "(?-i)" to become case sensitive.
+
Examples:
ignore nick "toto" everywhere:
/ignore add toto
@@ -272,7 +274,7 @@ server_mask: list of servers must match this mask
channel: channel to list
server: server name
- regex: regular expression used to filter results
+ regex: regular expression used to filter results (case insensitive, can start by "(?-i)" to become case sensitive)
Examples:
list all channels on server (can be very slow on large networks):
diff --git a/doc/en/autogen/user/irc_options.txt b/doc/en/autogen/user/irc_options.txt
index d2cfb689b..c8b91b08e 100644
--- a/doc/en/autogen/user/irc_options.txt
+++ b/doc/en/autogen/user/irc_options.txt
@@ -158,6 +158,21 @@
** type: boolean
** values: on, off (default value: `on`)
+* [[option_irc.look.highlight_channel]] *irc.look.highlight_channel*
+** description: `comma separated list of words to highlight in channel buffers (case insensitive, use "(?-i)" at beginning of words to make them case sensitive; special variables $nick, $channel and $server are replaced by their value), these words are added to buffer local variable "highlight_words" only when buffer is created (it does not affect current buffers), an empty string disables default highlight on nick, examples: "$nick", "(?-i)$nick"`
+** type: string
+** values: any string (default value: `"$nick"`)
+
+* [[option_irc.look.highlight_pv]] *irc.look.highlight_pv*
+** description: `comma separated list of words to highlight in private buffers (case insensitive, use "(?-i)" at beginning of words to make them case sensitive; special variables $nick, $channel and $server are replaced by their value), these words are added to buffer local variable "highlight_words" only when buffer is created (it does not affect current buffers), an empty string disables default highlight on nick, examples: "$nick", "(?-i)$nick"`
+** type: string
+** values: any string (default value: `"$nick"`)
+
+* [[option_irc.look.highlight_server]] *irc.look.highlight_server*
+** description: `comma separated list of words to highlight in server buffers (case insensitive, use "(?-i)" at beginning of words to make them case sensitive; special variables $nick, $channel and $server are replaced by their value), these words are added to buffer local variable "highlight_words" only when buffer is created (it does not affect current buffers), an empty string disables default highlight on nick, examples: "$nick", "(?-i)$nick"`
+** type: string
+** values: any string (default value: `"$nick"`)
+
* [[option_irc.look.highlight_tags]] *irc.look.highlight_tags*
** description: `comma separated list of tags for messages that may produce highlight (usually any message from another user, not server messages,..)`
** type: string
diff --git a/doc/en/autogen/user/relay_options.txt b/doc/en/autogen/user/relay_options.txt
index e11887a88..a3cf672c9 100644
--- a/doc/en/autogen/user/relay_options.txt
+++ b/doc/en/autogen/user/relay_options.txt
@@ -49,7 +49,7 @@
** values: 0 .. 65535 (default value: `256`)
* [[option_relay.network.allowed_ips]] *relay.network.allowed_ips*
-** description: `regular expression with IPs allowed to use relay, example: "^(123.45.67.89|192.160.*)$"`
+** description: `regular expression with IPs allowed to use relay (case insensitive, use "(?-i)" at beginning to make it case sensitive), example: "^(123.45.67.89|192.160.*)$"`
** type: string
** values: any string (default value: `""`)
diff --git a/doc/en/autogen/user/rmodifier_commands.txt b/doc/en/autogen/user/rmodifier_commands.txt
index e9cf8cd65..18906369e 100644
--- a/doc/en/autogen/user/rmodifier_commands.txt
+++ b/doc/en/autogen/user/rmodifier_commands.txt
@@ -12,7 +12,7 @@ listdefault: list default rmodifiers
name: name of rmodifier
modifiers: comma separated list of modifiers
groups: action on groups found: comma separated list of groups (from 1 to 9) with optional "*" after number to hide group
- regex: regular expression
+ regex: regular expression (case insensitive, can start by "(?-i)" to become case sensitive)
del: delete a rmodifier
-all: delete all rmodifiers
default: restore default rmodifiers
diff --git a/doc/en/autogen/user/weechat_commands.txt b/doc/en/autogen/user/weechat_commands.txt
index 1c223fb79..f04f5bdc0 100644
--- a/doc/en/autogen/user/weechat_commands.txt
+++ b/doc/en/autogen/user/weechat_commands.txt
@@ -219,6 +219,7 @@ disable: disable filters
- use '\t' to separate prefix from message, special chars like '|' must be escaped: '\|'
- if regex starts with '!', then matching result is reversed (use '\!' to start with '!')
- two regular expressions are created: one for prefix and one for message
+ - regex are case insensitive, they can start by "(?-i)" to become case sensitive
The default key alt+'=' toggles filtering on/off.
diff --git a/doc/en/autogen/user/weechat_options.txt b/doc/en/autogen/user/weechat_options.txt
index f35a1fa24..128f5a2ac 100644
--- a/doc/en/autogen/user/weechat_options.txt
+++ b/doc/en/autogen/user/weechat_options.txt
@@ -449,12 +449,12 @@
** values: on, off (default value: `off`)
* [[option_weechat.look.highlight]] *weechat.look.highlight*
-** description: `comma separated list of words to highlight (case insensitive comparison, words may begin or end with "*" for partial match)`
+** description: `comma separated list of words to highlight; case insensitive comparison (use "(?-i)" at beginning of words to make them case sensitive), words may begin or end with "*" for partial match; example: "test,(?-i)*toto*,flash*"`
** type: string
** values: any string (default value: `""`)
* [[option_weechat.look.highlight_regex]] *weechat.look.highlight_regex*
-** description: `regular expression used to check if a message has highlight or not, at least one match in string must be surrounded by word chars (alphanumeric, "-", "_" or "|"), regular expression is case sensitive, example: "FlashCode|flashy"`
+** description: `regular expression used to check if a message has highlight or not, at least one match in string must be surrounded by word chars (alphanumeric, "-", "_" or "|"), regular expression is case insensitive (use "(?-i)" at beginning to make it case sensitive), examples: "flashcode|flashy", "(?-i)FlashCode|flashy"`
** type: string
** values: any string (default value: `""`)
diff --git a/doc/en/weechat_plugin_api.en.txt b/doc/en/weechat_plugin_api.en.txt
index a61157f24..cfb4fc994 100644
--- a/doc/en/weechat_plugin_api.en.txt
+++ b/doc/en/weechat_plugin_api.en.txt
@@ -983,33 +983,35 @@ free (str);
[NOTE]
This function is not available in scripting API.
-weechat_string_has_highlight
+weechat_string_mask_to_regex
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-Check if a string has one or more highlights, using list of highlight words.
+Return a regex, built with a mask, where only special char is "`*`". All other
+special chars for regex are escaped.
Prototype:
[source,C]
----------------------------------------
-int weechat_string_has_highlight (const char *string,
- const char highlight_words);
+char *weechat_string_mask_to_regex (const char *mask);
----------------------------------------
Arguments:
-* 'string': string
-* 'highlight_words': list of highlight words, separated by comma
+* 'mask': mask
Return value:
-* 1 if string has one or more highlights, otherwise 0
+* regular expression, as string (must be freed by calling "free" after use)
C example:
[source,C]
----------------------------------------
-int hl = weechat_string_has_highlight ("my test string", "test,word2"); /* == 1 */
+char *str_regex = weechat_string_mask_to_regex ("test*mask");
+/* result: "test.*mask" */
+/* ... */
+free (str_regex);
----------------------------------------
Script (Python):
@@ -1017,32 +1019,126 @@ Script (Python):
[source,python]
----------------------------------------
# prototype
-highlight = weechat.string_has_highlight(string, highlight_words)
+regex = weechat.string_mask_to_regex(mask)
# example
-highlight = weechat.string_has_highlight("my test string", "test,word2") # 1
+regex = weechat.string_mask_to_regex("test*mask") # "test.*mask"
----------------------------------------
-weechat_string_has_highlight_regex
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+weechat_string_regex_flags
+^^^^^^^^^^^^^^^^^^^^^^^^^^
-_New in version 0.3.4._
+_New in version 0.3.7._
-Check if a string has one or more highlights, using a regular expression.
-For at least one match of regular expression on string, it must be surrounded
-by word chars (alphanumeric character, "-", "_" or "|").
+Get pointer on string after flags and return mask with flags to compile regular
+expression.
Prototype:
[source,C]
----------------------------------------
-int weechat_string_has_highlight_regex (const char *string, const char *regex);
+const char *weechat_string_regex_flags (const char *regex, int default_flags, int *flags)
----------------------------------------
Arguments:
-* 'string': string
* 'regex': regular expression
+* 'default_flags': combination of following values (see `man regcomp`):
+** REG_EXTENDED
+** REG_ICASE
+** REG_NEWLINE
+** REG_NOSUB
+* 'flags': pointer value is set with flags used in regular expression (default
+ flags + flags set in regular expression)
+
+Flags must be at beginning of regular expression. Format is:
+"(?eins-eins)string".
+
+Allowed flags are:
+
+* 'e': POSIX extended regular expression ('REG_EXTENDED')
+* 'i': case insensitive ('REG_ICASE')
+* 'n': match-any-character operators don't match a newline ('REG_NEWLINE')
+* 's': support for substring addressing of matches is not required ('REG_NOSUB')
+
+Return value:
+
+* pointer in 'regex', after flags
+
+C example:
+
+[source,C]
+----------------------------------------
+const char *regex = "(?i)test";
+int flags;
+const char *ptr_regex = weechat_string_regex_flags (regex, REG_EXTENDED, &flags);
+/* ptr_regex == "test", flags == REG_EXTENDED | REG_ICASE */
+----------------------------------------
+
+[NOTE]
+This function is not available in scripting API.
+
+weechat_string_regcomp
+^^^^^^^^^^^^^^^^^^^^^^
+
+_New in version 0.3.7._
+
+Compile a regular expression using optional flags at beginning of string (for
+format of flags, see <<_weechat_string_regex_flags,weechat_string_regex_flags>>).
+
+Prototype:
+
+[source,C]
+----------------------------------------
+int weechat_string_regcomp (regex_t *preg, const char *regex, int default_flags)
+----------------------------------------
+
+Arguments:
+
+* 'preg': pointer to 'regex_t' structure
+* 'regex': regular expression
+* 'default_flags': combination of following values (see `man regcomp`):
+** REG_EXTENDED
+** REG_ICASE
+** REG_NEWLINE
+** REG_NOSUB
+
+Return value:
+
+* same return code as function `regcomp` (0 if ok, other value for error,
+ see `man regcomp`)
+
+C example:
+
+[source,C]
+----------------------------------------
+regex_t my_regex;
+if (weechat_string_regcomp (&my_regex, "(?i)test", REG_EXTENDED) != 0)
+{
+ /* error */
+}
+----------------------------------------
+
+[NOTE]
+This function is not available in scripting API.
+
+weechat_string_has_highlight
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Check if a string has one or more highlights, using list of highlight words.
+
+Prototype:
+
+[source,C]
+----------------------------------------
+int weechat_string_has_highlight (const char *string,
+ const char highlight_words);
+----------------------------------------
+
+Arguments:
+
+* 'string': string
+* 'highlight_words': list of highlight words, separated by comma
Return value:
@@ -1052,7 +1148,7 @@ C example:
[source,C]
----------------------------------------
-int hl = weechat_string_has_highlight_regex ("my test string", "test|word2"); /* == 1 */
+int hl = weechat_string_has_highlight ("my test string", "test,word2"); /* == 1 */
----------------------------------------
Script (Python):
@@ -1060,41 +1156,42 @@ Script (Python):
[source,python]
----------------------------------------
# prototype
-highlight = weechat.string_has_highlight_regex(string, regex)
+highlight = weechat.string_has_highlight(string, highlight_words)
# example
-highlight = weechat.string_has_highlight_regex("my test string", "test|word2") # 1
+highlight = weechat.string_has_highlight("my test string", "test,word2") # 1
----------------------------------------
-weechat_string_mask_to_regex
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+weechat_string_has_highlight_regex
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-Return a regex, built with a mask, where only special char is "`*`". All other
-special chars for regex are escaped.
+_New in version 0.3.4._
+
+Check if a string has one or more highlights, using a regular expression.
+For at least one match of regular expression on string, it must be surrounded
+by word chars (alphanumeric character, "-", "_" or "|").
Prototype:
[source,C]
----------------------------------------
-char *weechat_string_mask_to_regex (const char *mask);
+int weechat_string_has_highlight_regex (const char *string, const char *regex);
----------------------------------------
Arguments:
-* 'mask': mask
+* 'string': string
+* 'regex': regular expression
Return value:
-* regular expression, as string (must be freed by calling "free" after use)
+* 1 if string has one or more highlights, otherwise 0
C example:
[source,C]
----------------------------------------
-char *str_regex = weechat_string_mask_to_regex ("test*mask");
-/* result: "test.*mask" */
-/* ... */
-free (str_regex);
+int hl = weechat_string_has_highlight_regex ("my test string", "test|word2"); /* == 1 */
----------------------------------------
Script (Python):
@@ -1102,10 +1199,10 @@ Script (Python):
[source,python]
----------------------------------------
# prototype
-regex = weechat.string_mask_to_regex(mask)
+highlight = weechat.string_has_highlight_regex(string, regex)
# example
-regex = weechat.string_mask_to_regex("test*mask") # "test.*mask"
+highlight = weechat.string_has_highlight_regex("my test string", "test|word2") # 1
----------------------------------------
weechat_string_split
diff --git a/doc/fr/autogen/user/irc_commands.txt b/doc/fr/autogen/user/irc_commands.txt
index 4ba53ace9..7d91c5bbd 100644
--- a/doc/fr/autogen/user/irc_commands.txt
+++ b/doc/fr/autogen/user/irc_commands.txt
@@ -172,6 +172,8 @@ serveur: nom du serveur pour se déconecter
serveur: nom de serveur interne où le ignore fonctionnera
canal: canal où le ignore fonctionnera
+Note: l'expression régulière peut commencer par "(?-i)" pour devenir sensible à la casse.
+
Exemples:
ignorer le pseudo "toto" partout:
/ignore add toto
@@ -272,7 +274,7 @@ masque_serveur: liste des serveurs correspondant au masque
canal: canal à lister
serveur: nom du serveur
- regex: expression régulière utilisée pour filtrer les résultats
+ regex: expression régulière utilisée pour filtrer les résultats (insensible à la casse, peut commencer par "(?-i)" pour devenir sensible à la casse)
Exemples:
lister tous les canaux du serveur (peut être très lent pour les grands réseaux):
diff --git a/doc/fr/autogen/user/irc_options.txt b/doc/fr/autogen/user/irc_options.txt
index d22127eb5..116bf8d89 100644
--- a/doc/fr/autogen/user/irc_options.txt
+++ b/doc/fr/autogen/user/irc_options.txt
@@ -158,6 +158,21 @@
** type: booléen
** valeurs: on, off (valeur par défaut: `on`)
+* [[option_irc.look.highlight_channel]] *irc.look.highlight_channel*
+** description: `liste de mots pour le highlight dans les tampons de type "canal", séparés par des virgules (insensible à la casse, utilisez "(?-i)" au début des mots pour les rendre sensibles à la casse; les variables spéciales $nick, $channel et $server sont remplacées par leurs valeurs), ces mots sont ajoutés à la variable locale du tampon "highlight_words" seulement lorsque le tampon est créé (cela n'affecte pas les tampons courants), une chaîne vide désactive le highlight par défaut sur le pseudo, exemples: "$nick", "(?-i)$nick"`
+** type: chaîne
+** valeurs: toute chaîne (valeur par défaut: `"$nick"`)
+
+* [[option_irc.look.highlight_pv]] *irc.look.highlight_pv*
+** description: `liste de mots pour le highlight dans les tampons de type "privé", séparés par des virgules (insensible à la casse, utilisez "(?-i)" au début des mots pour les rendre sensibles à la casse; les variables spéciales $nick, $channel et $server sont remplacées par leurs valeurs), ces mots sont ajoutés à la variable locale du tampon "highlight_words" seulement lorsque le tampon est créé (cela n'affecte pas les tampons courants), une chaîne vide désactive le highlight par défaut sur le pseudo, exemples: "$nick", "(?-i)$nick"`
+** type: chaîne
+** valeurs: toute chaîne (valeur par défaut: `"$nick"`)
+
+* [[option_irc.look.highlight_server]] *irc.look.highlight_server*
+** description: `liste de mots pour le highlight dans les tampons de type "serveur", séparés par des virgules (insensible à la casse, utilisez "(?-i)" au début des mots pour les rendre sensibles à la casse; les variables spéciales $nick, $channel et $server sont remplacées par leurs valeurs), ces mots sont ajoutés à la variable locale du tampon "highlight_words" seulement lorsque le tampon est créé (cela n'affecte pas les tampons courants), une chaîne vide désactive le highlight par défaut sur le pseudo, exemples: "$nick", "(?-i)$nick"`
+** type: chaîne
+** valeurs: toute chaîne (valeur par défaut: `"$nick"`)
+
* [[option_irc.look.highlight_tags]] *irc.look.highlight_tags*
** description: `liste des tags pour les messages qui peuvent produire un highlight (séparés par des virgules, typiquement tout message venant d'un autre utilisateur, pas les messages du serveur, ...)`
** type: chaîne
diff --git a/doc/fr/autogen/user/relay_options.txt b/doc/fr/autogen/user/relay_options.txt
index 365d96949..d70446880 100644
--- a/doc/fr/autogen/user/relay_options.txt
+++ b/doc/fr/autogen/user/relay_options.txt
@@ -49,7 +49,7 @@
** valeurs: 0 .. 65535 (valeur par défaut: `256`)
* [[option_relay.network.allowed_ips]] *relay.network.allowed_ips*
-** description: `expression régulière avec les IPs autorisées pour le relai, par exemple: "^(123.45.67.89|192.160.*)$"`
+** description: `expression régulière avec les IPs autorisées pour le relai (insensible à la casse, utilisez "(?-i)" en début de chaîne pour la rendre sensible à la casse), exemple: "^(123.45.67.89|192.160.*)$"`
** type: chaîne
** valeurs: toute chaîne (valeur par défaut: `""`)
diff --git a/doc/fr/autogen/user/rmodifier_commands.txt b/doc/fr/autogen/user/rmodifier_commands.txt
index ce35b6430..6bfb7e012 100644
--- a/doc/fr/autogen/user/rmodifier_commands.txt
+++ b/doc/fr/autogen/user/rmodifier_commands.txt
@@ -12,7 +12,7 @@ listdefault: lister les rmodifiers par défaut
name: nom du rmodifier
modifiers: liste de modifiers (séparés par une virgule)
groupes: action sur les groupes trouvés: liste de groupes (séparés par une virgule) (de 1 à 9) avec en option "*" après le nombre pour cacher le groupe
- regex: expression régulière
+ regex: expression régulière (insensible à la casse, peut commencer par "(?-i)" pour devenir sensible à la casse)
del: supprimer un rmodifier
-all: supprimer tous les rmodifiers
default: restaurer les rmodifiers par défaut
diff --git a/doc/fr/autogen/user/weechat_commands.txt b/doc/fr/autogen/user/weechat_commands.txt
index df41b7c6b..d69178263 100644
--- a/doc/fr/autogen/user/weechat_commands.txt
+++ b/doc/fr/autogen/user/weechat_commands.txt
@@ -219,6 +219,7 @@ disable: désactiver les filtres
- utiliser '\t' pour séparer le préfixe du message, les caractères spéciaux comme '|' doivent être échappés: '\|'
- si l'expression régulière commence par '!' alors le résultat est inversé (utiliser '\!' pour démarrer par '!')
- deux expressions régulières sont créées: une pour le préfixe et une pour le message
+ - les expressions régulières sont insensibles à la casse, elles peuvent commencer par "(?-i)" pour devenir sensibles à la casse
La touche par défaut alt+'=' active/désactive le filtrage.
diff --git a/doc/fr/autogen/user/weechat_options.txt b/doc/fr/autogen/user/weechat_options.txt
index b6897e55d..35b636a25 100644
--- a/doc/fr/autogen/user/weechat_options.txt
+++ b/doc/fr/autogen/user/weechat_options.txt
@@ -449,12 +449,12 @@
** valeurs: on, off (valeur par défaut: `off`)
* [[option_weechat.look.highlight]] *weechat.look.highlight*
-** description: `liste des mots pour la notification (séparés par des virgules, la comparaison ne tient pas compte de la casse, les mots peuvent commencer ou se terminer par "*" pour une comparaison partielle)`
+** description: `liste des mots pour la notification séparés par des virgules; la comparaison est insensible à la casse (utilisez "(?-i)" au début des mots pour les rendre sensibles à la casse), les mots peuvent commencer ou se terminer par "*" pour une comparaison partielle; exemple: "test,(?-i)*toto*,flash*"`
** type: chaîne
** valeurs: toute chaîne (valeur par défaut: `""`)
* [[option_weechat.look.highlight_regex]] *weechat.look.highlight_regex*
-** description: `expression régulière utilisée pour vérifier si un message a un "highlight" ou non, au moins une correspondance dans la chaîne doit être entourée de caractères de mot (alpha-numérique, "-", "_" ou "|"), l'expression régulière est sensible à la casse, exemple: "FlashCode|flashy"`
+** description: `expression régulière utilisée pour vérifier si un message a un "highlight" ou non, au moins une correspondance dans la chaîne doit être entourée de caractères de mot (alpha-numérique, "-", "_" ou "|"), l'expression régulière est insensible à la casse (utilisez "(?-i)" au début pour la rendre sensible à la casse), exemples: "flashcode|flashy", "(?-i)FlashCode|flashy"`
** type: chaîne
** valeurs: toute chaîne (valeur par défaut: `""`)
diff --git a/doc/fr/weechat_plugin_api.fr.txt b/doc/fr/weechat_plugin_api.fr.txt
index 735f66093..49b90fb2b 100644
--- a/doc/fr/weechat_plugin_api.fr.txt
+++ b/doc/fr/weechat_plugin_api.fr.txt
@@ -992,34 +992,37 @@ free (str);
[NOTE]
Cette fonction n'est pas disponible dans l'API script.
-weechat_string_has_highlight
+weechat_string_mask_to_regex
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-Vérifie si une chaîne a un ou plusieurs "highlights", en utilisant une liste
-de mots "highlight".
+Retourne une expression régulière ("regex"), construite avec un masque où le
+seul caractère spécial est "`*`". Tous les autres caractères spéciaux
+d'expression régulière sont échappés.
Prototype :
[source,C]
----------------------------------------
-int weechat_string_has_highlight (const char *string,
- const char highlight_words);
+char *weechat_string_mask_to_regex (const char *mask);
----------------------------------------
Paramètres :
-* 'string' : chaîne
-* 'highlight_words' : liste de mots "highlight", séparés par des virgules
+* 'mask' : masque
Valeur de retour :
-* 1 si la chaîne a un ou plusieurs "highlights", sinon 0
+* expression régulière, sous forme de chaîne (doit être libérée par un appel à
+ "free" après utilisation)
Exemple en C :
[source,C]
----------------------------------------
-int hl = weechat_string_has_highlight ("my test string", "test,word2"); /* == 1 */
+char *str_regex = weechat_string_mask_to_regex ("test*mask");
+/* résultat : "test.*mask" */
+/* ... */
+free (str_regex);
----------------------------------------
Script (Python) :
@@ -1027,33 +1030,131 @@ Script (Python) :
[source,python]
----------------------------------------
# prototype
-highlight = weechat.string_has_highlight(string, highlight_words)
+regex = weechat.string_mask_to_regex(mask)
# exemple
-highlight = weechat.string_has_highlight("my test string", "test,word2") # 1
+regex = weechat.string_mask_to_regex("test*mask") # "test.*mask"
----------------------------------------
-weechat_string_has_highlight_regex
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+weechat_string_regex_flags
+^^^^^^^^^^^^^^^^^^^^^^^^^^
-_Nouveau dans la version 0.3.4._
+_Nouveau dans la version 0.3.7._
-Vérifie si une chaîne a un ou plusieurs "highlights", en utilisant une
-expression régulière.
-Pour au moins une correspondance dans la chaîne, elle doit être entourée de
-caractères de mot (caractère alpha-numérique, "-", "_" ou "|").
+Retourne un pointeur dans la chaîne après les "flags" et retourne le masque avec
+les "flags" pour compiler l'expression régulière.
Prototype :
[source,C]
----------------------------------------
-int weechat_string_has_highlight_regex (const char *string, const char *regex);
+const char *weechat_string_regex_flags (const char *regex, int default_flags, int *flags)
----------------------------------------
Paramètres :
-* 'string' : chaîne
* 'regex' : expression régulière
+* 'default_flags' : combinaison des valeurs suivantes (voir `man regcomp`) :
+** REG_EXTENDED
+** REG_ICASE
+** REG_NEWLINE
+** REG_NOSUB
+* 'flags' : la valeur du pointer est alimentée avec les "flags" utilisés dans
+ l'expression régulière ("flags" par défaut + "flags" définis dans l'expression
+ régulière)
+
+Les "flags" doivent être au début de l'expression régulière. Le format est :
+"(?eins-eins)chaîne".
+
+Les "flags" autorisés sont :
+
+* 'e' : expression régulière POSIX étendue ('REG_EXTENDED')
+* 'i' : insensible à la casse ('REG_ICASE')
+* 'n' : les opérateurs qui cherchent n'importe quel caractère ne trouvent pas
+ les nouvelles lignes ('REG_NEWLINE')
+* 's' : le support d'adressage des sous-chaînes de correspondance n'est pas
+ requis ('REG_NOSUB')
+
+Valeur de retour :
+
+* pointeur dans la 'regex', après les "flags"
+
+Exemple en C :
+
+[source,C]
+----------------------------------------
+const char *regex = "(?i)test";
+int flags;
+const char *ptr_regex = weechat_string_regex_flags (regex, REG_EXTENDED, &flags);
+/* ptr_regex == "test", flags == REG_EXTENDED | REG_ICASE */
+----------------------------------------
+
+[NOTE]
+Cette fonction n'est pas disponible dans l'API script.
+
+weechat_string_regcomp
+^^^^^^^^^^^^^^^^^^^^^^
+
+_Nouveau dans la version 0.3.7._
+
+Compile une expression régulière avec des "flags" optionnels en début de chaîne
+(pour le format des "flags", voir
+<<_weechat_string_regex_flags,weechat_string_regex_flags>>).
+
+Prototype :
+
+[source,C]
+----------------------------------------
+int weechat_string_regcomp (regex_t *preg, const char *regex, int default_flags)
+----------------------------------------
+
+Paramètres :
+
+* 'preg' : pointeur vers la structure 'regex_t'
+* 'regex' : expression régulière
+* 'default_flags' : combinaison des valeurs suivantes (voir `man regcomp`) :
+** REG_EXTENDED
+** REG_ICASE
+** REG_NEWLINE
+** REG_NOSUB
+
+Valeur de retour :
+
+* même code retour que la fonction `regcomp` (0 si ok, autre valeur pour une
+ erreur, voir `man regcomp`)
+
+Exemple en C :
+
+[source,C]
+----------------------------------------
+regex_t my_regex;
+if (weechat_string_regcomp (&my_regex, "(?i)test", REG_EXTENDED) != 0)
+{
+ /* erreur */
+}
+----------------------------------------
+
+[NOTE]
+Cette fonction n'est pas disponible dans l'API script.
+
+weechat_string_has_highlight
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Vérifie si une chaîne a un ou plusieurs "highlights", en utilisant une liste
+de mots "highlight".
+
+Prototype :
+
+[source,C]
+----------------------------------------
+int weechat_string_has_highlight (const char *string,
+ const char highlight_words);
+----------------------------------------
+
+Paramètres :
+
+* 'string' : chaîne
+* 'highlight_words' : liste de mots "highlight", séparés par des virgules
Valeur de retour :
@@ -1063,7 +1164,7 @@ Exemple en C :
[source,C]
----------------------------------------
-int hl = weechat_string_has_highlight_regex ("my test string", "test|word2"); /* == 1 */
+int hl = weechat_string_has_highlight ("my test string", "test,word2"); /* == 1 */
----------------------------------------
Script (Python) :
@@ -1071,43 +1172,43 @@ Script (Python) :
[source,python]
----------------------------------------
# prototype
-highlight = weechat.string_has_highlight_regex(string, regex)
+highlight = weechat.string_has_highlight(string, highlight_words)
# exemple
-highlight = weechat.string_has_highlight_regex("my test string", "test|word2") # 1
+highlight = weechat.string_has_highlight("my test string", "test,word2") # 1
----------------------------------------
-weechat_string_mask_to_regex
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+weechat_string_has_highlight_regex
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-Retourne une expression régulière ("regex"), construite avec un masque où le
-seul caractère spécial est "`*`". Tous les autres caractères spéciaux
-d'expression régulière sont échappés.
+_Nouveau dans la version 0.3.4._
+
+Vérifie si une chaîne a un ou plusieurs "highlights", en utilisant une
+expression régulière.
+Pour au moins une correspondance dans la chaîne, elle doit être entourée de
+caractères de mot (caractère alpha-numérique, "-", "_" ou "|").
Prototype :
[source,C]
----------------------------------------
-char *weechat_string_mask_to_regex (const char *mask);
+int weechat_string_has_highlight_regex (const char *string, const char *regex);
----------------------------------------
Paramètres :
-* 'mask' : masque
+* 'string' : chaîne
+* 'regex' : expression régulière
Valeur de retour :
-* expression régulière, sous forme de chaîne (doit être libérée par un appel à
- "free" après utilisation)
+* 1 si la chaîne a un ou plusieurs "highlights", sinon 0
Exemple en C :
[source,C]
----------------------------------------
-char *str_regex = weechat_string_mask_to_regex ("test*mask");
-/* résultat : "test.*mask" */
-/* ... */
-free (str_regex);
+int hl = weechat_string_has_highlight_regex ("my test string", "test|word2"); /* == 1 */
----------------------------------------
Script (Python) :
@@ -1115,10 +1216,10 @@ Script (Python) :
[source,python]
----------------------------------------
# prototype
-regex = weechat.string_mask_to_regex(mask)
+highlight = weechat.string_has_highlight_regex(string, regex)
# exemple
-regex = weechat.string_mask_to_regex("test*mask") # "test.*mask"
+highlight = weechat.string_has_highlight_regex("my test string", "test|word2") # 1
----------------------------------------
weechat_string_split
diff --git a/doc/it/autogen/user/irc_commands.txt b/doc/it/autogen/user/irc_commands.txt
index a6ae9df79..e91f37d30 100644
--- a/doc/it/autogen/user/irc_commands.txt
+++ b/doc/it/autogen/user/irc_commands.txt
@@ -163,22 +163,24 @@ motivo: motivo per la disconnessione
add [re:]<nick> [<server> [<canale>]]
del <numero>|-all
- list: elenca tutti gli ignore
- add: aggiungi un ignore
- nick: nick oppure hostname (può essere un'espressione regolare se forinito il parametro "-re:")
- del: elimina un ignore
- numero: numero di ignore da eliminare (nella lista)
- -all: elimina tutti gli ignore
- server: nome interno del server dove l'ignore è attivo
- canale: nome del canale dove l'ignore è attivo
-
-Esempi:
- ignora nick "tizio" su tutti gli host/canali:
- /ignore add tizio
- ignora l'host "tizio@dominio.com" sul server freenode:
- /ignore add tizio@dominio.com freenode
- ignora l'host "tizio*@*.dominio.com" su freenode/#weechat:
- /ignore add tizio*@*.dominio.com freenode #weechat
+ list: list all ignores
+ add: add an ignore
+ nick: nick or hostname (can be regular expression if "re:" is given or a mask using "*" to replace one or more chars)
+ del: delete an ignore
+ number: number of ignore to delete (look at list to find it)
+ -all: delete all ignores
+ server: internal server name where ignore is working
+ channel: channel name where ignore is working
+
+Note: the regular expression can start with "(?-i)" to become case sensitive.
+
+Examples:
+ ignore nick "toto" everywhere:
+ /ignore add toto
+ ignore host "toto@domain.com" on freenode server:
+ /ignore add toto@domain.com freenode
+ ignore host "toto*@*.domain.com" on freenode/#weechat:
+ /ignore add toto*@*.domain.com freenode #weechat
........................................
[[command_irc_info]]
@@ -270,16 +272,16 @@ mask_server: elenco dei server che devono corrispondere a questa mask
........................................
/list [<canale>[,<canale>...]] [<server>] [-re <regexp>]
-canale: canale da elencare
-server: nome del server
-regex: espressione regolare usata per filtrare i risultati
+channel: channel to list
+ server: server name
+ regex: regular expression used to filter results (case insensitive, can start by "(?-i)" to become case sensitive)
-Esempi:
- elenca tutti i canali sul server (può essere molto lento su grandi network):
+Examples:
+ list all channels on server (can be very slow on large networks):
/list
- elenca il canale #weechat:
- /list #weechat.*
- elenca tutti i canali che iniziano con "#weechat" (può essere molto lento su grandi network):
+ list channel #weechat:
+ /list #weechat
+ list all channels beginning with "#weechat" (can be very slow on large networks):
/list -re #weechat.*
........................................
diff --git a/doc/it/autogen/user/irc_options.txt b/doc/it/autogen/user/irc_options.txt
index 3a4769875..f0a0a1962 100644
--- a/doc/it/autogen/user/irc_options.txt
+++ b/doc/it/autogen/user/irc_options.txt
@@ -158,6 +158,21 @@
** tipo: bool
** valori: on, off (valore predefinito: `on`)
+* [[option_irc.look.highlight_channel]] *irc.look.highlight_channel*
+** descrizione: `comma separated list of words to highlight in channel buffers (case insensitive, use "(?-i)" at beginning of words to make them case sensitive; special variables $nick, $channel and $server are replaced by their value), these words are added to buffer local variable "highlight_words" only when buffer is created (it does not affect current buffers), an empty string disables default highlight on nick, examples: "$nick", "(?-i)$nick"`
+** tipo: stringa
+** valori: qualsiasi stringa (valore predefinito: `"$nick"`)
+
+* [[option_irc.look.highlight_pv]] *irc.look.highlight_pv*
+** descrizione: `comma separated list of words to highlight in private buffers (case insensitive, use "(?-i)" at beginning of words to make them case sensitive; special variables $nick, $channel and $server are replaced by their value), these words are added to buffer local variable "highlight_words" only when buffer is created (it does not affect current buffers), an empty string disables default highlight on nick, examples: "$nick", "(?-i)$nick"`
+** tipo: stringa
+** valori: qualsiasi stringa (valore predefinito: `"$nick"`)
+
+* [[option_irc.look.highlight_server]] *irc.look.highlight_server*
+** descrizione: `comma separated list of words to highlight in server buffers (case insensitive, use "(?-i)" at beginning of words to make them case sensitive; special variables $nick, $channel and $server are replaced by their value), these words are added to buffer local variable "highlight_words" only when buffer is created (it does not affect current buffers), an empty string disables default highlight on nick, examples: "$nick", "(?-i)$nick"`
+** tipo: stringa
+** valori: qualsiasi stringa (valore predefinito: `"$nick"`)
+
* [[option_irc.look.highlight_tags]] *irc.look.highlight_tags*
** descrizione: `elenco separato da liste di tag per i messaggi che potrebbero generare eventi (di solito qualsiasi messaggio da altri utenti, non quelli dal server...)`
** tipo: stringa
diff --git a/doc/it/autogen/user/relay_options.txt b/doc/it/autogen/user/relay_options.txt
index a6935f063..61a81bb83 100644
--- a/doc/it/autogen/user/relay_options.txt
+++ b/doc/it/autogen/user/relay_options.txt
@@ -49,7 +49,7 @@
** valori: 0 .. 65535 (valore predefinito: `256`)
* [[option_relay.network.allowed_ips]] *relay.network.allowed_ips*
-** descrizione: `espressione regolare con gli indirizzi IP a cui è consentito usare il relay, esempio: "^(123.45.67.89|192.160.*)$"`
+** descrizione: `regular expression with IPs allowed to use relay (case insensitive, use "(?-i)" at beginning to make it case sensitive), example: "^(123.45.67.89|192.160.*)$"`
** tipo: stringa
** valori: qualsiasi stringa (valore predefinito: `""`)
diff --git a/doc/it/autogen/user/rmodifier_commands.txt b/doc/it/autogen/user/rmodifier_commands.txt
index 280aa9c82..18820c4b3 100644
--- a/doc/it/autogen/user/rmodifier_commands.txt
+++ b/doc/it/autogen/user/rmodifier_commands.txt
@@ -6,23 +6,23 @@
del <nome>|-all [<nome>...]
default -yes
- list: elenca tutti gli rmodifier
-listdefault: elenca gli rmodifier predefiniti
- add: aggiunge un rmodifier
- nome: nome rmodifier
- modifier: elenco separato da virgole di modificatori
- gruppi: azione sul gruppo trovato: elenco separato da virgole di gruppi (da 1 a 9) con "*" opzionale dopo il numero per nascondere il gruppo
- regex: espressione regolare
- del: elimina rmodifier
- -all: elimina tutti gli rmodifier
- default: ripristina gli rmodifier predefiniti
+ list: list all rmodifiers
+listdefault: list default rmodifiers
+ add: add a rmodifier
+ name: name of rmodifier
+ modifiers: comma separated list of modifiers
+ groups: action on groups found: comma separated list of groups (from 1 to 9) with optional "*" after number to hide group
+ regex: regular expression (case insensitive, can start by "(?-i)" to become case sensitive)
+ del: delete a rmodifier
+ -all: delete all rmodifiers
+ default: restore default rmodifiers
-Esempi:
- nasconde ciò che viene digitato dopo il comando /password:
+Examples:
+ hide everything typed after a command /password:
/rmodifier add password input_text_display 1,2* ^(/password +)(.*)
- elimina rmodifier "password":
+ delete rmodifier "password":
/rmodifier del password
- elimina tutti gli rmodifier:
+ delete all rmodifiers:
/rmodifier del -all
........................................
diff --git a/doc/it/autogen/user/weechat_commands.txt b/doc/it/autogen/user/weechat_commands.txt
index 0572b0397..98f6229d2 100644
--- a/doc/it/autogen/user/weechat_commands.txt
+++ b/doc/it/autogen/user/weechat_commands.txt
@@ -201,48 +201,49 @@ infolists: mostra informazioni sulle liste info
add <nome> <buffer>[,<buffer>...] <tag> <regex>]
del <nome>|-all
- list: elenca tutti i filtri
- enable: abilita filtri (i filtri sono abilitati di default)
- disable: disabilita filtri
- toggle: abilita/disabilita filtri
- nome: nome del filtro
- add: aggiunge un filtro
- del: elimina un filtro
- -all: elimina tutti i filtri
- buffer: elenco separato da virgole di buffer in cui il filtro è attivo:
- - nome completo che include il plugin (esempio: "irc.freenode.#weechat)
- - "*" indica tutti i buffer
- - un nome preceduto da '!' viene escluso
- - un nome può iniziare o terminare con '*' per includere più buffer
- tag: elenco di tag separati da virgole, per esempio: "irc_join,irc_part,irc_quit"
- regex: espressione regolare da cercare nella riga
- - usare '\t' per separare il prefisso dal messaggio, caratteri speciali come "|" vanno preceduti dal carattere escape: '\|')
- - se l'espressione regolare inizia con '!', il risultato corrispondente viene invertito (usare '\!' per iniziare con '!')
-
- -vengono create due espressioni regolari: una per il prefisso e l'altra per il messaggio
-
-Il tasto predefinito alt+'=' abilita/disabilita il filtro.
-
-Tag usati di frequente:
- no_filter, no_highlight, no_log, log0..log9 (livello di log),
+ list: list all filters
+ enable: enable filters (filters are enabled by default)
+disable: disable filters
+ toggle: toggle filters
+ name: filter name
+ add: add a filter
+ del: delete a filter
+ -all: delete all filters
+ buffer: comma separated list of buffers where filter is active:
+ - this is full name including plugin (example: "irc.freenode.#weechat")
+ - "*" means all buffers
+ - a name starting with '!' is excluded
+ - name can start or end with '*' to match many buffers
+ tags: comma separated list of tags, for example: "irc_join,irc_part,irc_quit"
+ regex: regular expression to search in line
+ - use '\t' to separate prefix from message, special chars like '|' must be escaped: '\|'
+ - if regex starts with '!', then matching result is reversed (use '\!' to start with '!')
+ - two regular expressions are created: one for prefix and one for message
+ - regex are case insensitive, they can start by "(?-i)" to become case sensitive
+
+The default key alt+'=' toggles filtering on/off.
+
+Tags most commonly used:
+ no_filter, no_highlight, no_log, log0..log9 (log level),
notify_none, notify_message, notify_private, notify_highlight,
- nick_xxx (xxx è il nick nel messaggio),
- irc_xxx (xxx è il nome comando o il numero, consultare /server raw), irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, irc_smart_filter, away_info.
-Per mostrare i tag per le righe nei buffer: /debug tags
+ nick_xxx (xxx is nick in message),
+ irc_xxx (xxx is command name or number, see /server raw),
+ irc_numeric, irc_error, irc_action, irc_ctcp, irc_ctcp_reply, irc_smart_filter, away_info.
+To see tags for lines in buffers: /debug tags
-Esempi:
- usa il filtro intelligente IRC per tutti i buffer:
- /filter add irc_smart * irc_smart_filter *
- usa il filtro intelligente IRC su tutti i buffer tranne quelli che contengono "#weechat" nel nome:
- /filter add irc_smart *,!*weechat* irc_smart_filter
- filtra tutti i messaggi entrata/uscita/abbandono di IRC:
- /filter add joinquit * irc_join,irc_part,irc_quit *
- filtra i nick visualizzati all'ingresso in un canale o con /names:
+Examples:
+ use IRC smart filter on all buffers:
+ /filter add irc_smart * irc_smart_filter *
+ use IRC smart filter on all buffers except those with "#weechat" in name:
+ /filter add irc_smart *,!*#weechat* irc_smart_filter *
+ filter all IRC join/part/quit messages:
+ /filter add joinquit * irc_join,irc_part,irc_quit *
+ filter nicks displayed when joining channels or with /names:
/filter add nicks * irc_366 *
- filtra il nick "tizio" sul canale IRC #weechat:
- /filter add tizio irc.freenode.#weechat nick_tizio *
- filtra le righe contententi "weechat fa schifo" sul canale IRC #weechat:
- /filter add schifo irc.freenode.#weechat * weechat fa schifo
+ filter nick "toto" on IRC channel #weechat:
+ /filter add toto irc.freenode.#weechat nick_toto *
+ filter lines containing "weechat sucks" on IRC channel #weechat:
+ /filter add sucks irc.freenode.#weechat * weechat sucks
........................................
[[command_weechat_help]]
diff --git a/doc/it/autogen/user/weechat_options.txt b/doc/it/autogen/user/weechat_options.txt
index 68e348628..72e5bc67f 100644
--- a/doc/it/autogen/user/weechat_options.txt
+++ b/doc/it/autogen/user/weechat_options.txt
@@ -449,12 +449,12 @@
** valori: on, off (valore predefinito: `off`)
* [[option_weechat.look.highlight]] *weechat.look.highlight*
-** descrizione: `elenco separato da virgole di finestre da evidenziare (maiuscole/minuscole, le parole potrebbero cominciare o terminare con "*" per un riscontro parziale)`
+** descrizione: `comma separated list of words to highlight; case insensitive comparison (use "(?-i)" at beginning of words to make them case sensitive), words may begin or end with "*" for partial match; example: "test,(?-i)*toto*,flash*"`
** tipo: stringa
** valori: qualsiasi stringa (valore predefinito: `""`)
* [[option_weechat.look.highlight_regex]] *weechat.look.highlight_regex*
-** descrizione: `l'espressione regolare usata per verificare se un messaggio contiene un evento oppure no, almeno una corrispondenza nella stringa deve essere circondata da caratteri :(alfanumerici, "-", "_" or "|"), l'espressione regolare è esatta, esempio "FlashCode|flashy"`
+** descrizione: `regular expression used to check if a message has highlight or not, at least one match in string must be surrounded by word chars (alphanumeric, "-", "_" or "|"), regular expression is case insensitive (use "(?-i)" at beginning to make it case sensitive), examples: "flashcode|flashy", "(?-i)FlashCode|flashy"`
** tipo: stringa
** valori: qualsiasi stringa (valore predefinito: `""`)
diff --git a/doc/it/weechat_plugin_api.it.txt b/doc/it/weechat_plugin_api.it.txt
index 754c6ff33..1c01615b2 100644
--- a/doc/it/weechat_plugin_api.it.txt
+++ b/doc/it/weechat_plugin_api.it.txt
@@ -1006,34 +1006,37 @@ free (str);
[NOTE]
Questa funzione non è disponibile nelle API per lo scripting.
-weechat_string_has_highlight
+weechat_string_mask_to_regex
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-Controlla se una stringa ha uno o più eventi, usando la lista di parole per
-gli eventi.
+Restituisce una espressione regolare con una mask, dove l'unico carattere
+speciale è "`*`". Tutti gli altri caratteri speciali per le espressioni regolari
+non vengono riconosciuti.
Prototipo:
[source,C]
----------------------------------------
-int weechat_string_has_highlight (const char *string,
- const char highlight_words);
+char *weechat_string_mask_to_regex (const char *mask);
----------------------------------------
Argomenti:
-* 'string': stringa
-* 'highlight_words': lista di parole per gli eventi, separate da virgole
+* 'mask': mask
Valore restituito:
-* 1 se la stringa ha uno o più eventi, altrimenti 0
+* espressione regolare, come stringa (deve essere liberata chiamando "free"
+ dopo l'uso)
Esempio in C:
[source,C]
----------------------------------------
-int hl = weechat_string_has_highlight ("my test string", "test,word2"); /* == 1 */
+char *str_regex = weechat_string_mask_to_regex ("test*mask");
+/* result: "test.*mask" */
+/* ... */
+free (str_regex);
----------------------------------------
Script (Python):
@@ -1041,43 +1044,139 @@ Script (Python):
[source,python]
----------------------------------------
# prototipo
-highlight = weechat.string_has_highlight(string, highlight_words)
+regex = weechat.string_mask_to_regex(mask)
# esempio
-highlight = weechat.string_has_highlight("my test string", "test,word2") # 1
+regex = weechat.string_mask_to_regex("test*mask") # "test.*mask"
----------------------------------------
-weechat_string_mask_to_regex
+// TRANSLATION MISSING
+weechat_string_regex_flags
+^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+_Novità nella versione 0.3.7._
+
+Get pointer on string after flags and return mask with flags to compile regular
+expression.
+
+Prototipo:
+
+[source,C]
+----------------------------------------
+const char *weechat_string_regex_flags (const char *regex, int default_flags, int *flags)
+----------------------------------------
+
+Argomenti:
+
+* 'regex': regular expression
+* 'default_flags': combination of following values (see `man regcomp`):
+** REG_EXTENDED
+** REG_ICASE
+** REG_NEWLINE
+** REG_NOSUB
+* 'flags': pointer value is set with flags used in regular expression (default
+ flags + flags set in regular expression)
+
+Flags must be at beginning of regular expression. Format is:
+"(?eins-eins)string".
+
+Allowed flags are:
+
+* 'e': POSIX extended regular expression ('REG_EXTENDED')
+* 'i': case insensitive ('REG_ICASE')
+* 'n': match-any-character operators don't match a newline ('REG_NEWLINE')
+* 's': support for substring addressing of matches is not required ('REG_NOSUB')
+
+Valore restituito:
+
+* pointer in 'regex', after flags
+
+Esempio in C:
+
+[source,C]
+----------------------------------------
+const char *regex = "(?i)test";
+int flags;
+const char *ptr_regex = weechat_string_regex_flags (regex, REG_EXTENDED, &flags);
+/* ptr_regex == "test", flags == REG_EXTENDED | REG_ICASE */
+----------------------------------------
+
+[NOTE]
+Questa funzione non è disponibile nelle API per lo scripting.
+
+// TRANSLATION MISSING
+weechat_string_regcomp
+^^^^^^^^^^^^^^^^^^^^^^
+
+_Novità nella versione 0.3.7._
+
+Compile a regular expression using optional flags at beginning of string (for
+format of flags, see <<_weechat_string_regex_flags,weechat_string_regex_flags>>).
+
+Prototipo:
+
+[source,C]
+----------------------------------------
+int weechat_string_regcomp (regex_t *preg, const char *regex, int default_flags)
+----------------------------------------
+
+Argomenti:
+
+* 'preg': pointer to 'regex_t' structure
+* 'regex': regular expression
+* 'default_flags': combination of following values (see `man regcomp`):
+** REG_EXTENDED
+** REG_ICASE
+** REG_NEWLINE
+** REG_NOSUB
+
+Valore restituito:
+
+* same return code as function `regcomp` (0 if ok, other value for error,
+ see `man regcomp`)
+
+Esempio in C:
+
+[source,C]
+----------------------------------------
+regex_t my_regex;
+if (weechat_string_regcomp (&my_regex, "(?i)test", REG_EXTENDED) != 0)
+{
+ /* error */
+}
+----------------------------------------
+
+[NOTE]
+Questa funzione non è disponibile nelle API per lo scripting.
+
+weechat_string_has_highlight
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-Restituisce una espressione regolare con una mask, dove l'unico carattere
-speciale è "`*`". Tutti gli altri caratteri speciali per le espressioni regolari
-non vengono riconosciuti.
+Controlla se una stringa ha uno o più eventi, usando la lista di parole per
+gli eventi.
Prototipo:
[source,C]
----------------------------------------
-char *weechat_string_mask_to_regex (const char *mask);
+int weechat_string_has_highlight (const char *string,
+ const char highlight_words);
----------------------------------------
Argomenti:
-* 'mask': mask
+* 'string': stringa
+* 'highlight_words': lista di parole per gli eventi, separate da virgole
Valore restituito:
-* espressione regolare, come stringa (deve essere liberata chiamando "free"
- dopo l'uso)
+* 1 se la stringa ha uno o più eventi, altrimenti 0
Esempio in C:
[source,C]
----------------------------------------
-char *str_regex = weechat_string_mask_to_regex ("test*mask");
-/* result: "test.*mask" */
-/* ... */
-free (str_regex);
+int hl = weechat_string_has_highlight ("my test string", "test,word2"); /* == 1 */
----------------------------------------
Script (Python):
@@ -1085,10 +1184,10 @@ Script (Python):
[source,python]
----------------------------------------
# prototipo
-regex = weechat.string_mask_to_regex(mask)
+highlight = weechat.string_has_highlight(string, highlight_words)
# esempio
-regex = weechat.string_mask_to_regex("test*mask") # "test.*mask"
+highlight = weechat.string_has_highlight("my test string", "test,word2") # 1
----------------------------------------
weechat_string_split
diff --git a/po/cs.po b/po/cs.po
index 635394963..cee1f9aa2 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2012-01-15 09:29+0100\n"
+"POT-Creation-Date: 2012-01-22 13:38+0100\n"
"PO-Revision-Date: 2011-12-25 22:56+0100\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1210,6 +1210,8 @@ msgid ""
"'\\!' to start with '!')\n"
" - two regular expressions are created: one for prefix and one for "
"message\n"
+" - regex are case insensitive, they can start by \"(?-i)\" to become "
+"case sensitive\n"
"\n"
"The default key alt+'=' toggles filtering on/off.\n"
"\n"
@@ -2347,18 +2349,23 @@ msgid ""
"because it can cause serious display bugs)"
msgstr ""
+#, fuzzy
msgid ""
-"comma separated list of words to highlight (case insensitive comparison, "
-"words may begin or end with \"*\" for partial match)"
+"comma separated list of words to highlight; case insensitive comparison (use "
+"\"(?-i)\" at beginning of words to make them case sensitive), words may "
+"begin or end with \"*\" for partial match; example: \"test,(?-i)*toto*,flash*"
+"\""
msgstr ""
"čárkou oddělený seznam slov pro zvýraznění (neporovnává se velikost písmen, "
"slova mohou začínat nebo končit \"*\" pro částečnou schodu)"
+#, fuzzy
msgid ""
"regular expression used to check if a message has highlight or not, at least "
"one match in string must be surrounded by word chars (alphanumeric, \"-\", "
-"\"_\" or \"|\"), regular expression is case sensitive, example: \"FlashCode|"
-"flashy\""
+"\"_\" or \"|\"), regular expression is case insensitive (use \"(?-i)\" at "
+"beginning to make it case sensitive), examples: \"flashcode|flashy\", \"(?-i)"
+"FlashCode|flashy\""
msgstr ""
"regulární výraz pro zkontrolování zda má zpráva být zvýrazněna nebo ne, "
"alespoň jedno nalezení v řetězci musí být obklopeno znaky slov "
@@ -4358,6 +4365,9 @@ msgid ""
" server: internal server name where ignore is working\n"
" channel: channel name where ignore is working\n"
"\n"
+"Note: the regular expression can start with \"(?-i)\" to become case "
+"sensitive.\n"
+"\n"
"Examples:\n"
" ignore nick \"toto\" everywhere:\n"
" /ignore add toto\n"
@@ -4509,10 +4519,12 @@ msgstr "vypsat kanály a jejich témata"
msgid "[<channel>[,<channel>...]] [<server>] [-re <regex>]"
msgstr "[<kanál>[,<kanál>...]] [<server>] [-re <regexp>]"
+#, fuzzy
msgid ""
"channel: channel to list\n"
" server: server name\n"
-" regex: regular expression used to filter results\n"
+" regex: regular expression used to filter results (case insensitive, can "
+"start by \"(?-i)\" to become case sensitive)\n"
"\n"
"Examples:\n"
" list all channels on server (can be very slow on large networks):\n"
@@ -5573,6 +5585,36 @@ msgid "hide password displayed by nickserv"
msgstr "schovat heslo zobrazené nickservem"
msgid ""
+"comma separated list of words to highlight in server buffers (case "
+"insensitive, use \"(?-i)\" at beginning of words to make them case "
+"sensitive; special variables $nick, $channel and $server are replaced by "
+"their value), these words are added to buffer local variable "
+"\"highlight_words\" only when buffer is created (it does not affect current "
+"buffers), an empty string disables default highlight on nick, examples: "
+"\"$nick\", \"(?-i)$nick\""
+msgstr ""
+
+msgid ""
+"comma separated list of words to highlight in channel buffers (case "
+"insensitive, use \"(?-i)\" at beginning of words to make them case "
+"sensitive; special variables $nick, $channel and $server are replaced by "
+"their value), these words are added to buffer local variable "
+"\"highlight_words\" only when buffer is created (it does not affect current "
+"buffers), an empty string disables default highlight on nick, examples: "
+"\"$nick\", \"(?-i)$nick\""
+msgstr ""
+
+msgid ""
+"comma separated list of words to highlight in private buffers (case "
+"insensitive, use \"(?-i)\" at beginning of words to make them case "
+"sensitive; special variables $nick, $channel and $server are replaced by "
+"their value), these words are added to buffer local variable "
+"\"highlight_words\" only when buffer is created (it does not affect current "
+"buffers), an empty string disables default highlight on nick, examples: "
+"\"$nick\", \"(?-i)$nick\""
+msgstr ""
+
+msgid ""
"comma separated list of tags for messages that may produce highlight "
"(usually any message from another user, not server messages,..)"
msgstr ""
@@ -7347,7 +7389,8 @@ msgid "text color for \"disconnected\" status"
msgstr "barva textu pro status \"odpojen\""
msgid ""
-"regular expression with IPs allowed to use relay, example: \"^(123.45.67.89|"
+"regular expression with IPs allowed to use relay (case insensitive, use \"(?-"
+"i)\" at beginning to make it case sensitive), example: \"^(123.45.67.89|"
"192.160.*)$\""
msgstr ""
@@ -7485,6 +7528,7 @@ msgstr ""
"list|listdefault || add <name> <modifiers> <groups> <regex> || del <name>|-"
"all [<name>...] || default -yes"
+#, fuzzy
msgid ""
" list: list all rmodifiers\n"
"listdefault: list default rmodifiers\n"
@@ -7493,7 +7537,8 @@ msgid ""
" modifiers: comma separated list of modifiers\n"
" groups: action on groups found: comma separated list of groups (from 1 "
"to 9) with optional \"*\" after number to hide group\n"
-" regex: regular expression\n"
+" regex: regular expression (case insensitive, can start by \"(?-i)\" to "
+"become case sensitive)\n"
" del: delete a rmodifier\n"
" -all: delete all rmodifiers\n"
" default: restore default rmodifiers\n"
diff --git a/po/de.po b/po/de.po
index df4026a33..86abca939 100644
--- a/po/de.po
+++ b/po/de.po
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2012-01-18 13:19+0100\n"
+"POT-Creation-Date: 2012-01-22 13:38+0100\n"
"PO-Revision-Date: 2012-01-16 22:33+0100\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1227,6 +1227,7 @@ msgstr ""
"list || enable|disable|toggle [<name>] || add <name> <buffer>[,<buffer>...] "
"<tags> <regex> || del <name>|-all"
+#, fuzzy
msgid ""
" list: list all filters\n"
" enable: enable filters (filters are enabled by default)\n"
@@ -1251,6 +1252,8 @@ msgid ""
"'\\!' to start with '!')\n"
" - two regular expressions are created: one for prefix and one for "
"message\n"
+" - regex are case insensitive, they can start by \"(?-i)\" to become "
+"case sensitive\n"
"\n"
"The default key alt+'=' toggles filtering on/off.\n"
"\n"
@@ -2560,19 +2563,24 @@ msgstr ""
"anderen Applikation nicht umgebrochen wird (diese Option ist standardmäßig "
"deaktiviert, da es zu schwerwiegenden Grafikfehlern kommen kann)"
+#, fuzzy
msgid ""
-"comma separated list of words to highlight (case insensitive comparison, "
-"words may begin or end with \"*\" for partial match)"
+"comma separated list of words to highlight; case insensitive comparison (use "
+"\"(?-i)\" at beginning of words to make them case sensitive), words may "
+"begin or end with \"*\" for partial match; example: \"test,(?-i)*toto*,flash*"
+"\""
msgstr ""
"Durch Kommata getrennte Liste der hervorzuhebenden Wörter (Groß-/"
"Kleinschreibung wird nicht beachtet. Die Schlagwörter können mit \"*\", als "
"Joker, beginnen oder enden)"
+#, fuzzy
msgid ""
"regular expression used to check if a message has highlight or not, at least "
"one match in string must be surrounded by word chars (alphanumeric, \"-\", "
-"\"_\" or \"|\"), regular expression is case sensitive, example: \"FlashCode|"
-"flashy\""
+"\"_\" or \"|\"), regular expression is case insensitive (use \"(?-i)\" at "
+"beginning to make it case sensitive), examples: \"flashcode|flashy\", \"(?-i)"
+"FlashCode|flashy\""
msgstr ""
"Suchmuster (regulärer Ausdrück) dass genutzt werden soll um zu überprüfen ob "
"eine Nachricht ein Highlight enthält oder nicht. Mindestens eine "
@@ -4676,6 +4684,7 @@ msgstr "Ignoriert Nicks/Hosts von Channels oder Servern"
msgid "list || add [re:]<nick> [<server> [<channel>]] || del <number>|-all"
msgstr "list || add [re:]<nick> [<server> [<channel>]] || del <number>|-all"
+#, fuzzy
msgid ""
" list: list all ignores\n"
" add: add an ignore\n"
@@ -4687,6 +4696,9 @@ msgid ""
" server: internal server name where ignore is working\n"
" channel: channel name where ignore is working\n"
"\n"
+"Note: the regular expression can start with \"(?-i)\" to become case "
+"sensitive.\n"
+"\n"
"Examples:\n"
" ignore nick \"toto\" everywhere:\n"
" /ignore add toto\n"
@@ -4838,10 +4850,12 @@ msgstr "Channels mit ihrem Thema auflisten"
msgid "[<channel>[,<channel>...]] [<server>] [-re <regex>]"
msgstr "[<channel>[,<channel>...]] [<server>] [-re <regex>]"
+#, fuzzy
msgid ""
"channel: channel to list\n"
" server: server name\n"
-" regex: regular expression used to filter results\n"
+" regex: regular expression used to filter results (case insensitive, can "
+"start by \"(?-i)\" to become case sensitive)\n"
"\n"
"Examples:\n"
" list all channels on server (can be very slow on large networks):\n"
@@ -5941,6 +5955,36 @@ msgid "hide password displayed by nickserv"
msgstr "Von NickServ angezeigte Passwörter verstecken"
msgid ""
+"comma separated list of words to highlight in server buffers (case "
+"insensitive, use \"(?-i)\" at beginning of words to make them case "
+"sensitive; special variables $nick, $channel and $server are replaced by "
+"their value), these words are added to buffer local variable "
+"\"highlight_words\" only when buffer is created (it does not affect current "
+"buffers), an empty string disables default highlight on nick, examples: "
+"\"$nick\", \"(?-i)$nick\""
+msgstr ""
+
+msgid ""
+"comma separated list of words to highlight in channel buffers (case "
+"insensitive, use \"(?-i)\" at beginning of words to make them case "
+"sensitive; special variables $nick, $channel and $server are replaced by "
+"their value), these words are added to buffer local variable "
+"\"highlight_words\" only when buffer is created (it does not affect current "
+"buffers), an empty string disables default highlight on nick, examples: "
+"\"$nick\", \"(?-i)$nick\""
+msgstr ""
+
+msgid ""
+"comma separated list of words to highlight in private buffers (case "
+"insensitive, use \"(?-i)\" at beginning of words to make them case "
+"sensitive; special variables $nick, $channel and $server are replaced by "
+"their value), these words are added to buffer local variable "
+"\"highlight_words\" only when buffer is created (it does not affect current "
+"buffers), an empty string disables default highlight on nick, examples: "
+"\"$nick\", \"(?-i)$nick\""
+msgstr ""
+
+msgid ""
"comma separated list of tags for messages that may produce highlight "
"(usually any message from another user, not server messages,..)"
msgstr ""
@@ -7774,8 +7818,10 @@ msgstr "Textfarbe für Status: \"Authentifizierung gescheitert\""
msgid "text color for \"disconnected\" status"
msgstr "Textfarbe für Status: \"Verbindung getrennt\""
+#, fuzzy
msgid ""
-"regular expression with IPs allowed to use relay, example: \"^(123.45.67.89|"
+"regular expression with IPs allowed to use relay (case insensitive, use \"(?-"
+"i)\" at beginning to make it case sensitive), example: \"^(123.45.67.89|"
"192.160.*)$\""
msgstr ""
"regulärer Ausdruck für IP Adressen die auf das Relay zugreifen dürfen, "
@@ -7920,6 +7966,7 @@ msgstr ""
"list|listdefault || add <name> <modifiers> <groups> <regex> || del <name>|-"
"all [<name>...] || default -yes"
+#, fuzzy
msgid ""
" list: list all rmodifiers\n"
"listdefault: list default rmodifiers\n"
@@ -7928,7 +7975,8 @@ msgid ""
" modifiers: comma separated list of modifiers\n"
" groups: action on groups found: comma separated list of groups (from 1 "
"to 9) with optional \"*\" after number to hide group\n"
-" regex: regular expression\n"
+" regex: regular expression (case insensitive, can start by \"(?-i)\" to "
+"become case sensitive)\n"
" del: delete a rmodifier\n"
" -all: delete all rmodifiers\n"
" default: restore default rmodifiers\n"
diff --git a/po/es.po b/po/es.po
index fde4e53d0..4046f77e5 100644
--- a/po/es.po
+++ b/po/es.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2012-01-15 09:29+0100\n"
+"POT-Creation-Date: 2012-01-22 13:38+0100\n"
"PO-Revision-Date: 2011-12-25 22:56+0100\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1234,6 +1234,8 @@ msgid ""
"'\\!' to start with '!')\n"
" - two regular expressions are created: one for prefix and one for "
"message\n"
+" - regex are case insensitive, they can start by \"(?-i)\" to become "
+"case sensitive\n"
"\n"
"The default key alt+'=' toggles filtering on/off.\n"
"\n"
@@ -2480,19 +2482,24 @@ msgstr ""
"opción está desactivada por defecto porque puede causar serios errores de "
"visualización)"
+#, fuzzy
msgid ""
-"comma separated list of words to highlight (case insensitive comparison, "
-"words may begin or end with \"*\" for partial match)"
+"comma separated list of words to highlight; case insensitive comparison (use "
+"\"(?-i)\" at beginning of words to make them case sensitive), words may "
+"begin or end with \"*\" for partial match; example: \"test,(?-i)*toto*,flash*"
+"\""
msgstr ""
"lista separada por comas de palabras a resaltar (comparación insensible a "
"mayúsculas, las palabras pueden empezar o terminar con \"*\" para una "
"concordancia parcial)"
+#, fuzzy
msgid ""
"regular expression used to check if a message has highlight or not, at least "
"one match in string must be surrounded by word chars (alphanumeric, \"-\", "
-"\"_\" or \"|\"), regular expression is case sensitive, example: \"FlashCode|"
-"flashy\""
+"\"_\" or \"|\"), regular expression is case insensitive (use \"(?-i)\" at "
+"beginning to make it case sensitive), examples: \"flashcode|flashy\", \"(?-i)"
+"FlashCode|flashy\""
msgstr ""
"expresión regular usada para ver si un mensaje tiene un resalte o no, al "
"menos una coincidencia en el texto debe estar rodeado por letras "
@@ -4522,6 +4529,7 @@ msgstr "ignorar apodos/hosts en servidores o canales"
msgid "list || add [re:]<nick> [<server> [<channel>]] || del <number>|-all"
msgstr "list || add [re:]<apodo> [<servidor> [<canal>]] || del <número>|-all"
+#, fuzzy
msgid ""
" list: list all ignores\n"
" add: add an ignore\n"
@@ -4533,6 +4541,9 @@ msgid ""
" server: internal server name where ignore is working\n"
" channel: channel name where ignore is working\n"
"\n"
+"Note: the regular expression can start with \"(?-i)\" to become case "
+"sensitive.\n"
+"\n"
"Examples:\n"
" ignore nick \"toto\" everywhere:\n"
" /ignore add toto\n"
@@ -4683,10 +4694,12 @@ msgstr "lista canales y sus temas"
msgid "[<channel>[,<channel>...]] [<server>] [-re <regex>]"
msgstr "[<canal>[,<canal>...]] [<servidor>] [-re <regex>]"
+#, fuzzy
msgid ""
"channel: channel to list\n"
" server: server name\n"
-" regex: regular expression used to filter results\n"
+" regex: regular expression used to filter results (case insensitive, can "
+"start by \"(?-i)\" to become case sensitive)\n"
"\n"
"Examples:\n"
" list all channels on server (can be very slow on large networks):\n"
@@ -5758,6 +5771,36 @@ msgid "hide password displayed by nickserv"
msgstr "ocultar contraseña mostrada por nickserv"
msgid ""
+"comma separated list of words to highlight in server buffers (case "
+"insensitive, use \"(?-i)\" at beginning of words to make them case "
+"sensitive; special variables $nick, $channel and $server are replaced by "
+"their value), these words are added to buffer local variable "
+"\"highlight_words\" only when buffer is created (it does not affect current "
+"buffers), an empty string disables default highlight on nick, examples: "
+"\"$nick\", \"(?-i)$nick\""
+msgstr ""
+
+msgid ""
+"comma separated list of words to highlight in channel buffers (case "
+"insensitive, use \"(?-i)\" at beginning of words to make them case "
+"sensitive; special variables $nick, $channel and $server are replaced by "
+"their value), these words are added to buffer local variable "
+"\"highlight_words\" only when buffer is created (it does not affect current "
+"buffers), an empty string disables default highlight on nick, examples: "
+"\"$nick\", \"(?-i)$nick\""
+msgstr ""
+
+msgid ""
+"comma separated list of words to highlight in private buffers (case "
+"insensitive, use \"(?-i)\" at beginning of words to make them case "
+"sensitive; special variables $nick, $channel and $server are replaced by "
+"their value), these words are added to buffer local variable "
+"\"highlight_words\" only when buffer is created (it does not affect current "
+"buffers), an empty string disables default highlight on nick, examples: "
+"\"$nick\", \"(?-i)$nick\""
+msgstr ""
+
+msgid ""
"comma separated list of tags for messages that may produce highlight "
"(usually any message from another user, not server messages,..)"
msgstr ""
@@ -7545,7 +7588,8 @@ msgid "text color for \"disconnected\" status"
msgstr "color para el estado \"desconectado\""
msgid ""
-"regular expression with IPs allowed to use relay, example: \"^(123.45.67.89|"
+"regular expression with IPs allowed to use relay (case insensitive, use \"(?-"
+"i)\" at beginning to make it case sensitive), example: \"^(123.45.67.89|"
"192.160.*)$\""
msgstr ""
@@ -7685,6 +7729,7 @@ msgstr ""
"list|listdefault || add <nombre> <modificadores> <grupos> <regex> || del "
"<nombre>|-all [<nombre>...] || default -yes"
+#, fuzzy
msgid ""
" list: list all rmodifiers\n"
"listdefault: list default rmodifiers\n"
@@ -7693,7 +7738,8 @@ msgid ""
" modifiers: comma separated list of modifiers\n"
" groups: action on groups found: comma separated list of groups (from 1 "
"to 9) with optional \"*\" after number to hide group\n"
-" regex: regular expression\n"
+" regex: regular expression (case insensitive, can start by \"(?-i)\" to "
+"become case sensitive)\n"
" del: delete a rmodifier\n"
" -all: delete all rmodifiers\n"
" default: restore default rmodifiers\n"
diff --git a/po/fr.po b/po/fr.po
index 8f265d602..a90481379 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2012-01-18 13:19+0100\n"
-"PO-Revision-Date: 2012-01-18 22:16+0100\n"
+"POT-Creation-Date: 2012-01-22 13:38+0100\n"
+"PO-Revision-Date: 2012-01-22 12:59+0100\n"
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: French\n"
@@ -1234,6 +1234,8 @@ msgid ""
"'\\!' to start with '!')\n"
" - two regular expressions are created: one for prefix and one for "
"message\n"
+" - regex are case insensitive, they can start by \"(?-i)\" to become "
+"case sensitive\n"
"\n"
"The default key alt+'=' toggles filtering on/off.\n"
"\n"
@@ -1286,6 +1288,8 @@ msgstr ""
"inversé (utiliser '\\!' pour démarrer par '!')\n"
" - deux expressions régulières sont créées: une pour le préfixe et "
"une pour le message\n"
+" - les expressions régulières sont insensibles à la casse, elles "
+"peuvent commencer par \"(?-i)\" pour devenir sensibles à la casse\n"
"\n"
"La touche par défaut alt+'=' active/désactive le filtrage.\n"
"\n"
@@ -2484,23 +2488,29 @@ msgstr ""
"causer de sérieux problèmes d'affichages)"
msgid ""
-"comma separated list of words to highlight (case insensitive comparison, "
-"words may begin or end with \"*\" for partial match)"
+"comma separated list of words to highlight; case insensitive comparison (use "
+"\"(?-i)\" at beginning of words to make them case sensitive), words may "
+"begin or end with \"*\" for partial match; example: \"test,(?-i)*toto*,flash*"
+"\""
msgstr ""
-"liste des mots pour la notification (séparés par des virgules, la "
-"comparaison ne tient pas compte de la casse, les mots peuvent commencer ou "
-"se terminer par \"*\" pour une comparaison partielle)"
+"liste des mots pour la notification séparés par des virgules; la comparaison "
+"est insensible à la casse (utilisez \"(?-i)\" au début des mots pour les "
+"rendre sensibles à la casse), les mots peuvent commencer ou se terminer par "
+"\"*\" pour une comparaison partielle; exemple: \"test,(?-i)*toto*,flash*\""
msgid ""
"regular expression used to check if a message has highlight or not, at least "
"one match in string must be surrounded by word chars (alphanumeric, \"-\", "
-"\"_\" or \"|\"), regular expression is case sensitive, example: \"FlashCode|"
-"flashy\""
+"\"_\" or \"|\"), regular expression is case insensitive (use \"(?-i)\" at "
+"beginning to make it case sensitive), examples: \"flashcode|flashy\", \"(?-i)"
+"FlashCode|flashy\""
msgstr ""
"expression régulière utilisée pour vérifier si un message a un \"highlight\" "
"ou non, au moins une correspondance dans la chaîne doit être entourée de "
"caractères de mot (alpha-numérique, \"-\", \"_\" ou \"|\"), l'expression "
-"régulière est sensible à la casse, exemple: \"FlashCode|flashy\""
+"régulière est insensible à la casse (utilisez \"(?-i)\" au début pour la "
+"rendre sensible à la casse), exemples: \"flashcode|flashy\", \"(?-i)"
+"FlashCode|flashy\""
msgid ""
"comma separated list of tags to highlight (case insensitive comparison, "
@@ -4581,6 +4591,9 @@ msgid ""
" server: internal server name where ignore is working\n"
" channel: channel name where ignore is working\n"
"\n"
+"Note: the regular expression can start with \"(?-i)\" to become case "
+"sensitive.\n"
+"\n"
"Examples:\n"
" ignore nick \"toto\" everywhere:\n"
" /ignore add toto\n"
@@ -4601,6 +4614,9 @@ msgstr ""
" serveur: nom de serveur interne où le ignore fonctionnera\n"
" canal: canal où le ignore fonctionnera\n"
"\n"
+"Note: l'expression régulière peut commencer par \"(?-i)\" pour devenir "
+"sensible à la casse.\n"
+"\n"
"Exemples:\n"
" ignorer le pseudo \"toto\" partout:\n"
" /ignore add toto\n"
@@ -4735,7 +4751,8 @@ msgstr "[<canal>[,<canal>...]] [<serveur>] [-re <regex>]"
msgid ""
"channel: channel to list\n"
" server: server name\n"
-" regex: regular expression used to filter results\n"
+" regex: regular expression used to filter results (case insensitive, can "
+"start by \"(?-i)\" to become case sensitive)\n"
"\n"
"Examples:\n"
" list all channels on server (can be very slow on large networks):\n"
@@ -4748,7 +4765,9 @@ msgid ""
msgstr ""
" canal: canal à lister\n"
"serveur: nom du serveur\n"
-" regex: expression régulière utilisée pour filtrer les résultats\n"
+" regex: expression régulière utilisée pour filtrer les résultats "
+"(insensible à la casse, peut commencer par \"(?-i)\" pour devenir sensible à "
+"la casse)\n"
"\n"
"Exemples:\n"
" lister tous les canaux du serveur (peut être très lent pour les grands "
@@ -5811,6 +5830,60 @@ msgid "hide password displayed by nickserv"
msgstr "masquer le mot de passe affiché par nickserv"
msgid ""
+"comma separated list of words to highlight in server buffers (case "
+"insensitive, use \"(?-i)\" at beginning of words to make them case "
+"sensitive; special variables $nick, $channel and $server are replaced by "
+"their value), these words are added to buffer local variable "
+"\"highlight_words\" only when buffer is created (it does not affect current "
+"buffers), an empty string disables default highlight on nick, examples: "
+"\"$nick\", \"(?-i)$nick\""
+msgstr ""
+"liste de mots pour le highlight dans les tampons de type \"serveur\", "
+"séparés par des virgules (insensible à la casse, utilisez \"(?-i)\" au début "
+"des mots pour les rendre sensibles à la casse; les variables spéciales "
+"$nick, $channel et $server sont remplacées par leurs valeurs), ces mots sont "
+"ajoutés à la variable locale du tampon \"highlight_words\" seulement lorsque "
+"le tampon est créé (cela n'affecte pas les tampons courants), une chaîne "
+"vide désactive le highlight par défaut sur le pseudo, exemples: \"$nick\", "
+"\"(?-i)$nick\""
+
+msgid ""
+"comma separated list of words to highlight in channel buffers (case "
+"insensitive, use \"(?-i)\" at beginning of words to make them case "
+"sensitive; special variables $nick, $channel and $server are replaced by "
+"their value), these words are added to buffer local variable "
+"\"highlight_words\" only when buffer is created (it does not affect current "
+"buffers), an empty string disables default highlight on nick, examples: "
+"\"$nick\", \"(?-i)$nick\""
+msgstr ""
+"liste de mots pour le highlight dans les tampons de type \"canal\", séparés "
+"par des virgules (insensible à la casse, utilisez \"(?-i)\" au début des "
+"mots pour les rendre sensibles à la casse; les variables spéciales $nick, "
+"$channel et $server sont remplacées par leurs valeurs), ces mots sont "
+"ajoutés à la variable locale du tampon \"highlight_words\" seulement lorsque "
+"le tampon est créé (cela n'affecte pas les tampons courants), une chaîne "
+"vide désactive le highlight par défaut sur le pseudo, exemples: \"$nick\", "
+"\"(?-i)$nick\""
+
+msgid ""
+"comma separated list of words to highlight in private buffers (case "
+"insensitive, use \"(?-i)\" at beginning of words to make them case "
+"sensitive; special variables $nick, $channel and $server are replaced by "
+"their value), these words are added to buffer local variable "
+"\"highlight_words\" only when buffer is created (it does not affect current "
+"buffers), an empty string disables default highlight on nick, examples: "
+"\"$nick\", \"(?-i)$nick\""
+msgstr ""
+"liste de mots pour le highlight dans les tampons de type \"privé\", séparés "
+"par des virgules (insensible à la casse, utilisez \"(?-i)\" au début des "
+"mots pour les rendre sensibles à la casse; les variables spéciales $nick, "
+"$channel et $server sont remplacées par leurs valeurs), ces mots sont "
+"ajoutés à la variable locale du tampon \"highlight_words\" seulement lorsque "
+"le tampon est créé (cela n'affecte pas les tampons courants), une chaîne "
+"vide désactive le highlight par défaut sur le pseudo, exemples: \"$nick\", "
+"\"(?-i)$nick\""
+
+msgid ""
"comma separated list of tags for messages that may produce highlight "
"(usually any message from another user, not server messages,..)"
msgstr ""
@@ -7605,11 +7678,13 @@ msgid "text color for \"disconnected\" status"
msgstr "couleur du texte pour le statut \"déconnecté\""
msgid ""
-"regular expression with IPs allowed to use relay, example: \"^(123.45.67.89|"
+"regular expression with IPs allowed to use relay (case insensitive, use \"(?-"
+"i)\" at beginning to make it case sensitive), example: \"^(123.45.67.89|"
"192.160.*)$\""
msgstr ""
-"expression régulière avec les IPs autorisées pour le relai, par exemple: \"^"
-"(123.45.67.89|192.160.*)$\""
+"expression régulière avec les IPs autorisées pour le relai (insensible à la "
+"casse, utilisez \"(?-i)\" en début de chaîne pour la rendre sensible à la "
+"casse), exemple: \"^(123.45.67.89|192.160.*)$\""
msgid ""
"address for bind (if empty, connection is possible on all interfaces, use "
@@ -7756,7 +7831,8 @@ msgid ""
" modifiers: comma separated list of modifiers\n"
" groups: action on groups found: comma separated list of groups (from 1 "
"to 9) with optional \"*\" after number to hide group\n"
-" regex: regular expression\n"
+" regex: regular expression (case insensitive, can start by \"(?-i)\" to "
+"become case sensitive)\n"
" del: delete a rmodifier\n"
" -all: delete all rmodifiers\n"
" default: restore default rmodifiers\n"
@@ -7777,7 +7853,8 @@ msgstr ""
" groupes: action sur les groupes trouvés: liste de groupes (séparés par "
"une virgule) (de 1 à 9) avec en option \"*\" après le nombre pour cacher le "
"groupe\n"
-" regex: expression régulière\n"
+" regex: expression régulière (insensible à la casse, peut commencer par "
+"\"(?-i)\" pour devenir sensible à la casse)\n"
" del: supprimer un rmodifier\n"
" -all: supprimer tous les rmodifiers\n"
" default: restaurer les rmodifiers par défaut\n"
diff --git a/po/hu.po b/po/hu.po
index 5e3346828..102ec2227 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2012-01-15 09:29+0100\n"
+"POT-Creation-Date: 2012-01-22 13:38+0100\n"
"PO-Revision-Date: 2011-12-25 22:56+0100\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1144,6 +1144,8 @@ msgid ""
"'\\!' to start with '!')\n"
" - two regular expressions are created: one for prefix and one for "
"message\n"
+" - regex are case insensitive, they can start by \"(?-i)\" to become "
+"case sensitive\n"
"\n"
"The default key alt+'=' toggles filtering on/off.\n"
"\n"
@@ -2021,9 +2023,12 @@ msgid ""
"because it can cause serious display bugs)"
msgstr ""
+#, fuzzy
msgid ""
-"comma separated list of words to highlight (case insensitive comparison, "
-"words may begin or end with \"*\" for partial match)"
+"comma separated list of words to highlight; case insensitive comparison (use "
+"\"(?-i)\" at beginning of words to make them case sensitive), words may "
+"begin or end with \"*\" for partial match; example: \"test,(?-i)*toto*,flash*"
+"\""
msgstr ""
"kiemelendő szavak vesszővel elválasztott listája (kis/nagybetűtől független "
"összehasonlítás, a szavak végére/elejére \"*\"-ot illesztve részleges keresés"
@@ -2031,8 +2036,9 @@ msgstr ""
msgid ""
"regular expression used to check if a message has highlight or not, at least "
"one match in string must be surrounded by word chars (alphanumeric, \"-\", "
-"\"_\" or \"|\"), regular expression is case sensitive, example: \"FlashCode|"
-"flashy\""
+"\"_\" or \"|\"), regular expression is case insensitive (use \"(?-i)\" at "
+"beginning to make it case sensitive), examples: \"flashcode|flashy\", \"(?-i)"
+"FlashCode|flashy\""
msgstr ""
#, fuzzy
@@ -3964,6 +3970,9 @@ msgid ""
" server: internal server name where ignore is working\n"
" channel: channel name where ignore is working\n"
"\n"
+"Note: the regular expression can start with \"(?-i)\" to become case "
+"sensitive.\n"
+"\n"
"Examples:\n"
" ignore nick \"toto\" everywhere:\n"
" /ignore add toto\n"
@@ -4092,7 +4101,8 @@ msgstr "[szoba[,szoba] [szerver]]"
msgid ""
"channel: channel to list\n"
" server: server name\n"
-" regex: regular expression used to filter results\n"
+" regex: regular expression used to filter results (case insensitive, can "
+"start by \"(?-i)\" to become case sensitive)\n"
"\n"
"Examples:\n"
" list all channels on server (can be very slow on large networks):\n"
@@ -5164,6 +5174,36 @@ msgid "hide password displayed by nickserv"
msgstr "a nickserv által mutatott jelszó elrejtése"
msgid ""
+"comma separated list of words to highlight in server buffers (case "
+"insensitive, use \"(?-i)\" at beginning of words to make them case "
+"sensitive; special variables $nick, $channel and $server are replaced by "
+"their value), these words are added to buffer local variable "
+"\"highlight_words\" only when buffer is created (it does not affect current "
+"buffers), an empty string disables default highlight on nick, examples: "
+"\"$nick\", \"(?-i)$nick\""
+msgstr ""
+
+msgid ""
+"comma separated list of words to highlight in channel buffers (case "
+"insensitive, use \"(?-i)\" at beginning of words to make them case "
+"sensitive; special variables $nick, $channel and $server are replaced by "
+"their value), these words are added to buffer local variable "
+"\"highlight_words\" only when buffer is created (it does not affect current "
+"buffers), an empty string disables default highlight on nick, examples: "
+"\"$nick\", \"(?-i)$nick\""
+msgstr ""
+
+msgid ""
+"comma separated list of words to highlight in private buffers (case "
+"insensitive, use \"(?-i)\" at beginning of words to make them case "
+"sensitive; special variables $nick, $channel and $server are replaced by "
+"their value), these words are added to buffer local variable "
+"\"highlight_words\" only when buffer is created (it does not affect current "
+"buffers), an empty string disables default highlight on nick, examples: "
+"\"$nick\", \"(?-i)$nick\""
+msgstr ""
+
+msgid ""
"comma separated list of tags for messages that may produce highlight "
"(usually any message from another user, not server messages,..)"
msgstr ""
@@ -6878,7 +6918,8 @@ msgid "text color for \"disconnected\" status"
msgstr "\"connecting\" dcc státusz színe"
msgid ""
-"regular expression with IPs allowed to use relay, example: \"^(123.45.67.89|"
+"regular expression with IPs allowed to use relay (case insensitive, use \"(?-"
+"i)\" at beginning to make it case sensitive), example: \"^(123.45.67.89|"
"192.160.*)$\""
msgstr ""
@@ -7022,7 +7063,8 @@ msgid ""
" modifiers: comma separated list of modifiers\n"
" groups: action on groups found: comma separated list of groups (from 1 "
"to 9) with optional \"*\" after number to hide group\n"
-" regex: regular expression\n"
+" regex: regular expression (case insensitive, can start by \"(?-i)\" to "
+"become case sensitive)\n"
" del: delete a rmodifier\n"
" -all: delete all rmodifiers\n"
" default: restore default rmodifiers\n"
diff --git a/po/it.po b/po/it.po
index fa3171386..cb323508b 100644
--- a/po/it.po
+++ b/po/it.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2012-01-15 09:29+0100\n"
+"POT-Creation-Date: 2012-01-22 13:38+0100\n"
"PO-Revision-Date: 2012-01-16 22:07+0100\n"
"Last-Translator: Marco Paolone <marcopaolone@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1199,6 +1199,7 @@ msgstr ""
"list || enable|disable|toggle [<nome>] || add <nome> <buffer>[,<buffer>...] "
"<tag> <regex>] || del <nome>|-all"
+#, fuzzy
msgid ""
" list: list all filters\n"
" enable: enable filters (filters are enabled by default)\n"
@@ -1223,6 +1224,8 @@ msgid ""
"'\\!' to start with '!')\n"
" - two regular expressions are created: one for prefix and one for "
"message\n"
+" - regex are case insensitive, they can start by \"(?-i)\" to become "
+"case sensitive\n"
"\n"
"The default key alt+'=' toggles filtering on/off.\n"
"\n"
@@ -2468,19 +2471,24 @@ msgstr ""
"applicazione (l'opzione è disabilitata per default, dato che può causare "
"seri errori di visualizzazione)"
+#, fuzzy
msgid ""
-"comma separated list of words to highlight (case insensitive comparison, "
-"words may begin or end with \"*\" for partial match)"
+"comma separated list of words to highlight; case insensitive comparison (use "
+"\"(?-i)\" at beginning of words to make them case sensitive), words may "
+"begin or end with \"*\" for partial match; example: \"test,(?-i)*toto*,flash*"
+"\""
msgstr ""
"elenco separato da virgole di finestre da evidenziare (maiuscole/minuscole, "
"le parole potrebbero cominciare o terminare con \"*\" per un riscontro "
"parziale)"
+#, fuzzy
msgid ""
"regular expression used to check if a message has highlight or not, at least "
"one match in string must be surrounded by word chars (alphanumeric, \"-\", "
-"\"_\" or \"|\"), regular expression is case sensitive, example: \"FlashCode|"
-"flashy\""
+"\"_\" or \"|\"), regular expression is case insensitive (use \"(?-i)\" at "
+"beginning to make it case sensitive), examples: \"flashcode|flashy\", \"(?-i)"
+"FlashCode|flashy\""
msgstr ""
"l'espressione regolare usata per verificare se un messaggio contiene un "
"evento oppure no, almeno una corrispondenza nella stringa deve essere "
@@ -4524,6 +4532,7 @@ msgstr "ignora nick/host dai server o dai canali"
msgid "list || add [re:]<nick> [<server> [<channel>]] || del <number>|-all"
msgstr "list || add [re:]<nick> [<server> [<canale>]] || del <numero>|-all"
+#, fuzzy
msgid ""
" list: list all ignores\n"
" add: add an ignore\n"
@@ -4535,6 +4544,9 @@ msgid ""
" server: internal server name where ignore is working\n"
" channel: channel name where ignore is working\n"
"\n"
+"Note: the regular expression can start with \"(?-i)\" to become case "
+"sensitive.\n"
+"\n"
"Examples:\n"
" ignore nick \"toto\" everywhere:\n"
" /ignore add toto\n"
@@ -4685,10 +4697,12 @@ msgstr "elenca i canali ed i loro argomenti"
msgid "[<channel>[,<channel>...]] [<server>] [-re <regex>]"
msgstr "[<canale>[,<canale>...]] [<server>] [-re <regexp>]"
+#, fuzzy
msgid ""
"channel: channel to list\n"
" server: server name\n"
-" regex: regular expression used to filter results\n"
+" regex: regular expression used to filter results (case insensitive, can "
+"start by \"(?-i)\" to become case sensitive)\n"
"\n"
"Examples:\n"
" list all channels on server (can be very slow on large networks):\n"
@@ -5750,6 +5764,36 @@ msgid "hide password displayed by nickserv"
msgstr "nascondi password visualizzata da nickserv"
msgid ""
+"comma separated list of words to highlight in server buffers (case "
+"insensitive, use \"(?-i)\" at beginning of words to make them case "
+"sensitive; special variables $nick, $channel and $server are replaced by "
+"their value), these words are added to buffer local variable "
+"\"highlight_words\" only when buffer is created (it does not affect current "
+"buffers), an empty string disables default highlight on nick, examples: "
+"\"$nick\", \"(?-i)$nick\""
+msgstr ""
+
+msgid ""
+"comma separated list of words to highlight in channel buffers (case "
+"insensitive, use \"(?-i)\" at beginning of words to make them case "
+"sensitive; special variables $nick, $channel and $server are replaced by "
+"their value), these words are added to buffer local variable "
+"\"highlight_words\" only when buffer is created (it does not affect current "
+"buffers), an empty string disables default highlight on nick, examples: "
+"\"$nick\", \"(?-i)$nick\""
+msgstr ""
+
+msgid ""
+"comma separated list of words to highlight in private buffers (case "
+"insensitive, use \"(?-i)\" at beginning of words to make them case "
+"sensitive; special variables $nick, $channel and $server are replaced by "
+"their value), these words are added to buffer local variable "
+"\"highlight_words\" only when buffer is created (it does not affect current "
+"buffers), an empty string disables default highlight on nick, examples: "
+"\"$nick\", \"(?-i)$nick\""
+msgstr ""
+
+msgid ""
"comma separated list of tags for messages that may produce highlight "
"(usually any message from another user, not server messages,..)"
msgstr ""
@@ -7539,8 +7583,10 @@ msgstr "colore del testo per lo status \"autenticazione fallita\""
msgid "text color for \"disconnected\" status"
msgstr "colore del testo per lo status \"disconnesso\""
+#, fuzzy
msgid ""
-"regular expression with IPs allowed to use relay, example: \"^(123.45.67.89|"
+"regular expression with IPs allowed to use relay (case insensitive, use \"(?-"
+"i)\" at beginning to make it case sensitive), example: \"^(123.45.67.89|"
"192.160.*)$\""
msgstr ""
"espressione regolare con gli indirizzi IP a cui è consentito usare il relay, "
@@ -7683,6 +7729,7 @@ msgstr ""
"list|listdefault || add <nome> <modifier> <gruppi> <regex> || del <nome>|-"
"all [<nome>...] || default -yes"
+#, fuzzy
msgid ""
" list: list all rmodifiers\n"
"listdefault: list default rmodifiers\n"
@@ -7691,7 +7738,8 @@ msgid ""
" modifiers: comma separated list of modifiers\n"
" groups: action on groups found: comma separated list of groups (from 1 "
"to 9) with optional \"*\" after number to hide group\n"
-" regex: regular expression\n"
+" regex: regular expression (case insensitive, can start by \"(?-i)\" to "
+"become case sensitive)\n"
" del: delete a rmodifier\n"
" -all: delete all rmodifiers\n"
" default: restore default rmodifiers\n"
diff --git a/po/pl.po b/po/pl.po
index 5006689bd..e0780f1d9 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2012-01-15 09:29+0100\n"
+"POT-Creation-Date: 2012-01-22 13:38+0100\n"
"PO-Revision-Date: 2011-12-25 22:56+0100\n"
"Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1239,6 +1239,8 @@ msgid ""
"'\\!' to start with '!')\n"
" - two regular expressions are created: one for prefix and one for "
"message\n"
+" - regex are case insensitive, they can start by \"(?-i)\" to become "
+"case sensitive\n"
"\n"
"The default key alt+'=' toggles filtering on/off.\n"
"\n"
@@ -2482,19 +2484,24 @@ msgstr ""
"aplikacji (domyślnie ta opcja jest wyłączona, ponieważ może spowodować "
"poważne błędy wyświetlania)"
+#, fuzzy
msgid ""
-"comma separated list of words to highlight (case insensitive comparison, "
-"words may begin or end with \"*\" for partial match)"
+"comma separated list of words to highlight; case insensitive comparison (use "
+"\"(?-i)\" at beginning of words to make them case sensitive), words may "
+"begin or end with \"*\" for partial match; example: \"test,(?-i)*toto*,flash*"
+"\""
msgstr ""
"lista słów do podświetlania oddzielona przecinkami (porównanie wrażliwe na "
"wielkość znaków, słowa mogą się zaczynać lub kończyć \"*\" dla częściowego "
"dopasowania)"
+#, fuzzy
msgid ""
"regular expression used to check if a message has highlight or not, at least "
"one match in string must be surrounded by word chars (alphanumeric, \"-\", "
-"\"_\" or \"|\"), regular expression is case sensitive, example: \"FlashCode|"
-"flashy\""
+"\"_\" or \"|\"), regular expression is case insensitive (use \"(?-i)\" at "
+"beginning to make it case sensitive), examples: \"flashcode|flashy\", \"(?-i)"
+"FlashCode|flashy\""
msgstr ""
"wyrażenie regularne używane do sprawdzenia, czy wiadomość posiada "
"podświetlenie czy nie, przynajmniej jeden dopasowany ciąg musi być otoczony "
@@ -4499,6 +4506,7 @@ msgstr "ignoruje nicki/hosty z serwera lub kanałów"
msgid "list || add [re:]<nick> [<server> [<channel>]] || del <number>|-all"
msgstr "list || add [re:]<nick> [<serwer> [<kanał>]] || del <numer>|-all"
+#, fuzzy
msgid ""
" list: list all ignores\n"
" add: add an ignore\n"
@@ -4510,6 +4518,9 @@ msgid ""
" server: internal server name where ignore is working\n"
" channel: channel name where ignore is working\n"
"\n"
+"Note: the regular expression can start with \"(?-i)\" to become case "
+"sensitive.\n"
+"\n"
"Examples:\n"
" ignore nick \"toto\" everywhere:\n"
" /ignore add toto\n"
@@ -4660,10 +4671,12 @@ msgstr "wyświetla kanały i ich tematy"
msgid "[<channel>[,<channel>...]] [<server>] [-re <regex>]"
msgstr "[<kanał>[,<kanał>...]] [<serwer>] [-re <regex>]"
+#, fuzzy
msgid ""
"channel: channel to list\n"
" server: server name\n"
-" regex: regular expression used to filter results\n"
+" regex: regular expression used to filter results (case insensitive, can "
+"start by \"(?-i)\" to become case sensitive)\n"
"\n"
"Examples:\n"
" list all channels on server (can be very slow on large networks):\n"
@@ -5723,6 +5736,36 @@ msgid "hide password displayed by nickserv"
msgstr "ukryj hasło wyświetlane przez nickserv"
msgid ""
+"comma separated list of words to highlight in server buffers (case "
+"insensitive, use \"(?-i)\" at beginning of words to make them case "
+"sensitive; special variables $nick, $channel and $server are replaced by "
+"their value), these words are added to buffer local variable "
+"\"highlight_words\" only when buffer is created (it does not affect current "
+"buffers), an empty string disables default highlight on nick, examples: "
+"\"$nick\", \"(?-i)$nick\""
+msgstr ""
+
+msgid ""
+"comma separated list of words to highlight in channel buffers (case "
+"insensitive, use \"(?-i)\" at beginning of words to make them case "
+"sensitive; special variables $nick, $channel and $server are replaced by "
+"their value), these words are added to buffer local variable "
+"\"highlight_words\" only when buffer is created (it does not affect current "
+"buffers), an empty string disables default highlight on nick, examples: "
+"\"$nick\", \"(?-i)$nick\""
+msgstr ""
+
+msgid ""
+"comma separated list of words to highlight in private buffers (case "
+"insensitive, use \"(?-i)\" at beginning of words to make them case "
+"sensitive; special variables $nick, $channel and $server are replaced by "
+"their value), these words are added to buffer local variable "
+"\"highlight_words\" only when buffer is created (it does not affect current "
+"buffers), an empty string disables default highlight on nick, examples: "
+"\"$nick\", \"(?-i)$nick\""
+msgstr ""
+
+msgid ""
"comma separated list of tags for messages that may produce highlight "
"(usually any message from another user, not server messages,..)"
msgstr ""
@@ -7474,7 +7517,8 @@ msgid "text color for \"disconnected\" status"
msgstr "kolor statusu \"disconnected\""
msgid ""
-"regular expression with IPs allowed to use relay, example: \"^(123.45.67.89|"
+"regular expression with IPs allowed to use relay (case insensitive, use \"(?-"
+"i)\" at beginning to make it case sensitive), example: \"^(123.45.67.89|"
"192.160.*)$\""
msgstr ""
@@ -7612,6 +7656,7 @@ msgstr ""
"list|listdefault || add <nazwa> <modyfikatory> <grupy> <regex> || del "
"<nazwa>|-all [<nazwa>...] || default -yes"
+#, fuzzy
msgid ""
" list: list all rmodifiers\n"
"listdefault: list default rmodifiers\n"
@@ -7620,7 +7665,8 @@ msgid ""
" modifiers: comma separated list of modifiers\n"
" groups: action on groups found: comma separated list of groups (from 1 "
"to 9) with optional \"*\" after number to hide group\n"
-" regex: regular expression\n"
+" regex: regular expression (case insensitive, can start by \"(?-i)\" to "
+"become case sensitive)\n"
" del: delete a rmodifier\n"
" -all: delete all rmodifiers\n"
" default: restore default rmodifiers\n"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 49ceb5535..c00ad272c 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2012-01-15 09:29+0100\n"
+"POT-Creation-Date: 2012-01-22 13:38+0100\n"
"PO-Revision-Date: 2011-12-25 22:56+0100\n"
"Last-Translator: Sergio Durigan Junior <sergiosdj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1249,6 +1249,7 @@ msgstr ""
"list || enable|disable|toggle [<nome>] || add <nome> <buffer>[,<buffer>...] "
"<tags> <regex> || del <nome>|-all"
+#, fuzzy
msgid ""
" list: list all filters\n"
" enable: enable filters (filters are enabled by default)\n"
@@ -1273,6 +1274,8 @@ msgid ""
"'\\!' to start with '!')\n"
" - two regular expressions are created: one for prefix and one for "
"message\n"
+" - regex are case insensitive, they can start by \"(?-i)\" to become "
+"case sensitive\n"
"\n"
"The default key alt+'=' toggles filtering on/off.\n"
"\n"
@@ -2418,19 +2421,24 @@ msgstr ""
"(esta opção é desabilitada por padrão porque pode causar sérios problemas de "
"visualização"
+#, fuzzy
msgid ""
-"comma separated list of words to highlight (case insensitive comparison, "
-"words may begin or end with \"*\" for partial match)"
+"comma separated list of words to highlight; case insensitive comparison (use "
+"\"(?-i)\" at beginning of words to make them case sensitive), words may "
+"begin or end with \"*\" for partial match; example: \"test,(?-i)*toto*,flash*"
+"\""
msgstr ""
"lista separada por vírgulas de palavras a serem destacadas (comparação sem "
"levar em conta maiúscula/minúscula, palavras podem começar ou terminar com "
"\"*\" para coincidências parciais)"
+#, fuzzy
msgid ""
"regular expression used to check if a message has highlight or not, at least "
"one match in string must be surrounded by word chars (alphanumeric, \"-\", "
-"\"_\" or \"|\"), regular expression is case sensitive, example: \"FlashCode|"
-"flashy\""
+"\"_\" or \"|\"), regular expression is case insensitive (use \"(?-i)\" at "
+"beginning to make it case sensitive), examples: \"flashcode|flashy\", \"(?-i)"
+"FlashCode|flashy\""
msgstr ""
"expressão regular usada para verificar se a mensagem tem destaque ou não, "
"pelo menos uma correspondência na string precisa ser envolta por caracteres "
@@ -4318,6 +4326,9 @@ msgid ""
" server: internal server name where ignore is working\n"
" channel: channel name where ignore is working\n"
"\n"
+"Note: the regular expression can start with \"(?-i)\" to become case "
+"sensitive.\n"
+"\n"
"Examples:\n"
" ignore nick \"toto\" everywhere:\n"
" /ignore add toto\n"
@@ -4428,7 +4439,8 @@ msgstr "[<canal>[,<canal>...]] [<servidor>] [-re <expressão_regular>]"
msgid ""
"channel: channel to list\n"
" server: server name\n"
-" regex: regular expression used to filter results\n"
+" regex: regular expression used to filter results (case insensitive, can "
+"start by \"(?-i)\" to become case sensitive)\n"
"\n"
"Examples:\n"
" list all channels on server (can be very slow on large networks):\n"
@@ -5315,6 +5327,36 @@ msgid "hide password displayed by nickserv"
msgstr "ocultar senha exibida pelo nickserv"
msgid ""
+"comma separated list of words to highlight in server buffers (case "
+"insensitive, use \"(?-i)\" at beginning of words to make them case "
+"sensitive; special variables $nick, $channel and $server are replaced by "
+"their value), these words are added to buffer local variable "
+"\"highlight_words\" only when buffer is created (it does not affect current "
+"buffers), an empty string disables default highlight on nick, examples: "
+"\"$nick\", \"(?-i)$nick\""
+msgstr ""
+
+msgid ""
+"comma separated list of words to highlight in channel buffers (case "
+"insensitive, use \"(?-i)\" at beginning of words to make them case "
+"sensitive; special variables $nick, $channel and $server are replaced by "
+"their value), these words are added to buffer local variable "
+"\"highlight_words\" only when buffer is created (it does not affect current "
+"buffers), an empty string disables default highlight on nick, examples: "
+"\"$nick\", \"(?-i)$nick\""
+msgstr ""
+
+msgid ""
+"comma separated list of words to highlight in private buffers (case "
+"insensitive, use \"(?-i)\" at beginning of words to make them case "
+"sensitive; special variables $nick, $channel and $server are replaced by "
+"their value), these words are added to buffer local variable "
+"\"highlight_words\" only when buffer is created (it does not affect current "
+"buffers), an empty string disables default highlight on nick, examples: "
+"\"$nick\", \"(?-i)$nick\""
+msgstr ""
+
+msgid ""
"comma separated list of tags for messages that may produce highlight "
"(usually any message from another user, not server messages,..)"
msgstr ""
@@ -6994,8 +7036,10 @@ msgstr "cor do texto para o status \"autenticação falhou\""
msgid "text color for \"disconnected\" status"
msgstr "cor do texto para o status \"desconectado\""
+#, fuzzy
msgid ""
-"regular expression with IPs allowed to use relay, example: \"^(123.45.67.89|"
+"regular expression with IPs allowed to use relay (case insensitive, use \"(?-"
+"i)\" at beginning to make it case sensitive), example: \"^(123.45.67.89|"
"192.160.*)$\""
msgstr ""
"expressão regular com IPs permitidos a usar o relay, por exemplo: \"^"
@@ -7145,7 +7189,8 @@ msgid ""
" modifiers: comma separated list of modifiers\n"
" groups: action on groups found: comma separated list of groups (from 1 "
"to 9) with optional \"*\" after number to hide group\n"
-" regex: regular expression\n"
+" regex: regular expression (case insensitive, can start by \"(?-i)\" to "
+"become case sensitive)\n"
" del: delete a rmodifier\n"
" -all: delete all rmodifiers\n"
" default: restore default rmodifiers\n"
diff --git a/po/ru.po b/po/ru.po
index fc0737266..0070d22e0 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.3.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2012-01-15 09:29+0100\n"
+"POT-Creation-Date: 2012-01-22 13:38+0100\n"
"PO-Revision-Date: 2012-01-07 09:24+0100\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1162,6 +1162,8 @@ msgid ""
"'\\!' to start with '!')\n"
" - two regular expressions are created: one for prefix and one for "
"message\n"
+" - regex are case insensitive, they can start by \"(?-i)\" to become "
+"case sensitive\n"
"\n"
"The default key alt+'=' toggles filtering on/off.\n"
"\n"
@@ -2040,9 +2042,12 @@ msgid ""
"because it can cause serious display bugs)"
msgstr ""
+#, fuzzy
msgid ""
-"comma separated list of words to highlight (case insensitive comparison, "
-"words may begin or end with \"*\" for partial match)"
+"comma separated list of words to highlight; case insensitive comparison (use "
+"\"(?-i)\" at beginning of words to make them case sensitive), words may "
+"begin or end with \"*\" for partial match; example: \"test,(?-i)*toto*,flash*"
+"\""
msgstr ""
"разделённый запятыми список подсвечиваемых слов (регистр учитывается, слова "
"могут начинаться или кончаться \"*\" для неполного соответствия)"
@@ -2050,8 +2055,9 @@ msgstr ""
msgid ""
"regular expression used to check if a message has highlight or not, at least "
"one match in string must be surrounded by word chars (alphanumeric, \"-\", "
-"\"_\" or \"|\"), regular expression is case sensitive, example: \"FlashCode|"
-"flashy\""
+"\"_\" or \"|\"), regular expression is case insensitive (use \"(?-i)\" at "
+"beginning to make it case sensitive), examples: \"flashcode|flashy\", \"(?-i)"
+"FlashCode|flashy\""
msgstr ""
#, fuzzy
@@ -3993,6 +3999,9 @@ msgid ""
" server: internal server name where ignore is working\n"
" channel: channel name where ignore is working\n"
"\n"
+"Note: the regular expression can start with \"(?-i)\" to become case "
+"sensitive.\n"
+"\n"
"Examples:\n"
" ignore nick \"toto\" everywhere:\n"
" /ignore add toto\n"
@@ -4119,7 +4128,8 @@ msgstr "[канал[,канал] [сервер]]"
msgid ""
"channel: channel to list\n"
" server: server name\n"
-" regex: regular expression used to filter results\n"
+" regex: regular expression used to filter results (case insensitive, can "
+"start by \"(?-i)\" to become case sensitive)\n"
"\n"
"Examples:\n"
" list all channels on server (can be very slow on large networks):\n"
@@ -5181,6 +5191,36 @@ msgid "hide password displayed by nickserv"
msgstr "скрывать пароль, отображаемый nickserv'ом"
msgid ""
+"comma separated list of words to highlight in server buffers (case "
+"insensitive, use \"(?-i)\" at beginning of words to make them case "
+"sensitive; special variables $nick, $channel and $server are replaced by "
+"their value), these words are added to buffer local variable "
+"\"highlight_words\" only when buffer is created (it does not affect current "
+"buffers), an empty string disables default highlight on nick, examples: "
+"\"$nick\", \"(?-i)$nick\""
+msgstr ""
+
+msgid ""
+"comma separated list of words to highlight in channel buffers (case "
+"insensitive, use \"(?-i)\" at beginning of words to make them case "
+"sensitive; special variables $nick, $channel and $server are replaced by "
+"their value), these words are added to buffer local variable "
+"\"highlight_words\" only when buffer is created (it does not affect current "
+"buffers), an empty string disables default highlight on nick, examples: "
+"\"$nick\", \"(?-i)$nick\""
+msgstr ""
+
+msgid ""
+"comma separated list of words to highlight in private buffers (case "
+"insensitive, use \"(?-i)\" at beginning of words to make them case "
+"sensitive; special variables $nick, $channel and $server are replaced by "
+"their value), these words are added to buffer local variable "
+"\"highlight_words\" only when buffer is created (it does not affect current "
+"buffers), an empty string disables default highlight on nick, examples: "
+"\"$nick\", \"(?-i)$nick\""
+msgstr ""
+
+msgid ""
"comma separated list of tags for messages that may produce highlight "
"(usually any message from another user, not server messages,..)"
msgstr ""
@@ -6901,7 +6941,8 @@ msgid "text color for \"disconnected\" status"
msgstr "цвет \"соединения\" в окне DCC"
msgid ""
-"regular expression with IPs allowed to use relay, example: \"^(123.45.67.89|"
+"regular expression with IPs allowed to use relay (case insensitive, use \"(?-"
+"i)\" at beginning to make it case sensitive), example: \"^(123.45.67.89|"
"192.160.*)$\""
msgstr ""
@@ -7044,7 +7085,8 @@ msgid ""
" modifiers: comma separated list of modifiers\n"
" groups: action on groups found: comma separated list of groups (from 1 "
"to 9) with optional \"*\" after number to hide group\n"
-" regex: regular expression\n"
+" regex: regular expression (case insensitive, can start by \"(?-i)\" to "
+"become case sensitive)\n"
" del: delete a rmodifier\n"
" -all: delete all rmodifiers\n"
" default: restore default rmodifiers\n"
diff --git a/po/weechat.pot b/po/weechat.pot
index 9b4747222..02b2b6d6b 100644
--- a/po/weechat.pot
+++ b/po/weechat.pot
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2012-01-15 09:29+0100\n"
+"POT-Creation-Date: 2012-01-22 13:38+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -1004,6 +1004,8 @@ msgid ""
"'\\!' to start with '!')\n"
" - two regular expressions are created: one for prefix and one for "
"message\n"
+" - regex are case insensitive, they can start by \"(?-i)\" to become "
+"case sensitive\n"
"\n"
"The default key alt+'=' toggles filtering on/off.\n"
"\n"
@@ -1779,15 +1781,18 @@ msgid ""
msgstr ""
msgid ""
-"comma separated list of words to highlight (case insensitive comparison, "
-"words may begin or end with \"*\" for partial match)"
+"comma separated list of words to highlight; case insensitive comparison (use "
+"\"(?-i)\" at beginning of words to make them case sensitive), words may "
+"begin or end with \"*\" for partial match; example: \"test,(?-i)*toto*,flash*"
+"\""
msgstr ""
msgid ""
"regular expression used to check if a message has highlight or not, at least "
"one match in string must be surrounded by word chars (alphanumeric, \"-\", "
-"\"_\" or \"|\"), regular expression is case sensitive, example: \"FlashCode|"
-"flashy\""
+"\"_\" or \"|\"), regular expression is case insensitive (use \"(?-i)\" at "
+"beginning to make it case sensitive), examples: \"flashcode|flashy\", \"(?-i)"
+"FlashCode|flashy\""
msgstr ""
msgid ""
@@ -3516,6 +3521,9 @@ msgid ""
" server: internal server name where ignore is working\n"
" channel: channel name where ignore is working\n"
"\n"
+"Note: the regular expression can start with \"(?-i)\" to become case "
+"sensitive.\n"
+"\n"
"Examples:\n"
" ignore nick \"toto\" everywhere:\n"
" /ignore add toto\n"
@@ -3622,7 +3630,8 @@ msgstr ""
msgid ""
"channel: channel to list\n"
" server: server name\n"
-" regex: regular expression used to filter results\n"
+" regex: regular expression used to filter results (case insensitive, can "
+"start by \"(?-i)\" to become case sensitive)\n"
"\n"
"Examples:\n"
" list all channels on server (can be very slow on large networks):\n"
@@ -4447,6 +4456,36 @@ msgid "hide password displayed by nickserv"
msgstr ""
msgid ""
+"comma separated list of words to highlight in server buffers (case "
+"insensitive, use \"(?-i)\" at beginning of words to make them case "
+"sensitive; special variables $nick, $channel and $server are replaced by "
+"their value), these words are added to buffer local variable "
+"\"highlight_words\" only when buffer is created (it does not affect current "
+"buffers), an empty string disables default highlight on nick, examples: "
+"\"$nick\", \"(?-i)$nick\""
+msgstr ""
+
+msgid ""
+"comma separated list of words to highlight in channel buffers (case "
+"insensitive, use \"(?-i)\" at beginning of words to make them case "
+"sensitive; special variables $nick, $channel and $server are replaced by "
+"their value), these words are added to buffer local variable "
+"\"highlight_words\" only when buffer is created (it does not affect current "
+"buffers), an empty string disables default highlight on nick, examples: "
+"\"$nick\", \"(?-i)$nick\""
+msgstr ""
+
+msgid ""
+"comma separated list of words to highlight in private buffers (case "
+"insensitive, use \"(?-i)\" at beginning of words to make them case "
+"sensitive; special variables $nick, $channel and $server are replaced by "
+"their value), these words are added to buffer local variable "
+"\"highlight_words\" only when buffer is created (it does not affect current "
+"buffers), an empty string disables default highlight on nick, examples: "
+"\"$nick\", \"(?-i)$nick\""
+msgstr ""
+
+msgid ""
"comma separated list of tags for messages that may produce highlight "
"(usually any message from another user, not server messages,..)"
msgstr ""
@@ -6021,7 +6060,8 @@ msgid "text color for \"disconnected\" status"
msgstr ""
msgid ""
-"regular expression with IPs allowed to use relay, example: \"^(123.45.67.89|"
+"regular expression with IPs allowed to use relay (case insensitive, use \"(?-"
+"i)\" at beginning to make it case sensitive), example: \"^(123.45.67.89|"
"192.160.*)$\""
msgstr ""
@@ -6156,7 +6196,8 @@ msgid ""
" modifiers: comma separated list of modifiers\n"
" groups: action on groups found: comma separated list of groups (from 1 "
"to 9) with optional \"*\" after number to hide group\n"
-" regex: regular expression\n"
+" regex: regular expression (case insensitive, can start by \"(?-i)\" to "
+"become case sensitive)\n"
" del: delete a rmodifier\n"
" -all: delete all rmodifiers\n"
" default: restore default rmodifiers\n"
diff --git a/src/core/wee-command.c b/src/core/wee-command.c
index 94aeeb189..7515f0b9f 100644
--- a/src/core/wee-command.c
+++ b/src/core/wee-command.c
@@ -5638,7 +5638,9 @@ command_init ()
" - if regex starts with '!', then matching "
"result is reversed (use '\\!' to start with '!')\n"
" - two regular expressions are created: one for "
- "prefix and one for message\n\n"
+ "prefix and one for message\n"
+ " - regex are case insensitive, they can start by "
+ "\"(?-i)\" to become case sensitive\n\n"
"The default key alt+'=' toggles filtering on/off.\n\n"
"Tags most commonly used:\n"
" no_filter, no_highlight, no_log, log0..log9 (log level),\n"
diff --git a/src/core/wee-config.c b/src/core/wee-config.c
index f1f90281b..678483697 100644
--- a/src/core/wee-config.c
+++ b/src/core/wee-config.c
@@ -412,9 +412,9 @@ config_change_highlight_regex (void *data, struct t_config_option *option)
config_highlight_regex = malloc (sizeof (*config_highlight_regex));
if (config_highlight_regex)
{
- if (regcomp (config_highlight_regex,
- CONFIG_STRING(config_look_highlight_regex),
- REG_EXTENDED) != 0)
+ if (string_regcomp (config_highlight_regex,
+ CONFIG_STRING(config_look_highlight_regex),
+ REG_EXTENDED | REG_ICASE) != 0)
{
free (config_highlight_regex);
config_highlight_regex = NULL;
@@ -1797,8 +1797,10 @@ config_weechat_init_options ()
config_look_highlight = config_file_new_option (
weechat_config_file, ptr_section,
"highlight", "string",
- N_("comma separated list of words to highlight (case insensitive "
- "comparison, words may begin or end with \"*\" for partial match)"),
+ N_("comma separated list of words to highlight; case insensitive "
+ "comparison (use \"(?-i)\" at beginning of words to make them case "
+ "sensitive), words may begin or end with \"*\" for partial match; "
+ "example: \"test,(?-i)*toto*,flash*\""),
NULL, 0, 0, "", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
config_look_highlight_regex = config_file_new_option (
weechat_config_file, ptr_section,
@@ -1806,7 +1808,8 @@ config_weechat_init_options ()
N_("regular expression used to check if a message has highlight or not, "
"at least one match in string must be surrounded by word chars "
"(alphanumeric, \"-\", \"_\" or \"|\"), regular expression is case "
- "sensitive, example: \"FlashCode|flashy\""),
+ "insensitive (use \"(?-i)\" at beginning to make it case sensitive), "
+ "examples: \"flashcode|flashy\", \"(?-i)FlashCode|flashy\""),
NULL, 0, 0, "", NULL, 0, NULL, NULL, &config_change_highlight_regex, NULL, NULL, NULL);
config_look_highlight_tags = config_file_new_option (
weechat_config_file, ptr_section,
diff --git a/src/core/wee-string.c b/src/core/wee-string.c
index 2ecf8bdca..f063dfa5e 100644
--- a/src/core/wee-string.c
+++ b/src/core/wee-string.c
@@ -676,6 +676,144 @@ string_is_word_char (const char *string)
}
/*
+ * string_mask_to_regex: convert a mask (string with only "*" as wildcard) to a
+ * regex, paying attention to special chars in a regex
+ */
+
+char *
+string_mask_to_regex (const char *mask)
+{
+ char *result;
+ const char *ptr_mask;
+ int index_result;
+ char *regex_special_char = ".[]{}()?+";
+
+ if (!mask)
+ return NULL;
+
+ result = malloc ((strlen (mask) * 2) + 1);
+ if (!result)
+ return NULL;
+
+ result[0] = '\0';
+ index_result = 0;
+ ptr_mask = mask;
+ while (ptr_mask[0])
+ {
+ /* '*' in string ? then replace by '.*' */
+ if (ptr_mask[0] == '*')
+ {
+ result[index_result++] = '.';
+ result[index_result++] = '*';
+ }
+ /* special regex char in string ? escape it with '\' */
+ else if (strchr (regex_special_char, ptr_mask[0]))
+ {
+ result[index_result++] = '\\';
+ result[index_result++] = ptr_mask[0];
+ }
+ /* standard char, just copy it */
+ else
+ result[index_result++] = ptr_mask[0];
+
+ ptr_mask++;
+ }
+
+ /* add final '\0' */
+ result[index_result] = '\0';
+
+ return result;
+}
+
+/*
+ * string_regex_flags: get pointer on string after flags and return mask with
+ * flags to compile regex
+ * format of flags is:
+ * (?eins-eins)string
+ * flags:
+ * e: POSIX extended regex (REG_EXTENDED)
+ * i: case insensitive (REG_ICASE)
+ * n: match-any-character operators don't match a newline (REG_NEWLINE)
+ * s: support for substring addressing of matches is not required (REG_NOSUB)
+ * examples (with default_flags = REG_EXTENDED):
+ * "(?i)toto" : regex "toto", flags = REG_EXTENDED | REG_ICASE
+ * "(?i)toto" : regex "toto", flags = REG_EXTENDED | REG_ICASE
+ * "(?i-e)toto": regex "toto", flags = REG_ICASE
+ */
+
+const char *
+string_regex_flags (const char *regex, int default_flags, int *flags)
+{
+ const char *ptr_regex, *ptr_flags;
+ int set_flag, flag;
+ char *pos;
+
+ ptr_regex = regex;
+ if (flags)
+ *flags = default_flags;
+
+ while (strncmp (ptr_regex, "(?", 2) == 0)
+ {
+ pos = strchr (ptr_regex, ')');
+ if (!pos)
+ break;
+ if (!isalpha (ptr_regex[2]) && (ptr_regex[2] != '-'))
+ break;
+ if (flags)
+ {
+ set_flag = 1;
+ for (ptr_flags = ptr_regex + 2; ptr_flags < pos; ptr_flags++)
+ {
+ flag = 0;
+ switch (ptr_flags[0])
+ {
+ case '-':
+ set_flag = 0;
+ break;
+ case 'e':
+ flag = REG_EXTENDED;
+ break;
+ case 'i':
+ flag = REG_ICASE;
+ break;
+ case 'n':
+ flag = REG_NEWLINE;
+ break;
+ case 's':
+ flag = REG_NOSUB;
+ break;
+ }
+ if (flag > 0)
+ {
+ if (set_flag)
+ *flags |= flag;
+ else
+ *flags &= ~flag;
+ }
+ }
+ }
+ ptr_regex = pos + 1;
+ }
+
+ return ptr_regex;
+}
+
+/*
+ * string_regcomp: compile a regex using optional flags at beginning of string
+ * (for format of flags in regex, see string_regex_flags())
+ */
+
+int
+string_regcomp (regex_t *preg, const char *regex, int default_flags)
+{
+ const char *ptr_regex;
+ int flags;
+
+ ptr_regex = string_regex_flags (regex, default_flags, &flags);
+ return regcomp (preg, ptr_regex, flags);
+}
+
+/*
* string_has_highlight: return 1 if string contains a highlight (using list of
* words to highlight)
* return 0 if no highlight is found in string
@@ -684,13 +822,13 @@ string_is_word_char (const char *string)
int
string_has_highlight (const char *string, const char *highlight_words)
{
- char *msg, *highlight, *match, *match_pre, *match_post, *msg_pos, *pos, *pos_end;
- int end, length, startswith, endswith, wildcard_start, wildcard_end;
+ char *msg, *highlight, *match, *match_pre, *match_post, *msg_pos;
+ char *pos, *pos_end, *ptr_str, *ptr_string_ref;
+ int end, length, startswith, endswith, wildcard_start, wildcard_end, flags;
if (!string || !string[0] || !highlight_words || !highlight_words[0])
return 0;
- /* convert both strings to lower case */
msg = strdup (string);
if (!msg)
return 0;
@@ -707,6 +845,10 @@ string_has_highlight (const char *string, const char *highlight_words)
end = 0;
while (!end)
{
+ ptr_string_ref = (char *)string;
+ flags = 0;
+ pos = (char *)string_regex_flags (pos, REG_ICASE, &flags);
+
pos_end = strchr (pos, ',');
if (!pos_end)
{
@@ -721,6 +863,16 @@ string_has_highlight (const char *string, const char *highlight_words)
return 0;
}
+ if (flags & REG_ICASE)
+ {
+ for (ptr_str = pos; ptr_str < pos_end; ptr_str++)
+ {
+ if ((ptr_str[0] >= 'A') && (ptr_str[0] <= 'Z'))
+ ptr_str[0] += ('a' - 'A');
+ }
+ ptr_string_ref = msg;
+ }
+
length = pos_end - pos;
pos_end[0] = '\0';
if (length > 0)
@@ -739,15 +891,15 @@ string_has_highlight (const char *string, const char *highlight_words)
if (length > 0)
{
- msg_pos = msg;
+ msg_pos = ptr_string_ref;
/* highlight found! */
while ((match = strstr (msg_pos, pos)) != NULL)
{
- match_pre = utf8_prev_char (msg, match);
+ match_pre = utf8_prev_char (ptr_string_ref, match);
if (!match_pre)
match_pre = match - 1;
match_post = match + length;
- startswith = ((match == msg) || (!string_is_word_char (match_pre)));
+ startswith = ((match == ptr_string_ref) || (!string_is_word_char (match_pre)));
endswith = ((!match_post[0]) || (!string_is_word_char (match_post)));
if ((wildcard_start && wildcard_end) ||
(!wildcard_start && !wildcard_end &&
@@ -834,7 +986,7 @@ string_has_highlight_regex (const char *string, const char *regex)
if (!string || !regex || !regex[0])
return 0;
- if (regcomp (&reg, regex, REG_EXTENDED) != 0)
+ if (string_regcomp (&reg, regex, REG_EXTENDED | REG_ICASE) != 0)
return 0;
rc = string_has_highlight_regex_compiled (string, &reg);
@@ -845,56 +997,6 @@ string_has_highlight_regex (const char *string, const char *regex)
}
/*
- * string_mask_to_regex: convert a mask (string with only "*" as wildcard) to a
- * regex, paying attention to special chars in a regex
- */
-
-char *
-string_mask_to_regex (const char *mask)
-{
- char *result;
- const char *ptr_mask;
- int index_result;
- char *regex_special_char = ".[]{}()?+";
-
- if (!mask)
- return NULL;
-
- result = malloc ((strlen (mask) * 2) + 1);
- if (!result)
- return NULL;
-
- result[0] = '\0';
- index_result = 0;
- ptr_mask = mask;
- while (ptr_mask[0])
- {
- /* '*' in string ? then replace by '.*' */
- if (ptr_mask[0] == '*')
- {
- result[index_result++] = '.';
- result[index_result++] = '*';
- }
- /* special regex char in string ? escape it with '\' */
- else if (strchr (regex_special_char, ptr_mask[0]))
- {
- result[index_result++] = '\\';
- result[index_result++] = ptr_mask[0];
- }
- /* standard char, just copy it */
- else
- result[index_result++] = ptr_mask[0];
-
- ptr_mask++;
- }
-
- /* add final '\0' */
- result[index_result] = '\0';
-
- return result;
-}
-
-/*
* string_split: split a string according to separators
* examples:
* string_split ("abc de fghi", " ", 0, 0, NULL)
diff --git a/src/core/wee-string.h b/src/core/wee-string.h
index 1d03e9039..79a81c811 100644
--- a/src/core/wee-string.h
+++ b/src/core/wee-string.h
@@ -48,12 +48,15 @@ extern char *string_remove_quotes (const char *string, const char *quotes);
extern char *string_strip (const char *string, int left, int right,
const char *chars);
extern char *string_convert_hex_chars (const char *string);
+extern char *string_mask_to_regex (const char *mask);
+extern const char *string_regex_flags (const char *regex, int default_flags,
+ int *flags);
+extern int string_regcomp (regex_t *preg, const char *regex, int default_flags);
extern int string_has_highlight (const char *string,
const char *highlight_words);
extern int string_has_highlight_regex_compiled (const char *string,
regex_t *regex);
extern int string_has_highlight_regex (const char *string, const char *regex);
-extern char *string_mask_to_regex (const char *mask);
extern char **string_split (const char *string, const char *separators,
int keep_eol, int num_items_max, int *num_items);
extern void string_free_split (char **split_string);
diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c
index 56685efb3..0a95598a6 100644
--- a/src/gui/gui-buffer.c
+++ b/src/gui/gui-buffer.c
@@ -1270,9 +1270,9 @@ gui_buffer_set_highlight_regex (struct t_gui_buffer *buffer,
malloc (sizeof (*buffer->highlight_regex_compiled));
if (buffer->highlight_regex_compiled)
{
- if (regcomp (buffer->highlight_regex_compiled,
- buffer->highlight_regex,
- REG_EXTENDED) != 0)
+ if (string_regcomp (buffer->highlight_regex_compiled,
+ buffer->highlight_regex,
+ REG_EXTENDED | REG_ICASE) != 0)
{
free (buffer->highlight_regex_compiled);
buffer->highlight_regex_compiled = NULL;
@@ -3359,7 +3359,8 @@ gui_buffer_dump_hexa (struct t_gui_buffer *buffer)
free (message_without_colors);
tags = string_build_with_split_string ((const char **)ptr_line->data->tags_array,
",");
- log_printf (" tags: %s", (tags) ? tags : "(none)");
+ log_printf (" tags: %s, highlight: %d",
+ (tags) ? tags : "(none)", ptr_line->data->highlight);
if (tags)
free (tags);
snprintf (buf, sizeof (buf), "%s", ctime (&ptr_line->data->date));
diff --git a/src/gui/gui-filter.c b/src/gui/gui-filter.c
index 351c6bc91..fa149b37b 100644
--- a/src/gui/gui-filter.c
+++ b/src/gui/gui-filter.c
@@ -284,8 +284,8 @@ gui_filter_new (int enabled, const char *name, const char *buffer_name,
regex1 = malloc (sizeof (*regex1));
if (regex1)
{
- if (regcomp (regex1, regex_prefix,
- REG_NOSUB | REG_ICASE | REG_EXTENDED) != 0)
+ if (string_regcomp (regex1, regex_prefix,
+ REG_EXTENDED | REG_ICASE | REG_NOSUB) != 0)
{
free (regex_prefix);
free (regex1);
@@ -297,8 +297,8 @@ gui_filter_new (int enabled, const char *name, const char *buffer_name,
regex2 = malloc (sizeof (*regex2));
if (regex2)
{
- if (regcomp (regex2, pos_regex_message,
- REG_NOSUB | REG_ICASE | REG_EXTENDED) != 0)
+ if (string_regcomp (regex2, pos_regex_message,
+ REG_EXTENDED | REG_ICASE | REG_NOSUB) != 0)
{
if (regex_prefix)
free (regex_prefix);
diff --git a/src/plugins/irc/irc-channel.c b/src/plugins/irc/irc-channel.c
index e3bca747d..6b9906707 100644
--- a/src/plugins/irc/irc-channel.c
+++ b/src/plugins/irc/irc-channel.c
@@ -229,7 +229,10 @@ irc_channel_new (struct t_irc_server *server, int channel_type,
}
/* set highlights settings on channel buffer */
- weechat_buffer_set(new_buffer, "highlight_words_add", "$nick");
+ weechat_buffer_set(new_buffer, "highlight_words_add",
+ (channel_type == IRC_CHANNEL_TYPE_CHANNEL) ?
+ weechat_config_string (irc_config_look_highlight_channel) :
+ weechat_config_string (irc_config_look_highlight_pv));
if (weechat_config_string (irc_config_look_highlight_tags)
&& weechat_config_string (irc_config_look_highlight_tags)[0])
{
diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c
index 5d052b454..fcf103cdd 100644
--- a/src/plugins/irc/irc-command.c
+++ b/src/plugins/irc/irc-command.c
@@ -2245,8 +2245,8 @@ irc_command_list (void *data, struct t_gui_buffer *buffer, int argc,
ptr_server->cmd_list_regexp = malloc (sizeof (*ptr_server->cmd_list_regexp));
if (ptr_server->cmd_list_regexp)
{
- if ((ret = regcomp (ptr_server->cmd_list_regexp, ptr_regex,
- REG_NOSUB | REG_ICASE | REG_EXTENDED)) != 0)
+ if ((ret = weechat_string_regcomp (ptr_server->cmd_list_regexp, ptr_regex,
+ REG_EXTENDED | REG_ICASE | REG_NOSUB)) != 0)
{
regerror (ret, ptr_server->cmd_list_regexp,
buf, sizeof(buf));
@@ -4946,6 +4946,8 @@ irc_command_init ()
"is working\n"
" channel: channel name where ignore is "
"working\n\n"
+ "Note: the regular expression can start with "
+ "\"(?-i)\" to become case sensitive.\n\n"
"Examples:\n"
" ignore nick \"toto\" everywhere:\n"
" /ignore add toto\n"
@@ -5029,7 +5031,8 @@ irc_command_init ()
N_("channel: channel to list\n"
" server: server name\n"
" regex: regular expression used to filter "
- "results\n\n"
+ "results (case insensitive, can start by \"(?-i)\" "
+ "to become case sensitive)\n\n"
"Examples:\n"
" list all channels on server (can be very slow "
"on large networks):\n"
diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c
index 8ea5976bf..9367decf6 100644
--- a/src/plugins/irc/irc-config.c
+++ b/src/plugins/irc/irc-config.c
@@ -80,6 +80,9 @@ struct t_config_option *irc_config_look_item_channel_modes_hide_key;
struct t_config_option *irc_config_look_item_nick_modes;
struct t_config_option *irc_config_look_item_nick_prefix;
struct t_config_option *irc_config_look_hide_nickserv_pwd;
+struct t_config_option *irc_config_look_highlight_server;
+struct t_config_option *irc_config_look_highlight_channel;
+struct t_config_option *irc_config_look_highlight_pv;
struct t_config_option *irc_config_look_highlight_tags;
struct t_config_option *irc_config_look_item_display_server;
struct t_config_option *irc_config_look_msgbuffer_fallback;
@@ -2183,6 +2186,42 @@ irc_config_init ()
"hide_nickserv_pwd", "boolean",
N_("hide password displayed by nickserv"),
NULL, 0, 0, "on", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_highlight_server = weechat_config_new_option (
+ irc_config_file, ptr_section,
+ "highlight_server", "string",
+ N_("comma separated list of words to highlight in server buffers "
+ "(case insensitive, use \"(?-i)\" at beginning of words to "
+ "make them case sensitive; special variables $nick, $channel and "
+ "$server are replaced by their value), these words are added to "
+ "buffer local variable \"highlight_words\" only when buffer is "
+ "created (it does not affect current buffers), an empty string "
+ "disables default highlight on nick, examples: \"$nick\", "
+ "\"(?-i)$nick\""),
+ NULL, 0, 0, "$nick", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_highlight_channel = weechat_config_new_option (
+ irc_config_file, ptr_section,
+ "highlight_channel", "string",
+ N_("comma separated list of words to highlight in channel buffers "
+ "(case insensitive, use \"(?-i)\" at beginning of words to "
+ "make them case sensitive; special variables $nick, $channel and "
+ "$server are replaced by their value), these words are added to "
+ "buffer local variable \"highlight_words\" only when buffer is "
+ "created (it does not affect current buffers), an empty string "
+ "disables default highlight on nick, examples: \"$nick\", "
+ "\"(?-i)$nick\""),
+ NULL, 0, 0, "$nick", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
+ irc_config_look_highlight_pv = weechat_config_new_option (
+ irc_config_file, ptr_section,
+ "highlight_pv", "string",
+ N_("comma separated list of words to highlight in private buffers "
+ "(case insensitive, use \"(?-i)\" at beginning of words to "
+ "make them case sensitive; special variables $nick, $channel and "
+ "$server are replaced by their value), these words are added to "
+ "buffer local variable \"highlight_words\" only when buffer is "
+ "created (it does not affect current buffers), an empty string "
+ "disables default highlight on nick, examples: \"$nick\", "
+ "\"(?-i)$nick\""),
+ NULL, 0, 0, "$nick", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
irc_config_look_highlight_tags = weechat_config_new_option (
irc_config_file, ptr_section,
"highlight_tags", "string",
diff --git a/src/plugins/irc/irc-config.h b/src/plugins/irc/irc-config.h
index 7314c43b6..c9331a3a1 100644
--- a/src/plugins/irc/irc-config.h
+++ b/src/plugins/irc/irc-config.h
@@ -105,6 +105,9 @@ extern struct t_config_option *irc_config_look_item_channel_modes_hide_key;
extern struct t_config_option *irc_config_look_item_nick_modes;
extern struct t_config_option *irc_config_look_item_nick_prefix;
extern struct t_config_option *irc_config_look_hide_nickserv_pwd;
+extern struct t_config_option *irc_config_look_highlight_server;
+extern struct t_config_option *irc_config_look_highlight_channel;
+extern struct t_config_option *irc_config_look_highlight_pv;
extern struct t_config_option *irc_config_look_highlight_tags;
extern struct t_config_option *irc_config_look_item_display_server;
extern struct t_config_option *irc_config_look_msgbuffer_fallback;
diff --git a/src/plugins/irc/irc-ignore.c b/src/plugins/irc/irc-ignore.c
index bfb024183..d375abea3 100644
--- a/src/plugins/irc/irc-ignore.c
+++ b/src/plugins/irc/irc-ignore.c
@@ -146,7 +146,8 @@ irc_ignore_new (const char *mask, const char *server, const char *channel)
return NULL;
}
- if (regcomp (regex, complete_mask, REG_NOSUB | REG_ICASE | REG_EXTENDED) != 0)
+ if (weechat_string_regcomp (regex, complete_mask,
+ REG_EXTENDED | REG_ICASE | REG_NOSUB) != 0)
{
free (regex);
free (complete_mask);
diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c
index 1ccbda981..3df2a63d0 100644
--- a/src/plugins/irc/irc-server.c
+++ b/src/plugins/irc/irc-server.c
@@ -3010,7 +3010,8 @@ irc_server_create_buffer (struct t_irc_server *server)
weechat_buffer_set (server->buffer, "input_get_unknown_commands", "1");
/* set highlights settings on server buffer */
- weechat_buffer_set (server->buffer, "highlight_words_add", "$nick");
+ weechat_buffer_set (server->buffer, "highlight_words_add",
+ weechat_config_string (irc_config_look_highlight_server));
if (weechat_config_string (irc_config_look_highlight_tags)
&& weechat_config_string (irc_config_look_highlight_tags)[0])
{
diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c
index 754ae78eb..d920f03b6 100644
--- a/src/plugins/plugin.c
+++ b/src/plugins/plugin.c
@@ -505,9 +505,11 @@ plugin_load (const char *filename, int argc, char **argv)
new_plugin->string_expand_home = &string_expand_home;
new_plugin->string_remove_quotes = &string_remove_quotes;
new_plugin->string_strip = &string_strip;
+ new_plugin->string_mask_to_regex = &string_mask_to_regex;
+ new_plugin->string_regex_flags = &string_regex_flags;
+ new_plugin->string_regcomp = &string_regcomp;
new_plugin->string_has_highlight = &string_has_highlight;
new_plugin->string_has_highlight_regex = &string_has_highlight_regex;
- new_plugin->string_mask_to_regex = &string_mask_to_regex;
new_plugin->string_split = &string_split;
new_plugin->string_free_split = &string_free_split;
new_plugin->string_build_with_split_string = &string_build_with_split_string;
diff --git a/src/plugins/relay/relay-config.c b/src/plugins/relay/relay-config.c
index b99de1890..c71a6d77f 100644
--- a/src/plugins/relay/relay-config.c
+++ b/src/plugins/relay/relay-config.c
@@ -104,7 +104,9 @@ relay_config_change_network_allowed_ips (void *data,
relay_config_regex_allowed_ips = malloc (sizeof (*relay_config_regex_allowed_ips));
if (relay_config_regex_allowed_ips)
{
- if (regcomp (relay_config_regex_allowed_ips, allowed_ips, REG_EXTENDED) != 0)
+ if (weechat_string_regcomp (relay_config_regex_allowed_ips,
+ allowed_ips,
+ REG_EXTENDED | REG_ICASE) != 0)
{
free (relay_config_regex_allowed_ips);
relay_config_regex_allowed_ips = NULL;
@@ -416,7 +418,8 @@ relay_config_init ()
relay_config_network_allowed_ips = weechat_config_new_option (
relay_config_file, ptr_section,
"allowed_ips", "string",
- N_("regular expression with IPs allowed to use relay, example: "
+ N_("regular expression with IPs allowed to use relay (case insensitive, "
+ "use \"(?-i)\" at beginning to make it case sensitive), example: "
"\"^(123.45.67.89|192.160.*)$\""),
NULL, 0, 0, "", NULL, 0, NULL, NULL,
&relay_config_change_network_allowed_ips, NULL, NULL, NULL);
diff --git a/src/plugins/rmodifier/rmodifier-command.c b/src/plugins/rmodifier/rmodifier-command.c
index 27bc65463..18990f9d0 100644
--- a/src/plugins/rmodifier/rmodifier-command.c
+++ b/src/plugins/rmodifier/rmodifier-command.c
@@ -246,7 +246,8 @@ rmodifier_command_init ()
" groups: action on groups found: comma separated "
"list of groups (from 1 to 9) with optional \"*\" "
"after number to hide group\n"
- " regex: regular expression\n"
+ " regex: regular expression (case insensitive, "
+ "can start by \"(?-i)\" to become case sensitive)\n"
" del: delete a rmodifier\n"
" -all: delete all rmodifiers\n"
" default: restore default rmodifiers\n\n"
diff --git a/src/plugins/rmodifier/rmodifier.c b/src/plugins/rmodifier/rmodifier.c
index 23d72d85c..4eacabeff 100644
--- a/src/plugins/rmodifier/rmodifier.c
+++ b/src/plugins/rmodifier/rmodifier.c
@@ -271,8 +271,8 @@ rmodifier_new (const char *name, const char *modifiers, const char *str_regex,
if (!regex)
return NULL;
- if (regcomp (regex, str_regex,
- REG_EXTENDED | REG_ICASE) != 0)
+ if (weechat_string_regcomp (regex, str_regex,
+ REG_EXTENDED | REG_ICASE) != 0)
{
weechat_printf (NULL,
_("%s%s: error compiling regular expression \"%s\""),
diff --git a/src/plugins/weechat-plugin.h b/src/plugins/weechat-plugin.h
index 10ea7d697..19384db95 100644
--- a/src/plugins/weechat-plugin.h
+++ b/src/plugins/weechat-plugin.h
@@ -26,6 +26,7 @@
#define __WEECHAT_WEECHAT_PLUGIN_H 1
#include <sys/types.h>
+#include <regex.h>
struct t_config_option;
struct t_gui_window;
@@ -46,7 +47,7 @@ struct timeval;
*/
/* API version (used to check that plugin has same API and can be loaded) */
-#define WEECHAT_PLUGIN_API_VERSION "20120112-01"
+#define WEECHAT_PLUGIN_API_VERSION "20120122-01"
/* macros for defining plugin infos */
#define WEECHAT_PLUGIN_NAME(__name) \
@@ -225,10 +226,13 @@ struct t_weechat_plugin
char *(*string_remove_quotes) (const char *string, const char *quotes);
char *(*string_strip) (const char *string, int left, int right,
const char *chars);
+ char *(*string_mask_to_regex) (const char *mask);
+ const char *(*string_regex_flags) (const char *regex, int default_flags,
+ int *flags);
+ int (*string_regcomp) (regex_t *preg, const char *regex, int default_flags);
int (*string_has_highlight) (const char *string,
const char *highlight_words);
int (*string_has_highlight_regex) (const char *string, const char *regex);
- char *(*string_mask_to_regex) (const char *mask);
char **(*string_split) (const char *string, const char *separators,
int keep_eol, int num_items_max, int *num_items);
void (*string_free_split) (char **split_string);
@@ -939,12 +943,17 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin);
weechat_plugin->string_remove_quotes(__string, __quotes)
#define weechat_string_strip(__string, __left, __right, __chars) \
weechat_plugin->string_strip(__string, __left, __right, __chars)
+#define weechat_string_mask_to_regex(__mask) \
+ weechat_plugin->string_mask_to_regex(__mask)
+#define weechat_string_regex_flags(__regex, __default_flags, __flags) \
+ weechat_plugin->string_regex_flags(__regex, __default_flags, \
+ __flags)
+#define weechat_string_regcomp(__preg, __regex, __default_flags) \
+ weechat_plugin->string_regcomp(__preg, __regex, __default_flags)
#define weechat_string_has_highlight(__string, __highlight_words) \
weechat_plugin->string_has_highlight(__string, __highlight_words)
#define weechat_string_has_highlight_regex(__string, __regex) \
weechat_plugin->string_has_highlight_regex(__string, __regex)
-#define weechat_string_mask_to_regex(__mask) \
- weechat_plugin->string_mask_to_regex(__mask)
#define weechat_string_split(__string, __separator, __eol, __max, \
__num_items) \
weechat_plugin->string_split(__string, __separator, __eol, \