diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-02-06 15:13:47 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-02-06 15:13:47 +0000 |
commit | da6d1d696a7e9c5b1e45c125e2c4f081d53043a9 (patch) | |
tree | 6f8241866d10ba9aaa7c04a3650d2e1a4d819f7b | |
parent | f40f176ed8c743d92f29e000e6b88cf2d2e97622 (diff) |
Add <auditorium:operoverride> setting, based on patch contributed by Sm0ke0ut
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8841 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | docs/inspircd.conf.example | 20 | ||||
-rw-r--r-- | src/modules/m_auditorium.cpp | 13 |
2 files changed, 25 insertions, 8 deletions
diff --git a/docs/inspircd.conf.example b/docs/inspircd.conf.example index 44110e012..4735ffd48 100644 --- a/docs/inspircd.conf.example +++ b/docs/inspircd.conf.example @@ -1210,14 +1210,18 @@ # # Auditorium settings: # -#<auditorium showops="no"> -# -# Setting this value to yes makes m_auditorium behave like unrealircd -# +u channel mode, e.g. ops see users joining, parting, etc, and users -# joining the channel see the ops. Without this flag, the mode acts -# like ircnet's +a (anonymous channels), showing only the user in the -# names list, and not even showing the ops in the list, or showing the -# ops that the user has joined. +#<auditorium showops="no" operoverride="no"> +# +# showops: +# Setting this value to yes makes m_auditorium behave like unrealircd +# +u channel mode, e.g. ops see users joining, parting, etc, and users +# joining the channel see the ops. Without this flag, the mode acts +# like ircnet's +a (anonymous channels), showing only the user in the +# names list, and not even showing the ops in the list, or showing the +# ops that the user has joined. +# operoverride: +# Setting this value to yes makes m_auditorium affect the userlist for +# regular users only. Opers will view all users in the channel normally. #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # Ban except module: Adds support for channel ban exceptions (+e) diff --git a/src/modules/m_auditorium.cpp b/src/modules/m_auditorium.cpp index 31533aaa1..9d8ff4b9a 100644 --- a/src/modules/m_auditorium.cpp +++ b/src/modules/m_auditorium.cpp @@ -47,6 +47,7 @@ class ModuleAuditorium : public Module private: AuditoriumMode* aum; bool ShowOps; + bool OperOverride; CUList nl; CUList except_list; public: @@ -83,6 +84,7 @@ class ModuleAuditorium : public Module { ConfigReader conf(ServerInstance); ShowOps = conf.ReadFlag("auditorium", "showops", 0); + OperOverride = conf.ReadFlag("auditorium", "operoverride", 0); } virtual Version GetVersion() @@ -94,6 +96,17 @@ class ModuleAuditorium : public Module { if (Ptr->IsModeSet('u')) { + if (OperOverride) + { + if (IS_OPER(user)) + { + /* + * If user is oper and operoverride is on, don't touch the list + */ + return 0; + } + } + if (ShowOps) { /* Leave the names list alone, theyre an op |