diff options
-rw-r--r-- | Changes | 2 | ||||
-rw-r--r-- | lang/cat.l | 13 | ||||
-rw-r--r-- | lang/de.l | 13 | ||||
-rw-r--r-- | lang/en_us.l | 9 | ||||
-rw-r--r-- | lang/es.l | 13 | ||||
-rw-r--r-- | lang/fr.l | 13 | ||||
-rw-r--r-- | lang/gr.l | 13 | ||||
-rw-r--r-- | lang/hun.l | 13 | ||||
-rw-r--r-- | lang/it.l | 13 | ||||
-rw-r--r-- | lang/nl.l | 14 | ||||
-rw-r--r-- | lang/pl.l | 13 | ||||
-rw-r--r-- | lang/pt.l | 13 | ||||
-rw-r--r-- | lang/ru.l | 13 | ||||
-rw-r--r-- | lang/tr.l | 13 | ||||
-rw-r--r-- | src/core/cs_list.c | 21 | ||||
-rw-r--r-- | src/core/hs_list.c | 4 | ||||
-rw-r--r-- | src/core/ns_list.c | 4 | ||||
-rw-r--r-- | version.log | 6 |
18 files changed, 199 insertions, 4 deletions
@@ -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.) @@ -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 @@ -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.) @@ -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.) @@ -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ó! @@ -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.) @@ -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.) @@ -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 @@ -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.) @@ -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.) @@ -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 |