From 2f5b4b0aab1a121751f09762ec68dc8471517069 Mon Sep 17 00:00:00 2001 From: Michael Poole Date: Thu, 8 Jun 2006 02:11:21 +0000 Subject: [PATCH] Allow ircd.conf to control the list_chan privilege. git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/branches/u2_10_12_branch@1664 c9e4aea6-c8fd-4c43-8297-357d70d61c8c --- ChangeLog | 8 ++++++++ doc/example.conf | 1 + ircd/ircd_lexer.l | 1 + ircd/ircd_parser.y | 2 ++ 4 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index b6b666f..ab42894 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-06-07 Michael Poole + + * doc/example.conf: Document the list_chan privilege. + + * ircd/ircd_lexer.l: Recognize the token. + + * ircd/ircd_parser.y: Treat it appropriately. + 2006-06-07 Michael Poole * ircd/s_auth.c (auth_ping_timeout): If the client never had an diff --git a/doc/example.conf b/doc/example.conf index 8e61aad..cbb4d7e 100644 --- a/doc/example.conf +++ b/doc/example.conf @@ -202,6 +202,7 @@ Class { # local_gline (can set a G-line for this server only) # local_badchan (can set a Gchan for this server only) # see_chan (can see users in +s channels in /WHO) + # list_chan (can see +s channels with /LIST S) # wide_gline (can use ! to force a wide G-line) # see_opers (can see opers without DISPLAY privilege) # local_opmode (can use OPMODE/CLEARMODE on local channels) diff --git a/ircd/ircd_lexer.l b/ircd/ircd_lexer.l index 4ec8a67..d2e2443 100644 --- a/ircd/ircd_lexer.l +++ b/ircd/ircd_lexer.l @@ -119,6 +119,7 @@ static struct lexer_token { { "gline", TPRIV_GLINE }, { "kb", KBYTES }, { "kilobytes", KBYTES }, + { "list_chan", TPRIV_LIST_CHAN }, { "local_badchan", TPRIV_LOCAL_BADCHAN }, { "local_gline", TPRIV_LOCAL_GLINE }, { "local_jupe", TPRIV_LOCAL_JUPE }, diff --git a/ircd/ircd_parser.y b/ircd/ircd_parser.y index 758e080..3ec3bf1 100644 --- a/ircd/ircd_parser.y +++ b/ircd/ircd_parser.y @@ -165,6 +165,7 @@ static void parse_error(char *pattern,...) { %token TPRIV_SEE_CHAN TPRIV_SHOW_INVIS TPRIV_SHOW_ALL_INVIS TPRIV_PROPAGATE %token TPRIV_UNLIMIT_QUERY TPRIV_DISPLAY TPRIV_SEE_OPERS TPRIV_WIDE_GLINE %token TPRIV_FORCE_OPMODE TPRIV_FORCE_LOCAL_OPMODE TPRIV_APASS_OPMODE +%token TPRIV_LIST_CHAN /* and some types... */ %type sizespec %type timespec timefactor factoredtimes factoredtime @@ -616,6 +617,7 @@ privtype: TPRIV_CHAN_LIMIT { $$ = PRIV_CHAN_LIMIT; } | TPRIV_DISPLAY { $$ = PRIV_DISPLAY; } | TPRIV_SEE_OPERS { $$ = PRIV_SEE_OPERS; } | TPRIV_WIDE_GLINE { $$ = PRIV_WIDE_GLINE; } | + TPRIV_LIST_CHAN { $$ = PRIV_LIST_CHAN; } | LOCAL { $$ = PRIV_PROPAGATE; invert = 1; } | TPRIV_FORCE_OPMODE { $$ = PRIV_FORCE_OPMODE; } | TPRIV_FORCE_LOCAL_OPMODE { $$ = PRIV_FORCE_LOCAL_OPMODE; } | -- 2.20.1