rmodifier: prohibit names beginning with "#" for rmodifiers

This commit is contained in:
Sebastien Helleu 2012-06-04 10:06:46 +02:00
parent c681c660c6
commit 231ee3fa3d
18 changed files with 69 additions and 43 deletions

View File

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

View File

@ -6,23 +6,24 @@
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 (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
........................................

View File

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

View File

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

View File

@ -6,23 +6,24 @@
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 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
........................................

View File

@ -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 <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\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"

View File

@ -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 <weechatter@arcor.de>\n"
"Language-Team: German <weechatter@arcor.de>\n"
@ -8144,11 +8144,13 @@ 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"
" 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"

View File

@ -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 <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -7885,11 +7885,13 @@ 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"
" 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"

View File

@ -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 <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\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 "

View File

@ -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 <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\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"

View File

@ -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 <marcopaolone@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -7867,11 +7867,13 @@ 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"
" 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"

View File

@ -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 <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/WeeChat>\n"
@ -7670,11 +7670,13 @@ 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"
" 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"

View File

@ -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 <soltys@szluug.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -7809,11 +7809,13 @@ 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"
" 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"

View File

@ -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 <sergiosdj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\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"

View File

@ -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 <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\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"

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-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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\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"

View File

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

View File

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