summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorrob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2005-05-13 08:25:40 +0000
committerrob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2005-05-13 08:25:40 +0000
commit4b8b499383a9646cbfb87e0b8ac3ee918eb202c5 (patch)
tree900585649b2b62dc9d97271a382d8cdde82d6025 /src/core
parentdada762c9eda63dcd5101865aafb244e67c5b22e (diff)
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
Diffstat (limited to 'src/core')
-rw-r--r--src/core/cs_list.c19
-rw-r--r--src/core/ns_info.c9
-rw-r--r--src/core/ns_list.c16
3 files changed, 20 insertions, 24 deletions
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",