core: add support of flags in regular expressions and highlight options, add irc options to customize/disable default nick highlight (task #11128)

New functions in C plugin API:
- string_regex_flags
- string_regcomp

New irc options:
- irc.look.highlight_server
- irc.look.highlight_channel
- irc.look.highlight_pv

Regex flags are supported in following options/commands:
- option weechat.look.highlight
- option weechat.look.highlight_regex
- options irc.look.highlight_{server|channel|pv}
- option relay.network.allowed_ips
- core command /filter
- irc command /list
- irc command /ignore
- rmodifier command /rmodifier
v2.8-utf8proc
Sebastien Helleu 2012-01-22 13:48:42 +01:00
parent 51491469e5
commit 5f6df8021b
56 changed files with 1497 additions and 465 deletions

View File

@ -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

5
NEWS
View File

@ -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'

View File

@ -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
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
Beispiele:
ignoriert den Nick "toto" global:
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.*
........................................

View File

@ -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

View File

@ -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: `""`)

View File

@ -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
........................................

View File

@ -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
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
Die Tastenvoreinstellung alt+'=' schaltet die Filterfunktion an/aus.
The default key alt+'=' toggles filtering on/off.
Die am häufigsten gebrauchten Tags lauten:
no_filter, no_highlight, no_log, log0..log9 (log Level),
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
........................................

View File

@ -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: `""`)

View File

@ -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):

View File

@ -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

View File

@ -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: `""`)

View File

@ -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

View File

@ -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.

View File

@ -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: `""`)

View File

@ -983,6 +983,145 @@ free (str);
[NOTE]
This function is not available in scripting API.
weechat_string_mask_to_regex
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Return a regex, built with a mask, where only special char is "`*`". All other
special chars for regex are escaped.
Prototype:
[source,C]
----------------------------------------
char *weechat_string_mask_to_regex (const char *mask);
----------------------------------------
Arguments:
* 'mask': mask
Return value:
* regular expression, as string (must be freed by calling "free" after use)
C example:
[source,C]
----------------------------------------
char *str_regex = weechat_string_mask_to_regex ("test*mask");
/* result: "test.*mask" */
/* ... */
free (str_regex);
----------------------------------------
Script (Python):
[source,python]
----------------------------------------
# prototype
regex = weechat.string_mask_to_regex(mask)
# example
regex = weechat.string_mask_to_regex("test*mask") # "test.*mask"
----------------------------------------
weechat_string_regex_flags
^^^^^^^^^^^^^^^^^^^^^^^^^^
_New in version 0.3.7._
Get pointer on string after flags and return mask with flags to compile regular
expression.
Prototype:
[source,C]
----------------------------------------
const char *weechat_string_regex_flags (const char *regex, int default_flags, int *flags)
----------------------------------------
Arguments:
* '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
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -1066,48 +1205,6 @@ highlight = weechat.string_has_highlight_regex(string, regex)
highlight = weechat.string_has_highlight_regex("my test string", "test|word2") # 1
----------------------------------------
weechat_string_mask_to_regex
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Return a regex, built with a mask, where only special char is "`*`". All other
special chars for regex are escaped.
Prototype:
[source,C]
----------------------------------------
char *weechat_string_mask_to_regex (const char *mask);
----------------------------------------
Arguments:
* 'mask': mask
Return value:
* regular expression, as string (must be freed by calling "free" after use)
C example:
[source,C]
----------------------------------------
char *str_regex = weechat_string_mask_to_regex ("test*mask");
/* result: "test.*mask" */
/* ... */
free (str_regex);
----------------------------------------
Script (Python):
[source,python]
----------------------------------------
# prototype
regex = weechat.string_mask_to_regex(mask)
# example
regex = weechat.string_mask_to_regex("test*mask") # "test.*mask"
----------------------------------------
weechat_string_split
^^^^^^^^^^^^^^^^^^^^

View File

@ -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):

View File

@ -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

View File

@ -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: `""`)

View File

@ -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

View File

@ -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.

View File

@ -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: `""`)

View File

@ -992,6 +992,151 @@ free (str);
[NOTE]
Cette fonction n'est pas disponible dans l'API script.
weechat_string_mask_to_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.
Prototype :
[source,C]
----------------------------------------
char *weechat_string_mask_to_regex (const char *mask);
----------------------------------------
Paramètres :
* 'mask' : masque
Valeur de retour :
* 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]
----------------------------------------
char *str_regex = weechat_string_mask_to_regex ("test*mask");
/* résultat : "test.*mask" */
/* ... */
free (str_regex);
----------------------------------------
Script (Python) :
[source,python]
----------------------------------------
# prototype
regex = weechat.string_mask_to_regex(mask)
# exemple
regex = weechat.string_mask_to_regex("test*mask") # "test.*mask"
----------------------------------------
weechat_string_regex_flags
^^^^^^^^^^^^^^^^^^^^^^^^^^
_Nouveau dans la version 0.3.7._
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]
----------------------------------------
const char *weechat_string_regex_flags (const char *regex, int default_flags, int *flags)
----------------------------------------
Paramètres :
* '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
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -1077,50 +1222,6 @@ highlight = weechat.string_has_highlight_regex(string, regex)
highlight = weechat.string_has_highlight_regex("my test string", "test|word2") # 1
----------------------------------------
weechat_string_mask_to_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.
Prototype :
[source,C]
----------------------------------------
char *weechat_string_mask_to_regex (const char *mask);
----------------------------------------
Paramètres :
* 'mask' : masque
Valeur de retour :
* 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]
----------------------------------------
char *str_regex = weechat_string_mask_to_regex ("test*mask");
/* résultat : "test.*mask" */
/* ... */
free (str_regex);
----------------------------------------
Script (Python) :
[source,python]
----------------------------------------
# prototype
regex = weechat.string_mask_to_regex(mask)
# exemple
regex = weechat.string_mask_to_regex("test*mask") # "test.*mask"
----------------------------------------
weechat_string_split
^^^^^^^^^^^^^^^^^^^^

View File

@ -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
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
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
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.*
........................................

View File

@ -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

View File

@ -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: `""`)

View File

@ -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
........................................

View File

@ -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 '!')
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
-vengono create due espressioni regolari: una per il prefisso e l'altra per il messaggio
The default key alt+'=' toggles filtering on/off.
Il tasto predefinito alt+'=' abilita/disabilita il filtro.
Tag usati di frequente:
no_filter, no_highlight, no_log, log0..log9 (livello di log),
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]]

View File

@ -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: `""`)

View File

@ -1006,47 +1006,6 @@ free (str);
[NOTE]
Questa funzione non è disponibile nelle API per lo scripting.
weechat_string_has_highlight
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Controlla se una stringa ha uno o più eventi, usando la lista di parole per
gli eventi.
Prototipo:
[source,C]
----------------------------------------
int weechat_string_has_highlight (const char *string,
const char highlight_words);
----------------------------------------
Argomenti:
* 'string': stringa
* 'highlight_words': lista di parole per gli eventi, separate da virgole
Valore restituito:
* 1 se la stringa ha uno o più eventi, altrimenti 0
Esempio in C:
[source,C]
----------------------------------------
int hl = weechat_string_has_highlight ("my test string", "test,word2"); /* == 1 */
----------------------------------------
Script (Python):
[source,python]
----------------------------------------
# prototipo
highlight = weechat.string_has_highlight(string, highlight_words)
# esempio
highlight = weechat.string_has_highlight("my test string", "test,word2") # 1
----------------------------------------
weechat_string_mask_to_regex
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -1091,6 +1050,146 @@ regex = weechat.string_mask_to_regex(mask)
regex = weechat.string_mask_to_regex("test*mask") # "test.*mask"
----------------------------------------
// 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
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Controlla se una stringa ha uno o più eventi, usando la lista di parole per
gli eventi.
Prototipo:
[source,C]
----------------------------------------
int weechat_string_has_highlight (const char *string,
const char highlight_words);
----------------------------------------
Argomenti:
* 'string': stringa
* 'highlight_words': lista di parole per gli eventi, separate da virgole
Valore restituito:
* 1 se la stringa ha uno o più eventi, altrimenti 0
Esempio in C:
[source,C]
----------------------------------------
int hl = weechat_string_has_highlight ("my test string", "test,word2"); /* == 1 */
----------------------------------------
Script (Python):
[source,python]
----------------------------------------
# prototipo
highlight = weechat.string_has_highlight(string, highlight_words)
# esempio
highlight = weechat.string_has_highlight("my test string", "test,word2") # 1
----------------------------------------
weechat_string_split
^^^^^^^^^^^^^^^^^^^^

View File

@ -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"
@ -5572,6 +5584,36 @@ msgstr "zobrazovat předponu přezdívky v položce pole \"input_prompt\""
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,..)"
@ -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"

View File

@ -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"
@ -5940,6 +5954,36 @@ msgstr "Der Nick-Präfix wird in \"input_prompt\" Bar-Item angezeigt"
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,..)"
@ -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"

View File

@ -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"
@ -5757,6 +5770,36 @@ msgstr "mostrar el prefijo del apodo en el elemento de barra \"input_prompt\""
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,..)"
@ -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"

111
po/fr.po
View File

@ -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 "
@ -5810,6 +5829,60 @@ msgstr "affiche le préfixe du pseudo dans l'objet de barre \"input_prompt\""
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,..)"
@ -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"

View File

@ -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"
@ -5163,6 +5173,36 @@ msgstr ""
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,..)"
@ -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"

View File

@ -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"
@ -5749,6 +5763,36 @@ msgstr "visualizza il prefisso del nick nell'elemento barra \"input_prompt\""
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,..)"
@ -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"

View File

@ -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"
@ -5722,6 +5735,36 @@ msgstr "wyświetl przedrostek nicka w elemencie paska \"input_prompt\""
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,..)"
@ -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"

View File

@ -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"
@ -5314,6 +5326,36 @@ msgstr ""
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,..)"
@ -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"

View File

@ -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"
@ -5180,6 +5190,36 @@ msgstr ""
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,..)"
@ -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"

View File

@ -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"
@ -4446,6 +4455,36 @@ msgstr ""
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,..)"
@ -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"

View File

@ -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"

View File

@ -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,

View File

@ -675,6 +675,144 @@ string_is_word_char (const char *string)
return 0;
}
/*
* 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)
@ -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);
@ -844,56 +996,6 @@ string_has_highlight_regex (const char *string, const char *regex)
return rc;
}
/*
* 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:

View File

@ -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);

View File

@ -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));

View File

@ -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);

View File

@ -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])
{

View File

@ -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"

View File

@ -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",

View File

@ -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;

View File

@ -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);

View File

@ -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])
{

View File

@ -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;

View File

@ -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);

View File

@ -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"

View File

@ -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\""),

View File

@ -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, \