summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--po/cs.po39
-rw-r--r--po/de.po35
-rw-r--r--po/es.po35
-rw-r--r--po/fr.po46
-rw-r--r--po/hu.po35
-rw-r--r--po/ru.po35
-rw-r--r--po/weechat.pot27
-rw-r--r--src/core/wee-command.c50
-rw-r--r--src/core/wee-string.c50
-rw-r--r--src/core/wee-string.h1
-rw-r--r--src/plugins/irc/irc-command.c70
-rw-r--r--src/plugins/irc/irc-ignore.c15
-rw-r--r--src/plugins/irc/irc-ignore.h1
-rw-r--r--src/plugins/plugin.c1
-rw-r--r--src/plugins/weechat-plugin.h3
15 files changed, 277 insertions, 166 deletions
diff --git a/po/cs.po b/po/cs.po
index 7007864e4..8d8c004e2 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2008-10-30 17:11+0100\n"
+"POT-Creation-Date: 2008-10-31 13:01+0100\n"
"PO-Revision-Date: 2008-09-17 16:19+0200\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -219,6 +219,13 @@ msgstr ""
msgid "%sPlugin \"%s\" not found"
msgstr "%sPlugin \"%s\" nenalezen"
+#, c-format
+msgid " %s[%s%s%s]%s buffer: %s%s%s / tags: %s / regex: %s %s"
+msgstr " %s[%s%s%s]%s buffer: %s%s%s / značky: %s / výraz: %s %s"
+
+msgid "(disabled)"
+msgstr "(zakázáno)"
+
msgid "Message filtering enabled"
msgstr "Filtrování zpráv povoleno"
@@ -228,13 +235,6 @@ msgstr "Filtrování zpráv zakázáno"
msgid "Message filters:"
msgstr "Filtry zpráv:"
-#, c-format
-msgid " %s[%s%s%s]%s buffer: %s%s%s / tags: %s / regex: %s %s"
-msgstr " %s[%s%s%s]%s buffer: %s%s%s / značky: %s / výraz: %s %s"
-
-msgid "(disabled)"
-msgstr "(zakázáno)"
-
msgid "No message filter defined"
msgstr "Žádné filtry zpráv nejsou definovány"
@@ -258,8 +258,8 @@ msgstr "%sChyba: filtr \"%s\" již existuje"
msgid "%sError: you must specify at least tag(s) or regex for filter"
msgstr "%sChyba: musíte specifikovat buď tag(y) nebo regulární výrazpro filter"
-#, c-format
-msgid "Filter \"%s\" added"
+#, fuzzy, c-format
+msgid "Filter \"%s\" added:"
msgstr "Filtr \"%s\" přidán"
#, c-format
@@ -2385,13 +2385,13 @@ msgid "%s%s: server \"%s\" not found"
msgstr "%s server \"%s\" nenalezen\n"
#, fuzzy, c-format
-msgid "%s: ignore list:"
-msgstr "konec /who seznamu"
-
-#, fuzzy, c-format
msgid " %s[%s%d%s]%s mask: %s / server: %s / channel: %s"
msgstr " (není obsluhovač zprávy)\n"
+#, fuzzy, c-format
+msgid "%s: ignore list:"
+msgstr "konec /who seznamu"
+
#, c-format
msgid "%s: no ignore in list"
msgstr ""
@@ -2404,9 +2404,9 @@ msgstr "%s chybí argumenty pro příkaz \"%s\"\n"
msgid "%s%s: ignore already exists"
msgstr "%s ignorování již existuje\n"
-#, c-format
-msgid "%s: ignore added"
-msgstr ""
+#, fuzzy, c-format
+msgid "%s: ignore added:"
+msgstr "uživatel byl zablokován"
#, fuzzy, c-format
msgid "%s%s: error adding ignore"
@@ -2681,7 +2681,7 @@ msgstr "dát přezdívce (přezdívkám) status operátora polovičního kanálu
msgid "ignore nicks/hosts from servers or channels"
msgstr ""
-msgid "[list] | [add nick/host [server [channel]]] | [del number|-all]"
+msgid "[list] | [add [re:]nick/host [server [channel]]] | [del number|-all]"
msgstr ""
msgid ""
@@ -2690,7 +2690,8 @@ msgid ""
" del: del a ignore\n"
" number: number of ignore to delete (look at list to find it)\n"
" -all: delete all ignore\n"
-"nick/host: nick or host to ignore (regular expression allowed)\n"
+"nick/host: nick or host to ignore: syntax is \"re:regex\" or \"mask\" (a "
+"mask is a string with some \"*\" to replace one or more chars)\n"
" server: internal server name where ignore is working\n"
" channel: channel name where ignore is working\n"
"\n"
diff --git a/po/de.po b/po/de.po
index 0e62dcd7f..fe067b473 100644
--- a/po/de.po
+++ b/po/de.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2008-10-30 17:11+0100\n"
+"POT-Creation-Date: 2008-10-31 13:01+0100\n"
"PO-Revision-Date: 2007-09-06 12:44+0200\n"
"Last-Translator: Thomas Schuetz <i18n@internet-villa.de>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -231,6 +231,14 @@ msgstr ""
msgid "%sPlugin \"%s\" not found"
msgstr "%s Adresse \"%s\" nicht gefunden\n"
+#, fuzzy, c-format
+msgid " %s[%s%s%s]%s buffer: %s%s%s / tags: %s / regex: %s %s"
+msgstr " (kein Message-Handler)\n"
+
+#, fuzzy
+msgid "(disabled)"
+msgstr "/users wurde deaktiviert"
+
#, fuzzy
msgid "Message filtering enabled"
msgstr "Keine Aliases definiert.\n"
@@ -242,14 +250,6 @@ msgstr "Keine Aliases definiert.\n"
msgid "Message filters:"
msgstr ""
-#, fuzzy, c-format
-msgid " %s[%s%s%s]%s buffer: %s%s%s / tags: %s / regex: %s %s"
-msgstr " (kein Message-Handler)\n"
-
-#, fuzzy
-msgid "(disabled)"
-msgstr "/users wurde deaktiviert"
-
#, fuzzy
msgid "No message filter defined"
msgstr "Keine Aliases definiert.\n"
@@ -275,7 +275,7 @@ msgid "%sError: you must specify at least tag(s) or regex for filter"
msgstr ""
#, fuzzy, c-format
-msgid "Filter \"%s\" added"
+msgid "Filter \"%s\" added:"
msgstr "/users wurde deaktiviert"
#, fuzzy, c-format
@@ -2396,14 +2396,14 @@ msgid "%s%s: server \"%s\" not found"
msgstr "%s Server \"%s\" nicht gefunden\n"
#, fuzzy, c-format
-msgid "%s: ignore list:"
-msgstr "Ende der /who-Liste"
-
-#, fuzzy, c-format
msgid " %s[%s%d%s]%s mask: %s / server: %s / channel: %s"
msgstr " (kein Message-Handler)\n"
#, fuzzy, c-format
+msgid "%s: ignore list:"
+msgstr "Ende der /who-Liste"
+
+#, fuzzy, c-format
msgid "%s: no ignore in list"
msgstr "%s Keine /ignore-Regel gefunden.\n"
@@ -2416,7 +2416,7 @@ msgid "%s%s: ignore already exists"
msgstr "%s diese /ignore-Regel existiert bereits\n"
#, fuzzy, c-format
-msgid "%s: ignore added"
+msgid "%s: ignore added:"
msgstr "Keine /ignore-Regeln definiert.\n"
#, fuzzy, c-format
@@ -2686,7 +2686,7 @@ msgstr "Halb-Operatorstatus verleihen"
msgid "ignore nicks/hosts from servers or channels"
msgstr ""
-msgid "[list] | [add nick/host [server [channel]]] | [del number|-all]"
+msgid "[list] | [add [re:]nick/host [server [channel]]] | [del number|-all]"
msgstr ""
msgid ""
@@ -2695,7 +2695,8 @@ msgid ""
" del: del a ignore\n"
" number: number of ignore to delete (look at list to find it)\n"
" -all: delete all ignore\n"
-"nick/host: nick or host to ignore (regular expression allowed)\n"
+"nick/host: nick or host to ignore: syntax is \"re:regex\" or \"mask\" (a "
+"mask is a string with some \"*\" to replace one or more chars)\n"
" server: internal server name where ignore is working\n"
" channel: channel name where ignore is working\n"
"\n"
diff --git a/po/es.po b/po/es.po
index f91866b0e..079a4741e 100644
--- a/po/es.po
+++ b/po/es.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2008-10-30 17:11+0100\n"
+"POT-Creation-Date: 2008-10-31 13:01+0100\n"
"PO-Revision-Date: 2007-09-19 12:09+0200\n"
"Last-Translator: Roberto González Cardenete <robert.glez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -227,6 +227,14 @@ msgstr ""
msgid "%sPlugin \"%s\" not found"
msgstr "%s dirección \"%s\" no encontrada\n"
+#, fuzzy, c-format
+msgid " %s[%s%s%s]%s buffer: %s%s%s / tags: %s / regex: %s %s"
+msgstr " (sin manejador de mensaje)\n"
+
+#, fuzzy
+msgid "(disabled)"
+msgstr "los usuarios han sido desactivados"
+
#, fuzzy
msgid "Message filtering enabled"
msgstr "Ningún alias definido.\n"
@@ -238,14 +246,6 @@ msgstr "Ningún alias definido.\n"
msgid "Message filters:"
msgstr ""
-#, fuzzy, c-format
-msgid " %s[%s%s%s]%s buffer: %s%s%s / tags: %s / regex: %s %s"
-msgstr " (sin manejador de mensaje)\n"
-
-#, fuzzy
-msgid "(disabled)"
-msgstr "los usuarios han sido desactivados"
-
#, fuzzy
msgid "No message filter defined"
msgstr "Ningún alias definido.\n"
@@ -271,7 +271,7 @@ msgid "%sError: you must specify at least tag(s) or regex for filter"
msgstr ""
#, fuzzy, c-format
-msgid "Filter \"%s\" added"
+msgid "Filter \"%s\" added:"
msgstr "los usuarios han sido desactivados"
#, fuzzy, c-format
@@ -2372,14 +2372,14 @@ msgid "%s%s: server \"%s\" not found"
msgstr "%s servidor \"%s\" no encontrado\n"
#, fuzzy, c-format
-msgid "%s: ignore list:"
-msgstr "fin de la lista /who"
-
-#, fuzzy, c-format
msgid " %s[%s%d%s]%s mask: %s / server: %s / channel: %s"
msgstr " (sin manejador de mensaje)\n"
#, fuzzy, c-format
+msgid "%s: ignore list:"
+msgstr "fin de la lista /who"
+
+#, fuzzy, c-format
msgid "%s: no ignore in list"
msgstr "%s no se encontraron ignores\n"
@@ -2392,7 +2392,7 @@ msgid "%s%s: ignore already exists"
msgstr "el ignore %s ya existe\n"
#, fuzzy, c-format
-msgid "%s: ignore added"
+msgid "%s: ignore added:"
msgstr "Sin ignores definidos.\n"
#, fuzzy, c-format
@@ -2667,7 +2667,7 @@ msgstr "dar el estado de operador de medio canal a/a los usuario(s)"
msgid "ignore nicks/hosts from servers or channels"
msgstr ""
-msgid "[list] | [add nick/host [server [channel]]] | [del number|-all]"
+msgid "[list] | [add [re:]nick/host [server [channel]]] | [del number|-all]"
msgstr ""
msgid ""
@@ -2676,7 +2676,8 @@ msgid ""
" del: del a ignore\n"
" number: number of ignore to delete (look at list to find it)\n"
" -all: delete all ignore\n"
-"nick/host: nick or host to ignore (regular expression allowed)\n"
+"nick/host: nick or host to ignore: syntax is \"re:regex\" or \"mask\" (a "
+"mask is a string with some \"*\" to replace one or more chars)\n"
" server: internal server name where ignore is working\n"
" channel: channel name where ignore is working\n"
"\n"
diff --git a/po/fr.po b/po/fr.po
index fe3215135..bb37fbb3f 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2008-10-30 17:11+0100\n"
-"PO-Revision-Date: 2008-10-30 16:52+0100\n"
+"POT-Creation-Date: 2008-10-31 13:01+0100\n"
+"PO-Revision-Date: 2008-10-31 12:59+0100\n"
"Last-Translator: FlashCode <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"MIME-Version: 1.0\n"
@@ -221,6 +221,13 @@ msgstr "Pas de variable locale définie pour le tampon \"%s\""
msgid "%sPlugin \"%s\" not found"
msgstr "%sExtension \"%s\" non trouvée"
+#, c-format
+msgid " %s[%s%s%s]%s buffer: %s%s%s / tags: %s / regex: %s %s"
+msgstr " %s[%s%s%s]%s tampon: %s%s%s / tags: %s / regex: %s %s"
+
+msgid "(disabled)"
+msgstr "(désactivé)"
+
msgid "Message filtering enabled"
msgstr "Filtrage de messages activé"
@@ -230,13 +237,6 @@ msgstr "Filtrage de message désactivé"
msgid "Message filters:"
msgstr "Filtres de messages:"
-#, c-format
-msgid " %s[%s%s%s]%s buffer: %s%s%s / tags: %s / regex: %s %s"
-msgstr " %s[%s%s%s]%s tampon: %s%s%s / tags: %s / regex: %s %s"
-
-msgid "(disabled)"
-msgstr "(désactivé)"
-
msgid "No message filter defined"
msgstr "Pas de filtre de message défini"
@@ -263,8 +263,8 @@ msgstr ""
"expression régulière pour filtrer"
#, c-format
-msgid "Filter \"%s\" added"
-msgstr "Filtre \"%s\" ajouté"
+msgid "Filter \"%s\" added:"
+msgstr "Filtre \"%s\" ajouté :"
#, c-format
msgid "%sError adding filter"
@@ -2416,14 +2416,14 @@ msgid "%s%s: server \"%s\" not found"
msgstr "%s%s: serveur \"%s\" non trouvé"
#, c-format
-msgid "%s: ignore list:"
-msgstr "%s: liste ignore:"
-
-#, c-format
msgid " %s[%s%d%s]%s mask: %s / server: %s / channel: %s"
msgstr " %s[%s%d%s]%s masque: %s / serveur: %s / canal: %s"
#, c-format
+msgid "%s: ignore list:"
+msgstr "%s: liste ignore:"
+
+#, c-format
msgid "%s: no ignore in list"
msgstr "%s: pas d'ignore dans la liste"
@@ -2436,8 +2436,8 @@ msgid "%s%s: ignore already exists"
msgstr "%s%s: le ignore existe déjà"
#, c-format
-msgid "%s: ignore added"
-msgstr "%s: ignore ajouté"
+msgid "%s: ignore added:"
+msgstr "%s: ignore ajouté :"
#, c-format
msgid "%s%s: error adding ignore"
@@ -2704,8 +2704,8 @@ msgstr "donner le statut de demi-opérateur à un/des pseudo(s)"
msgid "ignore nicks/hosts from servers or channels"
msgstr "ignore des pseudos/hôtes de serveurs ou canaux"
-msgid "[list] | [add nick/host [server [channel]]] | [del number|-all]"
-msgstr "[list] | [add pseudo/hote [server [channel]]] | [del numéro|-all]"
+msgid "[list] | [add [re:]nick/host [server [channel]]] | [del number|-all]"
+msgstr "[list] | [add [re:]pseudo/hote [server [channel]]] | [del numéro|-all]"
msgid ""
" list: list all ignore\n"
@@ -2713,7 +2713,8 @@ msgid ""
" del: del a ignore\n"
" number: number of ignore to delete (look at list to find it)\n"
" -all: delete all ignore\n"
-"nick/host: nick or host to ignore (regular expression allowed)\n"
+"nick/host: nick or host to ignore: syntax is \"re:regex\" or \"mask\" (a "
+"mask is a string with some \"*\" to replace one or more chars)\n"
" server: internal server name where ignore is working\n"
" channel: channel name where ignore is working\n"
"\n"
@@ -2731,8 +2732,9 @@ msgstr ""
" numéro: numéro du ignore à supprimer (voir la liste des ignore pour le "
"trouver)\n"
" -all: supprime tous les ignore\n"
-"pseudo/hôte: pseudo ou hôte à ignorer (une expression régulière est "
-"autorisée)\n"
+"pseudo/hôte: pseudo ou hôte à ignorer: la syntaxe est \"re:regex\" ou "
+"\"masque\" (un masque est une chaîne avec des \"*\" pour remplacer un ou "
+"plusieurs caractères)\n"
" serveur: nom de serveur interne où le ignore fonctionnera\n"
" canal: canal où le ignore fonctionnera\n"
"\n"
diff --git a/po/hu.po b/po/hu.po
index 8b354063d..461da9d2f 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -12,7 +12,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2008-10-30 17:11+0100\n"
+"POT-Creation-Date: 2008-10-31 13:01+0100\n"
"PO-Revision-Date: 2007-10-10 18:07+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -232,6 +232,14 @@ msgstr ""
msgid "%sPlugin \"%s\" not found"
msgstr "%s cím \"%s\" nem található\n"
+#, fuzzy, c-format
+msgid " %s[%s%s%s]%s buffer: %s%s%s / tags: %s / regex: %s %s"
+msgstr " (nincs üzenetkezelő)\n"
+
+#, fuzzy
+msgid "(disabled)"
+msgstr "a felhasználók le lettek tiltva"
+
#, fuzzy
msgid "Message filtering enabled"
msgstr "Nincs aliasz definiálva.\n"
@@ -243,14 +251,6 @@ msgstr "Nincs aliasz definiálva.\n"
msgid "Message filters:"
msgstr ""
-#, fuzzy, c-format
-msgid " %s[%s%s%s]%s buffer: %s%s%s / tags: %s / regex: %s %s"
-msgstr " (nincs üzenetkezelő)\n"
-
-#, fuzzy
-msgid "(disabled)"
-msgstr "a felhasználók le lettek tiltva"
-
#, fuzzy
msgid "No message filter defined"
msgstr "Nincs aliasz definiálva.\n"
@@ -276,7 +276,7 @@ msgid "%sError: you must specify at least tag(s) or regex for filter"
msgstr ""
#, fuzzy, c-format
-msgid "Filter \"%s\" added"
+msgid "Filter \"%s\" added:"
msgstr "a felhasználók le lettek tiltva"
#, fuzzy, c-format
@@ -2401,14 +2401,14 @@ msgid "%s%s: server \"%s\" not found"
msgstr "%s a \"%s\" szerver nem található\n"
#, fuzzy, c-format
-msgid "%s: ignore list:"
-msgstr "a /who lista vége"
-
-#, fuzzy, c-format
msgid " %s[%s%d%s]%s mask: %s / server: %s / channel: %s"
msgstr " (nincs üzenetkezelő)\n"
#, fuzzy, c-format
+msgid "%s: ignore list:"
+msgstr "a /who lista vége"
+
+#, fuzzy, c-format
msgid "%s: no ignore in list"
msgstr "%s nem található ilyen mellőzés\n"
@@ -2421,7 +2421,7 @@ msgid "%s%s: ignore already exists"
msgstr "%s az ignore már létezik\n"
#, fuzzy, c-format
-msgid "%s: ignore added"
+msgid "%s: ignore added:"
msgstr "Nincs mellőzés megadva.\n"
#, fuzzy, c-format
@@ -2697,7 +2697,7 @@ msgstr "féloperátori jog biztosítása a felhasználó(k)nak"
msgid "ignore nicks/hosts from servers or channels"
msgstr ""
-msgid "[list] | [add nick/host [server [channel]]] | [del number|-all]"
+msgid "[list] | [add [re:]nick/host [server [channel]]] | [del number|-all]"
msgstr ""
msgid ""
@@ -2706,7 +2706,8 @@ msgid ""
" del: del a ignore\n"
" number: number of ignore to delete (look at list to find it)\n"
" -all: delete all ignore\n"
-"nick/host: nick or host to ignore (regular expression allowed)\n"
+"nick/host: nick or host to ignore: syntax is \"re:regex\" or \"mask\" (a "
+"mask is a string with some \"*\" to replace one or more chars)\n"
" server: internal server name where ignore is working\n"
" channel: channel name where ignore is working\n"
"\n"
diff --git a/po/ru.po b/po/ru.po
index b2c1d4934..320a17c4f 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.2.7-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2008-10-30 17:11+0100\n"
+"POT-Creation-Date: 2008-10-31 13:01+0100\n"
"PO-Revision-Date: 2007-09-06 12:44+0200\n"
"Last-Translator: Pavel Shevchuk <stlwrt@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -228,6 +228,14 @@ msgstr ""
msgid "%sPlugin \"%s\" not found"
msgstr "%s адрес \"%s\" не найден\n"
+#, fuzzy, c-format
+msgid " %s[%s%s%s]%s buffer: %s%s%s / tags: %s / regex: %s %s"
+msgstr " (нет обработчика сообщений)\n"
+
+#, fuzzy
+msgid "(disabled)"
+msgstr "команда users отключена"
+
#, fuzzy
msgid "Message filtering enabled"
msgstr "Сокращения не заданы.\n"
@@ -239,14 +247,6 @@ msgstr "Сокращения не заданы.\n"
msgid "Message filters:"
msgstr ""
-#, fuzzy, c-format
-msgid " %s[%s%s%s]%s buffer: %s%s%s / tags: %s / regex: %s %s"
-msgstr " (нет обработчика сообщений)\n"
-
-#, fuzzy
-msgid "(disabled)"
-msgstr "команда users отключена"
-
#, fuzzy
msgid "No message filter defined"
msgstr "Сокращения не заданы.\n"
@@ -272,7 +272,7 @@ msgid "%sError: you must specify at least tag(s) or regex for filter"
msgstr ""
#, fuzzy, c-format
-msgid "Filter \"%s\" added"
+msgid "Filter \"%s\" added:"
msgstr "команда users отключена"
#, fuzzy, c-format
@@ -2406,14 +2406,14 @@ msgid "%s%s: server \"%s\" not found"
msgstr "%s сервер \"%s\" не найден\n"
#, fuzzy, c-format
-msgid "%s: ignore list:"
-msgstr "конец списка /who"
-
-#, fuzzy, c-format
msgid " %s[%s%d%s]%s mask: %s / server: %s / channel: %s"
msgstr " (нет обработчика сообщений)\n"
#, fuzzy, c-format
+msgid "%s: ignore list:"
+msgstr "конец списка /who"
+
+#, fuzzy, c-format
msgid "%s: no ignore in list"
msgstr "%s игнорирования не найдены\n"
@@ -2426,7 +2426,7 @@ msgid "%s%s: ignore already exists"
msgstr "%s игнорирование уже существует\n"
#, fuzzy, c-format
-msgid "%s: ignore added"
+msgid "%s: ignore added:"
msgstr "Игнорирования не заданы.\n"
#, fuzzy, c-format
@@ -2701,7 +2701,7 @@ msgstr "даёт статус полу-оператора канала поль
msgid "ignore nicks/hosts from servers or channels"
msgstr ""
-msgid "[list] | [add nick/host [server [channel]]] | [del number|-all]"
+msgid "[list] | [add [re:]nick/host [server [channel]]] | [del number|-all]"
msgstr ""
msgid ""
@@ -2710,7 +2710,8 @@ msgid ""
" del: del a ignore\n"
" number: number of ignore to delete (look at list to find it)\n"
" -all: delete all ignore\n"
-"nick/host: nick or host to ignore (regular expression allowed)\n"
+"nick/host: nick or host to ignore: syntax is \"re:regex\" or \"mask\" (a "
+"mask is a string with some \"*\" to replace one or more chars)\n"
" server: internal server name where ignore is working\n"
" channel: channel name where ignore is working\n"
"\n"
diff --git a/po/weechat.pot b/po/weechat.pot
index 26d7a5877..8a35ce2ab 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: 2008-10-30 17:11+0100\n"
+"POT-Creation-Date: 2008-10-31 13:01+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"
@@ -202,20 +202,20 @@ msgstr ""
msgid "%sPlugin \"%s\" not found"
msgstr ""
-msgid "Message filtering enabled"
+#, c-format
+msgid " %s[%s%s%s]%s buffer: %s%s%s / tags: %s / regex: %s %s"
msgstr ""
-msgid "Message filtering disabled"
+msgid "(disabled)"
msgstr ""
-msgid "Message filters:"
+msgid "Message filtering enabled"
msgstr ""
-#, c-format
-msgid " %s[%s%s%s]%s buffer: %s%s%s / tags: %s / regex: %s %s"
+msgid "Message filtering disabled"
msgstr ""
-msgid "(disabled)"
+msgid "Message filters:"
msgstr ""
msgid "No message filter defined"
@@ -242,7 +242,7 @@ msgid "%sError: you must specify at least tag(s) or regex for filter"
msgstr ""
#, c-format
-msgid "Filter \"%s\" added"
+msgid "Filter \"%s\" added:"
msgstr ""
#, c-format
@@ -2054,11 +2054,11 @@ msgid "%s%s: server \"%s\" not found"
msgstr ""
#, c-format
-msgid "%s: ignore list:"
+msgid " %s[%s%d%s]%s mask: %s / server: %s / channel: %s"
msgstr ""
#, c-format
-msgid " %s[%s%d%s]%s mask: %s / server: %s / channel: %s"
+msgid "%s: ignore list:"
msgstr ""
#, c-format
@@ -2074,7 +2074,7 @@ msgid "%s%s: ignore already exists"
msgstr ""
#, c-format
-msgid "%s: ignore added"
+msgid "%s: ignore added:"
msgstr ""
#, c-format
@@ -2310,7 +2310,7 @@ msgstr ""
msgid "ignore nicks/hosts from servers or channels"
msgstr ""
-msgid "[list] | [add nick/host [server [channel]]] | [del number|-all]"
+msgid "[list] | [add [re:]nick/host [server [channel]]] | [del number|-all]"
msgstr ""
msgid ""
@@ -2319,7 +2319,8 @@ msgid ""
" del: del a ignore\n"
" number: number of ignore to delete (look at list to find it)\n"
" -all: delete all ignore\n"
-"nick/host: nick or host to ignore (regular expression allowed)\n"
+"nick/host: nick or host to ignore: syntax is \"re:regex\" or \"mask\" (a "
+"mask is a string with some \"*\" to replace one or more chars)\n"
" server: internal server name where ignore is working\n"
" channel: channel name where ignore is working\n"
"\n"
diff --git a/src/core/wee-command.c b/src/core/wee-command.c
index a5d6e73e5..b9b009af5 100644
--- a/src/core/wee-command.c
+++ b/src/core/wee-command.c
@@ -771,6 +771,30 @@ command_command (void *data, struct t_gui_buffer *buffer,
}
/*
+ * command_filter_display: display one filter
+ */
+
+void
+command_filter_display (struct t_gui_filter *filter)
+{
+ gui_chat_printf_date_tags (NULL, 0, GUI_FILTER_TAG_NO_FILTER,
+ _(" %s[%s%s%s]%s buffer: %s%s%s "
+ "/ tags: %s / regex: %s %s"),
+ GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS),
+ GUI_COLOR(GUI_COLOR_CHAT),
+ filter->name,
+ GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS),
+ GUI_COLOR(GUI_COLOR_CHAT),
+ GUI_COLOR(GUI_COLOR_CHAT_BUFFER),
+ filter->buffer,
+ GUI_COLOR(GUI_COLOR_CHAT),
+ filter->tags,
+ filter->regex,
+ (filter->enabled) ?
+ "" : _("(disabled)"));
+}
+
+/*
* command_filter: manage message filters
*/
@@ -787,7 +811,7 @@ command_filter (void *data, struct t_gui_buffer *buffer,
if ((argc == 1)
|| ((argc == 2) && (string_strcasecmp (argv[1], "list") == 0)))
{
- /* display all key bindings */
+ /* display all filters */
gui_chat_printf_date_tags (NULL, 0, GUI_FILTER_TAG_NO_FILTER, "");
gui_chat_printf_date_tags (NULL, 0, GUI_FILTER_TAG_NO_FILTER,
"%s",
@@ -802,21 +826,7 @@ command_filter (void *data, struct t_gui_buffer *buffer,
for (ptr_filter = gui_filters; ptr_filter;
ptr_filter = ptr_filter->next_filter)
{
- gui_chat_printf_date_tags (NULL, 0, GUI_FILTER_TAG_NO_FILTER,
- _(" %s[%s%s%s]%s buffer: %s%s%s "
- "/ tags: %s / regex: %s %s"),
- GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS),
- GUI_COLOR(GUI_COLOR_CHAT),
- ptr_filter->name,
- GUI_COLOR(GUI_COLOR_CHAT_DELIMITERS),
- GUI_COLOR(GUI_COLOR_CHAT),
- GUI_COLOR(GUI_COLOR_CHAT_BUFFER),
- ptr_filter->buffer,
- GUI_COLOR(GUI_COLOR_CHAT),
- ptr_filter->tags,
- ptr_filter->regex,
- (ptr_filter->enabled) ?
- "" : _("(disabled)"));
+ command_filter_display (ptr_filter);
}
}
else
@@ -968,11 +978,15 @@ command_filter (void *data, struct t_gui_buffer *buffer,
return WEECHAT_RC_ERROR;
}
- if (gui_filter_new (1, argv[2], argv[3], argv[4], argv_eol[5]))
+ ptr_filter = gui_filter_new (1, argv[2], argv[3], argv[4], argv_eol[5]);
+
+ if (ptr_filter)
{
+ gui_chat_printf (NULL, "");
gui_chat_printf_date_tags (NULL, 0, GUI_FILTER_TAG_NO_FILTER,
- _("Filter \"%s\" added"),
+ _("Filter \"%s\" added:"),
argv[2]);
+ command_filter_display (ptr_filter);
}
else
{
diff --git a/src/core/wee-string.c b/src/core/wee-string.c
index 232b48df4..cf9a0b8c4 100644
--- a/src/core/wee-string.c
+++ b/src/core/wee-string.c
@@ -716,6 +716,56 @@ string_has_highlight (const char *string, const char *highlight_words)
}
/*
+ * string_mask_to_regex: convert a mask (string with only "*" as joker) 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_explode: explode a string according to separators
* examples:
* string_explode ("abc de fghi", " ", 0, 0, NULL)
diff --git a/src/core/wee-string.h b/src/core/wee-string.h
index 3dc5c5d56..d5042aaf8 100644
--- a/src/core/wee-string.h
+++ b/src/core/wee-string.h
@@ -41,6 +41,7 @@ extern char *string_strip (const char *string, int left, int right,
extern char *string_convert_hex_chars (const char *string);
extern int string_has_highlight (const char *string,
const char *highlight_words);
+extern char *string_mask_to_regex (const char *mask);
extern char **string_explode (const char *string, const char *separators,
int keep_eol, int num_items_max, int *num_items);
extern void string_free_exploded (char **exploded_string);
diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c
index ee7a42ed0..417554955 100644
--- a/src/plugins/irc/irc-command.c
+++ b/src/plugins/irc/irc-command.c
@@ -1303,6 +1303,27 @@ irc_command_halfop (void *data, struct t_gui_buffer *buffer, int argc,
}
/*
+ * irc_command_ignore_display: display a ignore
+ */
+
+void
+irc_command_ignore_display (struct t_irc_ignore *ignore)
+{
+ weechat_printf (NULL,
+ _(" %s[%s%d%s]%s mask: %s / server: %s / channel: %s"),
+ IRC_COLOR_CHAT_DELIMITERS,
+ IRC_COLOR_CHAT,
+ ignore->number,
+ IRC_COLOR_CHAT_DELIMITERS,
+ IRC_COLOR_CHAT,
+ ignore->mask,
+ (ignore->server) ?
+ ignore->server : "*",
+ (ignore->channel) ?
+ ignore->channel : "*");
+}
+
+/*
* irc_command_ignore: add or remove ignore
*/
@@ -1310,9 +1331,8 @@ int
irc_command_ignore (void *data, struct t_gui_buffer *buffer, int argc,
char **argv, char **argv_eol)
{
- int i;
struct t_irc_ignore *ptr_ignore;
- char *mask, *server, *channel, *error;
+ char *mask, *regex, *ptr_regex, *server, *channel, *error;
long number;
/* make C compiler happy */
@@ -1328,23 +1348,10 @@ irc_command_ignore (void *data, struct t_gui_buffer *buffer, int argc,
{
weechat_printf (NULL, "");
weechat_printf (NULL, _("%s: ignore list:"), IRC_PLUGIN_NAME);
- i = 0;
for (ptr_ignore = irc_ignore_list; ptr_ignore;
ptr_ignore = ptr_ignore->next_ignore)
{
- i++;
- weechat_printf (NULL,
- _(" %s[%s%d%s]%s mask: %s / server: %s / channel: %s"),
- IRC_COLOR_CHAT_DELIMITERS,
- IRC_COLOR_CHAT,
- i,
- IRC_COLOR_CHAT_DELIMITERS,
- IRC_COLOR_CHAT,
- ptr_ignore->mask,
- (ptr_ignore->server) ?
- ptr_ignore->server : "*",
- (ptr_ignore->channel) ?
- ptr_ignore->channel : "*");
+ irc_command_ignore_display (ptr_ignore);
}
}
else
@@ -1370,7 +1377,18 @@ irc_command_ignore (void *data, struct t_gui_buffer *buffer, int argc,
server = (argc > 3) ? argv[3] : NULL;
channel = (argc > 4) ? argv[4] : NULL;
- if (irc_ignore_search (mask, server, channel))
+ if (strncmp (mask, "re:", 3) == 0)
+ {
+ regex = NULL;
+ ptr_regex = mask + 3;
+ }
+ else
+ {
+ regex = weechat_string_mask_to_regex (mask);
+ ptr_regex = (regex) ? regex : mask;
+ }
+
+ if (irc_ignore_search (ptr_regex, server, channel))
{
weechat_printf (NULL,
_("%s%s: ignore already exists"),
@@ -1378,9 +1396,16 @@ irc_command_ignore (void *data, struct t_gui_buffer *buffer, int argc,
return WEECHAT_RC_ERROR;
}
- if (irc_ignore_new (mask, server, channel))
+ ptr_ignore = irc_ignore_new (ptr_regex, server, channel);
+
+ if (regex)
+ free (regex);
+
+ if (ptr_ignore)
{
- weechat_printf (NULL, _("%s: ignore added"), IRC_PLUGIN_NAME);
+ weechat_printf (NULL, "");
+ weechat_printf (NULL, _("%s: ignore added:"), IRC_PLUGIN_NAME);
+ irc_command_ignore_display (ptr_ignore);
}
else
{
@@ -3845,7 +3870,7 @@ irc_command_init ()
NULL, &irc_command_halfop, NULL);
weechat_hook_command ("ignore",
N_("ignore nicks/hosts from servers or channels"),
- N_("[list] | [add nick/host [server [channel]]] | "
+ N_("[list] | [add [re:]nick/host [server [channel]]] | "
"[del number|-all]"),
N_(" list: list all ignore\n"
" add: add a ignore\n"
@@ -3853,8 +3878,9 @@ irc_command_init ()
" number: number of ignore to delete (look at "
"list to find it)\n"
" -all: delete all ignore\n"
- "nick/host: nick or host to ignore (regular "
- "expression allowed)\n"
+ "nick/host: nick or host to ignore: syntax is "
+ "\"re:regex\" or \"mask\" (a mask is a string with "
+ "some \"*\" to replace one or more chars)\n"
" server: internal server name where ignore "
"is working\n"
" channel: channel name where ignore is "
diff --git a/src/plugins/irc/irc-ignore.c b/src/plugins/irc/irc-ignore.c
index d69b05edf..f4434d3e9 100644
--- a/src/plugins/irc/irc-ignore.c
+++ b/src/plugins/irc/irc-ignore.c
@@ -96,15 +96,12 @@ struct t_irc_ignore *
irc_ignore_search_by_number (int number)
{
struct t_irc_ignore *ptr_ignore;
- int i;
- i = 1;
for (ptr_ignore = irc_ignore_list; ptr_ignore;
ptr_ignore = ptr_ignore->next_ignore)
{
- if (i == number)
+ if (ptr_ignore->number == number)
return ptr_ignore;
- i++;
}
/* ignore not found */
@@ -137,6 +134,7 @@ irc_ignore_new (const char *mask, const char *server, const char *channel)
new_ignore = malloc (sizeof (*new_ignore));
if (new_ignore)
{
+ new_ignore->number = (last_irc_ignore) ? last_irc_ignore->number + 1 : 1;
new_ignore->mask = strdup (mask);
new_ignore->regex_mask = regex;
new_ignore->server = (server) ? strdup (server) : strdup ("*");
@@ -212,9 +210,18 @@ irc_ignore_check (struct t_irc_server *server, struct t_irc_channel *channel,
void
irc_ignore_free (struct t_irc_ignore *ignore)
{
+ struct t_irc_ignore *ptr_ignore;
+
weechat_hook_signal_send ("irc_ignore_removing",
WEECHAT_HOOK_SIGNAL_POINTER, ignore);
+ /* decrement number for all ignore after this one */
+ for (ptr_ignore = ignore->next_ignore; ptr_ignore;
+ ptr_ignore = ptr_ignore->next_ignore)
+ {
+ ptr_ignore->number--;
+ }
+
/* free data */
if (ignore->mask)
free (ignore->mask);
diff --git a/src/plugins/irc/irc-ignore.h b/src/plugins/irc/irc-ignore.h
index ba9ac7c55..660b80bc4 100644
--- a/src/plugins/irc/irc-ignore.h
+++ b/src/plugins/irc/irc-ignore.h
@@ -27,6 +27,7 @@ struct t_irc_channel;
struct t_irc_ignore
{
+ int number; /* ignore number */
char *mask; /* nick / host mask */
regex_t *regex_mask; /* regex for mask */
char *server; /* server name */
diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c
index e4a34cd82..07df6adee 100644
--- a/src/plugins/plugin.c
+++ b/src/plugins/plugin.c
@@ -312,6 +312,7 @@ plugin_load (const char *filename)
new_plugin->string_remove_quotes = &string_remove_quotes;
new_plugin->string_strip = &string_strip;
new_plugin->string_has_highlight = &string_has_highlight;
+ new_plugin->string_mask_to_regex = &string_mask_to_regex;
new_plugin->string_explode = &string_explode;
new_plugin->string_free_exploded = &string_free_exploded;
new_plugin->string_split_command = &string_split_command;
diff --git a/src/plugins/weechat-plugin.h b/src/plugins/weechat-plugin.h
index 6a63fd4ae..d88609547 100644
--- a/src/plugins/weechat-plugin.h
+++ b/src/plugins/weechat-plugin.h
@@ -146,6 +146,7 @@ struct t_weechat_plugin
const char *chars);
int (*string_has_highlight) (const char *string,
const char *highlight_words);
+ char *(*string_mask_to_regex) (const char *mask);
char **(*string_explode) (const char *string, const char *separators,
int keep_eol, int num_items_max, int *num_items);
void (*string_free_exploded) (char **exploded_string);
@@ -616,6 +617,8 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin);
weechat_plugin->string_strip(__string, __left, __right, __chars)
#define weechat_string_has_highlight(__string, __highlight_words) \
weechat_plugin->string_has_highlight(__string, __highlight_words)
+#define weechat_string_mask_to_regex(__mask) \
+ weechat_plugin->string_mask_to_regex(__mask)
#define weechat_string_explode(__string, __separator, __eol, __max, \
__num_items) \
weechat_plugin->string_explode(__string, __separator, __eol, \