summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changes1
-rw-r--r--src/config.c2
-rw-r--r--src/core/cs_list.c25
-rw-r--r--src/core/ns_list.c2
-rw-r--r--version.log6
5 files changed, 24 insertions, 12 deletions
diff --git a/Changes b/Changes
index e235d4fa0..ebb3490df 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,7 @@
Anope Version S V N
-------------------
Provided by Anope Dev. <dev@anope.org> - 2005
+05/12 F NSListOpersOnly works correctly. [#375]
05/12 F Using variable for EVENT_PART_CHANNEL after freeing it. [#374]
05/11 F Unable to make when using an old shell. [#369]
05/10 F AnopeFini was called without mod_current_module_name set. [#371]
diff --git a/src/config.c b/src/config.c
index 07c7f2995..f018503ac 100644
--- a/src/config.c
+++ b/src/config.c
@@ -858,7 +858,7 @@ int parse(char *buf, int linenum, int reload)
if (n == lenof(directives)) {
/* error(linenum, "Unknown directive `%s'", dir);
- return 1; *//* don't cause abort */
+ return 1; *//* don't cause abort */
}
return retval;
diff --git a/src/core/cs_list.c b/src/core/cs_list.c
index fa33f2947..cda14a1df 100644
--- a/src/core/cs_list.c
+++ b/src/core/cs_list.c
@@ -32,9 +32,19 @@ int AnopeInit(int argc, char **argv)
moduleAddVersion("$Id$");
moduleSetType(CORE);
- c = createCommand("LIST", do_list, NULL, -1, CHAN_HELP_LIST,
- CHAN_SERVADMIN_HELP_LIST, CHAN_SERVADMIN_HELP_LIST,
- CHAN_SERVADMIN_HELP_LIST);
+ 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);
+ }
+
moduleAddCommand(CHANSERV, c, MOD_UNIQUE);
moduleSetChanHelp(myChanServHelp);
@@ -58,7 +68,9 @@ void AnopeFini(void)
**/
void myChanServHelp(User * u)
{
- notice_lang(s_ChanServ, u, CHAN_HELP_CMD_LIST);
+ if (!CSListOpersOnly || (is_oper(u))) {
+ notice_lang(s_ChanServ, u, CHAN_HELP_CMD_LIST);
+ }
}
/**
@@ -80,11 +92,6 @@ int do_list(User * u)
int32 matchflags = 0;
- if (CSListOpersOnly && (!u || !is_oper(u))) {
- notice_lang(s_ChanServ, u, PERMISSION_DENIED);
- return MOD_CONT;
- }
-
if (!pattern) {
syntax_error(s_ChanServ, u, "LIST",
is_servadmin ? CHAN_LIST_SERVADMIN_SYNTAX :
diff --git a/src/core/ns_list.c b/src/core/ns_list.c
index d04d7f2ec..a06c78f9a 100644
--- a/src/core/ns_list.c
+++ b/src/core/ns_list.c
@@ -65,7 +65,7 @@ void AnopeFini(void)
**/
void myNickServHelp(User * u)
{
- if (NSListOpersOnly && !(is_oper(u))) {
+ if (!NSListOpersOnly || (is_oper(u))) {
notice_lang(s_NickServ, u, NICK_HELP_CMD_LIST);
}
}
diff --git a/version.log b/version.log
index eb1b23179..9ac58289e 100644
--- a/version.log
+++ b/version.log
@@ -8,10 +8,14 @@
VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="9"
-VERSION_BUILD="788"
+VERSION_BUILD="789"
# $Log$
#
+# BUILD : 1.7.9 (789)
+# BUGS : 375
+# NOTES : NSOperListOnly and CSOperListOnly are correctly formated in the help now.
+#
# BUILD : 1.7.9 (788)
# BUGS : 374
# NOTES : Moved free() to after sending the EVENT_PART_CHANNEL event, so the event does not use an already freed variable