From 4b8b499383a9646cbfb87e0b8ac3ee918eb202c5 Mon Sep 17 00:00:00 2001 From: "rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b" Date: Fri, 13 May 2005 08:25:40 +0000 Subject: BUILD : 1.7.9 (792) BUGS : N/A NOTES : Added a check for last_quit when infoing a suspended nick, this should never happen, but it seems a few networks have odd databases which are using the suspend flag for something else, i think its related to networks that have merged databases, but i dont know, anyway, we check for it before using it now. (this dosnt fix the fact they are using a nc->flag that core wants for something else) git-svn-id: svn://svn.anope.org/anope/trunk@792 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@551 5417fbe8-f217-4b02-8779-1006273d7864 --- lang/cat.l | 2 ++ lang/de.l | 3 +++ lang/en_us.l | 2 ++ lang/es.l | 3 +++ lang/fr.l | 3 +++ lang/gr.l | 2 ++ lang/hun.l | 2 ++ lang/it.l | 2 ++ lang/nl.l | 2 ++ lang/pl.l | 2 ++ lang/pt.l | 2 ++ lang/ru.l | 2 ++ lang/tr.l | 2 ++ src/core/cs_list.c | 19 +++++++------------ src/core/ns_info.c | 9 +++++++-- src/core/ns_list.c | 16 ++++++---------- version.log | 11 ++++++++++- 17 files changed, 59 insertions(+), 25 deletions(-) diff --git a/lang/cat.l b/lang/cat.l index 9738a4b60..b022c1cb6 100644 --- a/lang/cat.l +++ b/lang/cat.l @@ -627,6 +627,8 @@ NICK_INFO_FOR_MORE # LIST responses NICK_INFO_SUSPENDED This nickname is currently suspended, reason: %s +NICK_INFO_SUSPENDED_NO_REASON + This nickname is currently suspended # LIST responses NICK_LIST_SYNTAX diff --git a/lang/de.l b/lang/de.l index 51db20c5d..b85f20ba0 100644 --- a/lang/de.l +++ b/lang/de.l @@ -643,6 +643,9 @@ NICK_INFO_FOR_MORE # LIST responses NICK_INFO_SUSPENDED Dieser Nickname ist zur Zeit suspended, Grund: %s +NICK_INFO_SUSPENDED_NO_REASON + Dieser Nickname ist zur Zeit suspended + # LIST responses NICK_LIST_SYNTAX diff --git a/lang/en_us.l b/lang/en_us.l index 81fbe968d..77c19838b 100644 --- a/lang/en_us.l +++ b/lang/en_us.l @@ -615,6 +615,8 @@ NICK_INFO_FOR_MORE For more verbose information, type /msg %s INFO %s ALL. NICK_INFO_SUSPENDED This nickname is currently suspended, reason: %s +NICK_INFO_SUSPENDED_NO_REASON + This nickname is currently suspended # LIST responses NICK_LIST_SYNTAX diff --git a/lang/es.l b/lang/es.l index 9dd77b032..117c4b179 100644 --- a/lang/es.l +++ b/lang/es.l @@ -631,6 +631,9 @@ NICK_INFO_FOR_MORE # LIST responses NICK_INFO_SUSPENDED This nickname is currently suspended, reason: %s +NICK_INFO_SUSPENDED_NO_REASON + This nickname is currently suspended + # LIST responses NICK_LIST_SYNTAX diff --git a/lang/fr.l b/lang/fr.l index 4ec39ccc1..4febec5fb 100644 --- a/lang/fr.l +++ b/lang/fr.l @@ -629,6 +629,9 @@ NICK_INFO_FOR_MORE # LIST responses NICK_INFO_SUSPENDED This nickname is currently suspended, reason: %s +NICK_INFO_SUSPENDED_NO_REASON + This nickname is currently suspended + # LIST responses NICK_LIST_SYNTAX diff --git a/lang/gr.l b/lang/gr.l index c17d2988d..d1d5df89b 100644 --- a/lang/gr.l +++ b/lang/gr.l @@ -625,6 +625,8 @@ NICK_INFO_FOR_MORE # LIST responses NICK_INFO_SUSPENDED This nickname is currently suspended, reason: %s +NICK_INFO_SUSPENDED_NO_REASON + This nickname is currently suspended # LIST responses NICK_LIST_SYNTAX diff --git a/lang/hun.l b/lang/hun.l index 3957a965f..20dc2c29e 100644 --- a/lang/hun.l +++ b/lang/hun.l @@ -624,6 +624,8 @@ NICK_INFO_FOR_MORE # LIST válaszok NICK_INFO_SUSPENDED This nickname is currently suspended, reason: %s +NICK_INFO_SUSPENDED_NO_REASON + This nickname is currently suspended # LIST responses NICK_LIST_SYNTAX diff --git a/lang/it.l b/lang/it.l index 5c8cc5de5..31cc76c6d 100644 --- a/lang/it.l +++ b/lang/it.l @@ -626,6 +626,8 @@ NICK_INFO_FOR_MORE # LIST responses NICK_INFO_SUSPENDED This nickname is currently suspended, reason: %s +NICK_INFO_SUSPENDED_NO_REASON + This nickname is currently suspended # LIST responses NICK_LIST_SYNTAX diff --git a/lang/nl.l b/lang/nl.l index ad409268c..d5ca2d19f 100644 --- a/lang/nl.l +++ b/lang/nl.l @@ -628,6 +628,8 @@ NICK_INFO_FOR_MORE # LIST responses NICK_INFO_SUSPENDED Deze nick is tijdelijk buiten werking gesteld, reden: %s +NICK_INFO_SUSPENDED_NO_REASON + Deze nick is tijdelijk buiten werking gesteld # LIST responses NICK_LIST_SYNTAX diff --git a/lang/pl.l b/lang/pl.l index 0108f8f1b..34c2dde01 100644 --- a/lang/pl.l +++ b/lang/pl.l @@ -679,6 +679,8 @@ NICK_INFO_FOR_MORE # LIST responses NICK_INFO_SUSPENDED This nickname is currently suspended, reason: %s +NICK_INFO_SUSPENDED_NO_REASON + This nickname is currently suspended # LIST responses NICK_LIST_SYNTAX diff --git a/lang/pt.l b/lang/pt.l index 762e2b17d..c47667a5a 100644 --- a/lang/pt.l +++ b/lang/pt.l @@ -628,6 +628,8 @@ NICK_INFO_FOR_MORE # LIST responses NICK_INFO_SUSPENDED This nickname is currently suspended, reason: %s +NICK_INFO_SUSPENDED_NO_REASON + This nickname is currently suspended # LIST responses NICK_LIST_SYNTAX diff --git a/lang/ru.l b/lang/ru.l index 19bb4a192..b7ed8f29e 100644 --- a/lang/ru.l +++ b/lang/ru.l @@ -625,6 +625,8 @@ NICK_INFO_FOR_MORE # LIST responses NICK_INFO_SUSPENDED This nickname is currently suspended, reason: %s +NICK_INFO_SUSPENDED_NO_REASON + This nickname is currently suspended # LIST responses NICK_LIST_SYNTAX diff --git a/lang/tr.l b/lang/tr.l index 18d0a95aa..648658a28 100644 --- a/lang/tr.l +++ b/lang/tr.l @@ -631,6 +631,8 @@ NICK_INFO_FOR_MORE # LIST responses NICK_INFO_SUSPENDED This nickname is currently suspended, reason: %s +NICK_INFO_SUSPENDED_NO_REASON + This nickname is currently suspended # LIST responses NICK_LIST_SYNTAX diff --git a/src/core/cs_list.c b/src/core/cs_list.c index cda14a1df..04e84ecf4 100644 --- a/src/core/cs_list.c +++ b/src/core/cs_list.c @@ -32,18 +32,9 @@ int AnopeInit(int argc, char **argv) moduleAddVersion("$Id$"); moduleSetType(CORE); - if (CSListOpersOnly) { - c = createCommand("LIST", do_list, is_oper, -1, CHAN_HELP_LIST, - CHAN_SERVADMIN_HELP_LIST, - CHAN_SERVADMIN_HELP_LIST, - CHAN_SERVADMIN_HELP_LIST); - - } else { - c = createCommand("LIST", do_list, NULL, -1, CHAN_HELP_LIST, - CHAN_SERVADMIN_HELP_LIST, - CHAN_SERVADMIN_HELP_LIST, - CHAN_SERVADMIN_HELP_LIST); - } + c = createCommand("LIST", do_list, NULL, -1, CHAN_HELP_LIST, + CHAN_SERVADMIN_HELP_LIST, + CHAN_SERVADMIN_HELP_LIST, CHAN_SERVADMIN_HELP_LIST); moduleAddCommand(CHANSERV, c, MOD_UNIQUE); @@ -91,6 +82,10 @@ int do_list(User * u) char *keyword; int32 matchflags = 0; + if (!(!CSListOpersOnly || (is_oper(u)))) { + notice_lang(s_ChanServ, u, ACCESS_DENIED); + return MOD_STOP; + } if (!pattern) { syntax_error(s_ChanServ, u, "LIST", diff --git a/src/core/ns_info.c b/src/core/ns_info.c index 1f150b7c3..bb4c613ac 100644 --- a/src/core/ns_info.c +++ b/src/core/ns_info.c @@ -245,8 +245,13 @@ int do_info(User * u) *buf ? buf : getstring(u->na, NICK_INFO_OPT_NONE)); if (na->nc->flags & NI_SUSPENDED) { - notice_lang(s_NickServ, u, NICK_INFO_SUSPENDED, - na->last_quit); + if (na->last_quit) { + notice_lang(s_NickServ, u, NICK_INFO_SUSPENDED, + na->last_quit); + } else { + notice_lang(s_NickServ, u, + NICK_INFO_SUSPENDED_NO_REASON); + } } if (na->status & NS_NO_EXPIRE) { diff --git a/src/core/ns_list.c b/src/core/ns_list.c index a06c78f9a..825406acd 100644 --- a/src/core/ns_list.c +++ b/src/core/ns_list.c @@ -32,15 +32,8 @@ int AnopeInit(int argc, char **argv) moduleAddVersion("$Id$"); moduleSetType(CORE); - if (NSListOpersOnly) { - c = createCommand("LIST", do_list, is_oper, -1, NICK_HELP_LIST, -1, - NICK_SERVADMIN_HELP_LIST, - NICK_SERVADMIN_HELP_LIST); - } else { - c = createCommand("LIST", do_list, NULL, -1, NICK_HELP_LIST, -1, - NICK_SERVADMIN_HELP_LIST, - NICK_SERVADMIN_HELP_LIST); - } + c = createCommand("LIST", do_list, NULL, -1, NICK_HELP_LIST, -1, + NICK_SERVADMIN_HELP_LIST, NICK_SERVADMIN_HELP_LIST); moduleAddCommand(NICKSERV, c, MOD_UNIQUE); @@ -106,7 +99,10 @@ int do_list(User * u) char *tmp = NULL; char *s = NULL; - + if (!(!NSListOpersOnly || (is_oper(u)))) { /* reverse the help logic */ + notice_lang(s_NickServ, u, ACCESS_DENIED); + return MOD_STOP; + } if (!pattern) { syntax_error(s_NickServ, u, "LIST", diff --git a/version.log b/version.log index c87ba0f26..78eb67c97 100644 --- a/version.log +++ b/version.log @@ -8,10 +8,19 @@ VERSION_MAJOR="1" VERSION_MINOR="7" VERSION_PATCH="9" -VERSION_BUILD="790" +VERSION_BUILD="792" # $Log$ # +# BUILD : 1.7.9 (792) +# BUGS : N/A +# NOTES : Added a check for last_quit when infoing a suspended nick, this should never happen, but it seems a few networks have odd databases which are using the suspend flag for something else, i think its related to networks that have merged databases, but i dont know, anyway, we check for it before using it now. (this dosnt fix the fact they are using a nc->flag that core wants for something else) +# +# +# BUILD : 1.7.9 (791) +# BUGS : N/A +# NOTES : PARAM_RELOAD works for NSListOpersOnly etc again *grumbles at heniz* +# # BUILD : 1.7.9 (790) # BUGS : N/A # NOTES : Removed some comments from config.c -- cgit