summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2007-01-02 14:54:07 +0000
committergeniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2007-01-02 14:54:07 +0000
commit2c390a19295d497256d49620fe7537503d320828 (patch)
treef3b8886b9a67749d5ed77d13d5fa0bf77726ab9a
parentba36a782319f4e22d32dabe82c3087bee39e4a7e (diff)
BUILD : 1.7.18 (1218) BUGS : 622 NOTES : Fixed ChanServ LIST to now search for <#chan> if only <chan> is given; Fixed all LIST commands to give error reporting when specifying incorrect ranges.
git-svn-id: svn://svn.anope.org/anope/trunk@1218 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@937 5417fbe8-f217-4b02-8779-1006273d7864
-rw-r--r--Changes2
-rw-r--r--lang/cat.l13
-rw-r--r--lang/de.l13
-rw-r--r--lang/en_us.l9
-rw-r--r--lang/es.l13
-rw-r--r--lang/fr.l13
-rw-r--r--lang/gr.l13
-rw-r--r--lang/hun.l13
-rw-r--r--lang/it.l13
-rw-r--r--lang/nl.l14
-rw-r--r--lang/pl.l13
-rw-r--r--lang/pt.l13
-rw-r--r--lang/ru.l13
-rw-r--r--lang/tr.l13
-rw-r--r--src/core/cs_list.c21
-rw-r--r--src/core/hs_list.c4
-rw-r--r--src/core/ns_list.c4
-rw-r--r--version.log6
18 files changed, 199 insertions, 4 deletions
diff --git a/Changes b/Changes
index 47667edb2..d506055ac 100644
--- a/Changes
+++ b/Changes
@@ -2,6 +2,8 @@ Anope Version S V N
--------------------
01/01 A Support for InspIRCd 1.1. [ #00]
01/02 F Issues with both InspIRCd protocol modules. [ #00]
+01/02 F Error reporting on LIST commands accepting ranges. [#622]
+01/02 F ChanServ LIST now searches for '#chan' if only 'chan' is given. [#622]
Anope Version 1.7.18
--------------------
diff --git a/lang/cat.l b/lang/cat.l
index 5417ef3a7..89495a674 100644
--- a/lang/cat.l
+++ b/lang/cat.l
@@ -296,6 +296,19 @@ END_OF_ANY_LIST
###########################################################################
# Automatic messages
+LIST_INCORRECT_RANGE
+ Incorrect range specified. The correct syntax is #from-to.
+CS_LIST_INCORRECT_RANGE
+ To search for channels starting with #, search for the channel
+ name without the #-sign prepended (anope instead of #anope).
+
+###########################################################################
+#
+# NickServ messages
+#
+###########################################################################
+
+# Automatic messages
NICK_IS_REGISTERED
Aquest nick pertany a un altra persona. Per favor escull un altre nick.
(Si aquest es el teu nick, escriu %R%s IDENTIFY clau.)
diff --git a/lang/de.l b/lang/de.l
index bfe45cef3..7edacac66 100644
--- a/lang/de.l
+++ b/lang/de.l
@@ -318,6 +318,19 @@ END_OF_ANY_LIST
###########################################################################
# Automatic messages
+LIST_INCORRECT_RANGE
+ Incorrect range specified. The correct syntax is #from-to.
+CS_LIST_INCORRECT_RANGE
+ To search for channels starting with #, search for the channel
+ name without the #-sign prepended (anope instead of #anope).
+
+###########################################################################
+#
+# NickServ messages
+#
+###########################################################################
+
+# Automatic messages
NICK_IS_REGISTERED
Dieser Nickname gehört schon jemand anderem. Bitte wähle einen anderen.
(Sollte dieser Nickname dir gehören, tippe %R%s IDENTIFY Passwort.)
diff --git a/lang/en_us.l b/lang/en_us.l
index 7bb8dccd7..c308a2255 100644
--- a/lang/en_us.l
+++ b/lang/en_us.l
@@ -46,7 +46,7 @@
# For languages other than English, this string should have the following
# format:
# language-name-in-language (language-name-in-English)
-# For example, "Español (Spanish)" or "Français (French)".
+# For example, "Espa�l (Spanish)" or "Fran�is (French)".
LANG_NAME
English
@@ -288,6 +288,13 @@ EXPIRES_1D
END_OF_ANY_LIST
End of %s list.
+# Generic List error messages
+LIST_INCORRECT_RANGE
+ Incorrect range specified. The correct syntax is #from-to.
+CS_LIST_INCORRECT_RANGE
+ To search for channels starting with #, search for the channel
+ name without the #-sign prepended (anope instead of #anope).
+
###########################################################################
#
# NickServ messages
diff --git a/lang/es.l b/lang/es.l
index f53da774b..3e3eaffb3 100644
--- a/lang/es.l
+++ b/lang/es.l
@@ -301,6 +301,19 @@ END_OF_ANY_LIST
###########################################################################
# Automatic messages
+LIST_INCORRECT_RANGE
+ Incorrect range specified. The correct syntax is #from-to.
+CS_LIST_INCORRECT_RANGE
+ To search for channels starting with #, search for the channel
+ name without the #-sign prepended (anope instead of #anope).
+
+###########################################################################
+#
+# NickServ messages
+#
+###########################################################################
+
+# Automatic messages
NICK_IS_REGISTERED
Este nick pertenece a otra persona. Por favor elige otro nick.
(Si este es tu nick, tipea %R%s IDENTIFY clave.)
diff --git a/lang/fr.l b/lang/fr.l
index 6a12fcf46..61df533af 100644
--- a/lang/fr.l
+++ b/lang/fr.l
@@ -301,6 +301,19 @@ END_OF_ANY_LIST
###########################################################################
# Automatic messages
+LIST_INCORRECT_RANGE
+ Incorrect range specified. The correct syntax is #from-to.
+CS_LIST_INCORRECT_RANGE
+ To search for channels starting with #, search for the channel
+ name without the #-sign prepended (anope instead of #anope).
+
+###########################################################################
+#
+# NickServ messages
+#
+###########################################################################
+
+# Automatic messages
NICK_IS_REGISTERED
Ce nick appartient à quelqu'un d'autre. Veuillez en changer.
(Si c'est votre nick, tapez %R%s IDENTIFY motdepasse.)
diff --git a/lang/gr.l b/lang/gr.l
index 815a4d584..d6ac42208 100644
--- a/lang/gr.l
+++ b/lang/gr.l
@@ -295,6 +295,19 @@ END_OF_ANY_LIST
###########################################################################
# Automatic messages
+LIST_INCORRECT_RANGE
+ Incorrect range specified. The correct syntax is #from-to.
+CS_LIST_INCORRECT_RANGE
+ To search for channels starting with #, search for the channel
+ name without the #-sign prepended (anope instead of #anope).
+
+###########################################################################
+#
+# NickServ messages
+#
+###########################################################################
+
+# Automatic messages
NICK_IS_REGISTERED
Áõôü ôï øåõäþíõìï áíÞêåé óå êÜðïéïí Üëëïí. Ðáñáêáëþ äéÜëåîå êÜðïéï Üëëï.
(Áí áõôü åßíáé ôï øåõäþíõìü óïõ, ãñÜøå %R%s IDENTIFY ^_êùäéêü^_.)
diff --git a/lang/hun.l b/lang/hun.l
index e6fb38b11..0237252ca 100644
--- a/lang/hun.l
+++ b/lang/hun.l
@@ -305,6 +305,19 @@ END_OF_ANY_LIST
##########################################################
# Automatikus üzenetek
+LIST_INCORRECT_RANGE
+ Incorrect range specified. The correct syntax is #from-to.
+CS_LIST_INCORRECT_RANGE
+ To search for channels starting with #, search for the channel
+ name without the #-sign prepended (anope instead of #anope).
+
+###########################################################################
+#
+# NickServ messages
+#
+###########################################################################
+
+# Automatic messages
NICK_IS_REGISTERED
Ez a nick már regisztrált. Kérlek válassz másikat.
Ha ez a te nicked, akkor %R%s IDENTIFY jelszó!
diff --git a/lang/it.l b/lang/it.l
index 4d30a0450..5539d42d9 100644
--- a/lang/it.l
+++ b/lang/it.l
@@ -297,6 +297,19 @@ END_OF_ANY_LIST
###########################################################################
# Automatic messages
+LIST_INCORRECT_RANGE
+ Incorrect range specified. The correct syntax is #from-to.
+CS_LIST_INCORRECT_RANGE
+ To search for channels starting with #, search for the channel
+ name without the #-sign prepended (anope instead of #anope).
+
+###########################################################################
+#
+# NickServ messages
+#
+###########################################################################
+
+# Automatic messages
NICK_IS_REGISTERED
Questo nick appartiene a qualcun altro. Per favore scegline un altro.
(Se questo è il tuo nick, digita %R%s IDENTIFY password.)
diff --git a/lang/nl.l b/lang/nl.l
index f7f2a0476..26478327a 100644
--- a/lang/nl.l
+++ b/lang/nl.l
@@ -298,6 +298,20 @@ END_OF_ANY_LIST
###########################################################################
# Automatic messages
+LIST_INCORRECT_RANGE
+ Ongeldig bereik opgegeven. Het correct gebruik is #van-tot.
+CS_LIST_INCORRECT_RANGE
+ Om te zoeken naar kanalen die met een # beginnen moet gezocht
+ worden naar de kanaalnaam zonder het #-teken ervoor (anope
+ in plaats van #anope).
+
+###########################################################################
+#
+# NickServ messages
+#
+###########################################################################
+
+# Automatic messages
NICK_IS_REGISTERED
Deze nick is eigendom van iemand anders. Kies een andere.
(Als dit jouw nick is, type %R%s IDENTIFY wachtwoord.)
diff --git a/lang/pl.l b/lang/pl.l
index df1c9bd97..6fb5176b4 100644
--- a/lang/pl.l
+++ b/lang/pl.l
@@ -321,6 +321,19 @@ END_OF_ANY_LIST
###########################################################################
# Automatic messages
+LIST_INCORRECT_RANGE
+ Incorrect range specified. The correct syntax is #from-to.
+CS_LIST_INCORRECT_RANGE
+ To search for channels starting with #, search for the channel
+ name without the #-sign prepended (anope instead of #anope).
+
+###########################################################################
+#
+# NickServ messages
+#
+###########################################################################
+
+# Automatic messages
NICK_IS_REGISTERED
Ten nick jest zarejestrowany. Je¶li to Twój nick,
wpisz: %R%s IDENTIFY has³o
diff --git a/lang/pt.l b/lang/pt.l
index df788138f..8c9972d6a 100644
--- a/lang/pt.l
+++ b/lang/pt.l
@@ -305,6 +305,19 @@ END_OF_ANY_LIST
###########################################################################
# Automatic messages
+LIST_INCORRECT_RANGE
+ Incorrect range specified. The correct syntax is #from-to.
+CS_LIST_INCORRECT_RANGE
+ To search for channels starting with #, search for the channel
+ name without the #-sign prepended (anope instead of #anope).
+
+###########################################################################
+#
+# NickServ messages
+#
+###########################################################################
+
+# Automatic messages
NICK_IS_REGISTERED
Este nick foi registrado por outra pessoa. Por favor escolha outro.
(Se este for seu nick, digite %R%s IDENTIFY senha.)
diff --git a/lang/ru.l b/lang/ru.l
index cb8558164..406fb0864 100644
--- a/lang/ru.l
+++ b/lang/ru.l
@@ -301,6 +301,19 @@ END_OF_ANY_LIST
###########################################################################
# Automatic messages
+LIST_INCORRECT_RANGE
+ Incorrect range specified. The correct syntax is #from-to.
+CS_LIST_INCORRECT_RANGE
+ To search for channels starting with #, search for the channel
+ name without the #-sign prepended (anope instead of #anope).
+
+###########################################################################
+#
+# NickServ messages
+#
+###########################################################################
+
+# Automatic messages
NICK_IS_REGISTERED
Ýòîò íèê çàðåãèñòðèðîâàí è èñïîëüçóåòñÿ. Âûáåðèòå, ïîæàëóéñòà, äðóãîé íèê.
(Åñëè ýòî Âàø íèê, íàïèøèòå êîìàíäó %R%s IDENTIFY password.)
diff --git a/lang/tr.l b/lang/tr.l
index 7560dbab7..22cda2477 100644
--- a/lang/tr.l
+++ b/lang/tr.l
@@ -300,6 +300,19 @@ END_OF_ANY_LIST
###########################################################################
# Automatic messages
+LIST_INCORRECT_RANGE
+ Incorrect range specified. The correct syntax is #from-to.
+CS_LIST_INCORRECT_RANGE
+ To search for channels starting with #, search for the channel
+ name without the #-sign prepended (anope instead of #anope).
+
+###########################################################################
+#
+# NickServ messages
+#
+###########################################################################
+
+# Automatic messages
NICK_IS_REGISTERED
Bu nick baþkasýna ait. Lütfen baþka bir tane seçin.
(Eðer bu sizin nickiniz ise, %R%s IDENTIFY þifreniz yazýnýz.)
diff --git a/src/core/cs_list.c b/src/core/cs_list.c
index 315f92cc7..7fa43a12a 100644
--- a/src/core/cs_list.c
+++ b/src/core/cs_list.c
@@ -72,6 +72,8 @@ void myChanServHelp(User * u)
int do_list(User * u)
{
char *pattern = strtok(NULL, " ");
+ int spattern_size;
+ char *spattern;
ChannelInfo *ci;
int nchans, i;
char buf[BUFSIZE];
@@ -97,11 +99,15 @@ int do_list(User * u)
if (pattern[0] == '#') {
tmp = myStrGetOnlyToken((pattern + 1), '-', 0); /* Read FROM out */
if (!tmp) {
+ notice_lang(s_ChanServ, u, LIST_INCORRECT_RANGE);
+ notice_lang(s_ChanServ, u, CS_LIST_INCORRECT_RANGE);
return MOD_CONT;
}
for (s = tmp; *s; s++) {
if (!isdigit(*s)) {
free(tmp);
+ notice_lang(s_ChanServ, u, LIST_INCORRECT_RANGE);
+ notice_lang(s_ChanServ, u, CS_LIST_INCORRECT_RANGE);
return MOD_CONT;
}
}
@@ -109,11 +115,15 @@ int do_list(User * u)
free(tmp);
tmp = myStrGetTokenRemainder(pattern, '-', 1); /* Read TO out */
if (!tmp) {
+ notice_lang(s_ChanServ, u, LIST_INCORRECT_RANGE);
+ notice_lang(s_ChanServ, u, CS_LIST_INCORRECT_RANGE);
return MOD_CONT;
}
for (s = tmp; *s; s++) {
if (!isdigit(*s)) {
free(tmp);
+ notice_lang(s_ChanServ, u, LIST_INCORRECT_RANGE);
+ notice_lang(s_ChanServ, u, CS_LIST_INCORRECT_RANGE);
return MOD_CONT;
}
}
@@ -134,6 +144,11 @@ int do_list(User * u)
if (stricmp(keyword, "NOEXPIRE") == 0)
matchflags |= CI_NO_EXPIRE;
}
+
+ spattern_size = (strlen(pattern) + 2) * sizeof(char);
+ spattern = smalloc(spattern_size);
+ snprintf(spattern, spattern_size, "#%s", pattern);
+
notice_lang(s_ChanServ, u, CHAN_LIST_HEADER, pattern);
for (i = 0; i < 256; i++) {
@@ -144,8 +159,10 @@ int do_list(User * u)
if ((matchflags != 0) && !(ci->flags & matchflags))
continue;
- if (stricmp(pattern, ci->name) == 0
- || match_wild_nocase(pattern, ci->name)) {
+ if ((stricmp(pattern, ci->name) == 0)
+ || (stricmp(spattern, ci->name) == 0)
+ || match_wild_nocase(pattern, ci->name)
+ || match_wild_nocase(spattern, ci->name)) {
if ((((count + 1 >= from) && (count + 1 <= to))
|| ((from == 0) && (to == 0)))
&& (++nchans <= CSListMax)) {
diff --git a/src/core/hs_list.c b/src/core/hs_list.c
index ac26a2d0b..1dc209196 100644
--- a/src/core/hs_list.c
+++ b/src/core/hs_list.c
@@ -93,11 +93,13 @@ int listOut(User * u)
if (key[0] == '#') {
tmp = myStrGetOnlyToken((key + 1), '-', 0); /* Read FROM out */
if (!tmp) {
+ notice_lang(s_ChanServ, u, LIST_INCORRECT_RANGE);
return MOD_CONT;
}
for (s = tmp; *s; s++) {
if (!isdigit(*s)) {
free(tmp);
+ notice_lang(s_ChanServ, u, LIST_INCORRECT_RANGE);
return MOD_CONT;
}
}
@@ -105,11 +107,13 @@ int listOut(User * u)
free(tmp);
tmp = myStrGetTokenRemainder(key, '-', 1); /* Read TO out */
if (!tmp) {
+ notice_lang(s_ChanServ, u, LIST_INCORRECT_RANGE);
return MOD_CONT;
}
for (s = tmp; *s; s++) {
if (!isdigit(*s)) {
free(tmp);
+ notice_lang(s_ChanServ, u, LIST_INCORRECT_RANGE);
return MOD_CONT;
}
}
diff --git a/src/core/ns_list.c b/src/core/ns_list.c
index 91cd2d356..d8a67a4eb 100644
--- a/src/core/ns_list.c
+++ b/src/core/ns_list.c
@@ -114,11 +114,13 @@ int do_list(User * u)
if (pattern[0] == '#') {
tmp = myStrGetOnlyToken((pattern + 1), '-', 0); /* Read FROM out */
if (!tmp) {
+ notice_lang(s_ChanServ, u, LIST_INCORRECT_RANGE);
return MOD_CONT;
}
for (s = tmp; *s; s++) {
if (!isdigit(*s)) {
free(tmp);
+ notice_lang(s_ChanServ, u, LIST_INCORRECT_RANGE);
return MOD_CONT;
}
}
@@ -126,11 +128,13 @@ int do_list(User * u)
free(tmp);
tmp = myStrGetTokenRemainder(pattern, '-', 1); /* Read TO out */
if (!tmp) {
+ notice_lang(s_ChanServ, u, LIST_INCORRECT_RANGE);
return MOD_CONT;
}
for (s = tmp; *s; s++) {
if (!isdigit(*s)) {
free(tmp);
+ notice_lang(s_ChanServ, u, LIST_INCORRECT_RANGE);
return MOD_CONT;
}
}
diff --git a/version.log b/version.log
index b6e235609..5146b350e 100644
--- a/version.log
+++ b/version.log
@@ -9,10 +9,14 @@ VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="18"
VERSION_EXTRA="-svn"
-VERSION_BUILD="1217"
+VERSION_BUILD="1218"
# $Log$
#
+# BUILD : 1.7.18 (1218)
+# BUGS : 622
+# NOTES : Fixed ChanServ LIST to now search for <#chan> if only <chan> is given; Fixed all LIST commands to give error reporting when specifying incorrect ranges.
+#
# BUILD : 1.7.18 (1217)
# BUGS :
# NOTES : Fixed small mistakes in both InspIRCd protocol modules