diff --git a/ChangeLog b/ChangeLog index e83ccb2ff..a2db3b4dc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ Version 0.3.9 (under dev!) -------------------------- * alias: prohibit names beginning with "#" for aliases (bug #36584) +* rmodifier: prohibit names beginning with "#" for rmodifiers Version 0.3.8 (2012-06-03) -------------------------- diff --git a/doc/de/autogen/user/rmodifier_commands.txt b/doc/de/autogen/user/rmodifier_commands.txt index 1102dba2c..3eb8f8461 100644 --- a/doc/de/autogen/user/rmodifier_commands.txt +++ b/doc/de/autogen/user/rmodifier_commands.txt @@ -6,23 +6,24 @@ del |-all [...] 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 (zwischen Groß- und Kleinschreibung wird nicht unterschieden. Um zwischen Groß- und Kleinschreibung zu unterscheiden muss zu Beginn "(?-i)" genutzt werden) - del: löscht einen rmodifier Eintrag - -all: löscht alle rmodifiers Einträge - default: setzt die rmodifier auf seine Standardwerte zurück + list: list all rmodifiers +listdefault: list default rmodifiers + add: add a rmodifier + name: name of rmodifier + note: the name can not start with "#" + modifiers: comma separated list of modifiers + groups: action on groups found: comma separated list of groups (from 1 to 9) with optional "*" after number to hide group + regex: regular expression (case insensitive, can start by "(?-i)" to become case sensitive) + del: delete a rmodifier + -all: delete all rmodifiers + default: restore default rmodifiers -Beispiele: - verbirgt die Eingabe nach dem Befehl /passwort: - /rmodifier add passwort input_text_display 1,2* ^(/passwort +)(.*) - lösche rmodifier "passwort": - /rmodifier del passwort - lösche alle rmodifiers: +Examples: + hide everything typed after a command /password: + /rmodifier add password input_text_display 1,2* ^(/password +)(.*) + delete rmodifier "password": + /rmodifier del password + delete all rmodifiers: /rmodifier del -all ........................................ diff --git a/doc/en/autogen/user/rmodifier_commands.txt b/doc/en/autogen/user/rmodifier_commands.txt index 18906369e..cd9e661a2 100644 --- a/doc/en/autogen/user/rmodifier_commands.txt +++ b/doc/en/autogen/user/rmodifier_commands.txt @@ -10,6 +10,7 @@ listdefault: list default rmodifiers add: add a rmodifier name: name of rmodifier + note: the name can not start with "#" 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) diff --git a/doc/fr/autogen/user/rmodifier_commands.txt b/doc/fr/autogen/user/rmodifier_commands.txt index 6bfb7e012..9c8a1e2a7 100644 --- a/doc/fr/autogen/user/rmodifier_commands.txt +++ b/doc/fr/autogen/user/rmodifier_commands.txt @@ -10,6 +10,7 @@ listdefault: lister les rmodifiers par défaut add: ajouter un rmodifier name: nom du rmodifier + note: le nom ne peut pas commencer par "#" 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 (insensible à la casse, peut commencer par "(?-i)" pour devenir sensible à la casse) diff --git a/doc/it/autogen/user/rmodifier_commands.txt b/doc/it/autogen/user/rmodifier_commands.txt index 01fc67a9e..803e61a20 100644 --- a/doc/it/autogen/user/rmodifier_commands.txt +++ b/doc/it/autogen/user/rmodifier_commands.txt @@ -6,23 +6,24 @@ del |-all [...] 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 sui gruppi trovati: elenco separato da virgole di gruppi (da 1 a 9) con "*" opzionale dopo il numero per nascondere il gruppo - regex: espressione regolare (non sensibile alle maiuscole, può iniziare con "(?-i)" per diventare sensibile alle maiuscole - 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 + note: the name can not start with "#" + modifiers: comma separated list of modifiers + groups: action on groups found: comma separated list of groups (from 1 to 9) with optional "*" after number to hide group + regex: regular expression (case insensitive, can start by "(?-i)" to become case sensitive) + del: delete a rmodifier + -all: delete all rmodifiers + default: restore default rmodifiers -Esempi: - nasconde ciò che viene digitato dopo il comando /password: +Examples: + hide everything typed after a command /password: /rmodifier add password input_text_display 1,2* ^(/password +)(.*) - elimina rmodifier "password": + delete rmodifier "password": /rmodifier del password - elimina tutti gli rmodifier: + delete all rmodifiers: /rmodifier del -all ........................................ diff --git a/po/cs.po b/po/cs.po index 5f5a6a048..a5f24c5aa 100644 --- a/po/cs.po +++ b/po/cs.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-06-04 09:57+0200\n" +"POT-Creation-Date: 2012-06-04 10:02+0200\n" "PO-Revision-Date: 2012-06-03 09:49+0200\n" "Last-Translator: Jiri Golembiovsky \n" "Language-Team: weechat-dev \n" @@ -7624,6 +7624,7 @@ msgid "" "listdefault: list default rmodifiers\n" " add: add a rmodifier\n" " name: name of rmodifier\n" +" note: the name can not start with \"#\"\n" " 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" diff --git a/po/de.po b/po/de.po index 2b820126b..8b45f4532 100644 --- a/po/de.po +++ b/po/de.po @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-06-04 09:57+0200\n" +"POT-Creation-Date: 2012-06-04 10:02+0200\n" "PO-Revision-Date: 2012-06-03 09:49+0200\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -8144,11 +8144,13 @@ msgstr "" "list|listdefault || add || del |-" "all [...] || default -yes" +#, fuzzy msgid "" " list: list all rmodifiers\n" "listdefault: list default rmodifiers\n" " add: add a rmodifier\n" " name: name of rmodifier\n" +" note: the name can not start with \"#\"\n" " 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" diff --git a/po/es.po b/po/es.po index 70afdfdb5..241874d9e 100644 --- a/po/es.po +++ b/po/es.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-06-04 09:57+0200\n" +"POT-Creation-Date: 2012-06-04 10:02+0200\n" "PO-Revision-Date: 2012-06-03 09:49+0200\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -7885,11 +7885,13 @@ msgstr "" "list|listdefault || add || del " "|-all [...] || default -yes" +#, fuzzy msgid "" " list: list all rmodifiers\n" "listdefault: list default rmodifiers\n" " add: add a rmodifier\n" " name: name of rmodifier\n" +" note: the name can not start with \"#\"\n" " 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" diff --git a/po/fr.po b/po/fr.po index f1a2227cb..b6f5e3a2b 100644 --- a/po/fr.po +++ b/po/fr.po @@ -21,8 +21,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-06-04 09:57+0200\n" -"PO-Revision-Date: 2012-06-04 09:58+0200\n" +"POT-Creation-Date: 2012-06-04 10:02+0200\n" +"PO-Revision-Date: 2012-06-04 09:59+0200\n" "Last-Translator: Sebastien Helleu \n" "Language-Team: weechat-dev \n" "Language: French\n" @@ -7942,6 +7942,7 @@ msgid "" "listdefault: list default rmodifiers\n" " add: add a rmodifier\n" " name: name of rmodifier\n" +" note: the name can not start with \"#\"\n" " 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" @@ -7963,6 +7964,7 @@ msgstr "" "listdefault: lister les rmodifiers par défaut\n" " add: ajouter un rmodifier\n" " name: nom du rmodifier\n" +" note: le nom ne peut pas commencer par \"#\"\n" " modifiers: liste de modifiers (séparés par une virgule)\n" " 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 " diff --git a/po/hu.po b/po/hu.po index b905645a9..31c60506c 100644 --- a/po/hu.po +++ b/po/hu.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-06-04 09:57+0200\n" +"POT-Creation-Date: 2012-06-04 10:02+0200\n" "PO-Revision-Date: 2012-06-03 09:49+0200\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -7146,6 +7146,7 @@ msgid "" "listdefault: list default rmodifiers\n" " add: add a rmodifier\n" " name: name of rmodifier\n" +" note: the name can not start with \"#\"\n" " 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" diff --git a/po/it.po b/po/it.po index be92fcd79..fea5edae4 100644 --- a/po/it.po +++ b/po/it.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-06-04 09:57+0200\n" +"POT-Creation-Date: 2012-06-04 10:02+0200\n" "PO-Revision-Date: 2012-06-03 09:49+0200\n" "Last-Translator: Marco Paolone \n" "Language-Team: weechat-dev \n" @@ -7867,11 +7867,13 @@ msgstr "" "list|listdefault || add || del |-" "all [...] || default -yes" +#, fuzzy msgid "" " list: list all rmodifiers\n" "listdefault: list default rmodifiers\n" " add: add a rmodifier\n" " name: name of rmodifier\n" +" note: the name can not start with \"#\"\n" " 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" diff --git a/po/ja.po b/po/ja.po index 203516cd7..419783bc3 100644 --- a/po/ja.po +++ b/po/ja.po @@ -20,7 +20,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-06-04 09:57+0200\n" +"POT-Creation-Date: 2012-06-04 10:02+0200\n" "PO-Revision-Date: 2012-06-03 09:49+0200\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" @@ -7670,11 +7670,13 @@ msgstr "" "list|listdefault || add || del |-" "all [...] || default -yes" +#, fuzzy msgid "" " list: list all rmodifiers\n" "listdefault: list default rmodifiers\n" " add: add a rmodifier\n" " name: name of rmodifier\n" +" note: the name can not start with \"#\"\n" " 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" diff --git a/po/pl.po b/po/pl.po index bcc09ad50..fd9873f3c 100644 --- a/po/pl.po +++ b/po/pl.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-06-04 09:57+0200\n" +"POT-Creation-Date: 2012-06-04 10:02+0200\n" "PO-Revision-Date: 2012-06-03 09:49+0200\n" "Last-Translator: Krzysztof Korościk \n" "Language-Team: weechat-dev \n" @@ -7809,11 +7809,13 @@ msgstr "" "list|listdefault || add || del " "|-all [...] || default -yes" +#, fuzzy msgid "" " list: list all rmodifiers\n" "listdefault: list default rmodifiers\n" " add: add a rmodifier\n" " name: name of rmodifier\n" +" note: the name can not start with \"#\"\n" " 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" diff --git a/po/pt_BR.po b/po/pt_BR.po index 5eebcc006..b3031f8ad 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-06-04 09:57+0200\n" +"POT-Creation-Date: 2012-06-04 10:02+0200\n" "PO-Revision-Date: 2012-06-03 09:49+0200\n" "Last-Translator: Sergio Durigan Junior \n" "Language-Team: weechat-dev \n" @@ -7275,6 +7275,7 @@ msgid "" "listdefault: list default rmodifiers\n" " add: add a rmodifier\n" " name: name of rmodifier\n" +" note: the name can not start with \"#\"\n" " 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" diff --git a/po/ru.po b/po/ru.po index 14d5ae676..8c1169428 100644 --- a/po/ru.po +++ b/po/ru.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat 0.3.9-dev\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-06-04 09:57+0200\n" +"POT-Creation-Date: 2012-06-04 10:02+0200\n" "PO-Revision-Date: 2012-06-03 09:49+0200\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -7168,6 +7168,7 @@ msgid "" "listdefault: list default rmodifiers\n" " add: add a rmodifier\n" " name: name of rmodifier\n" +" note: the name can not start with \"#\"\n" " 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" diff --git a/po/weechat.pot b/po/weechat.pot index fd0b676b4..28fdb5232 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2012-06-04 09:57+0200\n" +"POT-Creation-Date: 2012-06-04 10:02+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -6270,6 +6270,7 @@ msgid "" "listdefault: list default rmodifiers\n" " add: add a rmodifier\n" " name: name of rmodifier\n" +" note: the name can not start with \"#\"\n" " 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" diff --git a/src/plugins/rmodifier/rmodifier-command.c b/src/plugins/rmodifier/rmodifier-command.c index 18990f9d0..f360e8f08 100644 --- a/src/plugins/rmodifier/rmodifier-command.c +++ b/src/plugins/rmodifier/rmodifier-command.c @@ -242,6 +242,8 @@ rmodifier_command_init () "listdefault: list default rmodifiers\n" " add: add a rmodifier\n" " name: name of rmodifier\n" + " note: the name can not start with " + "\"#\"\n" " modifiers: comma separated list of modifiers\n" " groups: action on groups found: comma separated " "list of groups (from 1 to 9) with optional \"*\" " diff --git a/src/plugins/rmodifier/rmodifier.c b/src/plugins/rmodifier/rmodifier.c index 4eacabeff..173bdacfc 100644 --- a/src/plugins/rmodifier/rmodifier.c +++ b/src/plugins/rmodifier/rmodifier.c @@ -263,9 +263,11 @@ rmodifier_new (const char *name, const char *modifiers, const char *str_regex, struct t_rmodifier *new_rmodifier, *ptr_rmodifier; regex_t *regex; - if (!name || !name[0] || !modifiers || !modifiers[0] + if (!name || !name[0] || (name[0] == '#') || !modifiers || !modifiers[0] || !str_regex || !str_regex[0]) + { return NULL; + } regex = malloc (sizeof (*regex)); if (!regex)