From e4c8a90f85eae05e88d8c3ff1cb839f4882e5fcb Mon Sep 17 00:00:00 2001 From: w00t Date: Tue, 28 Oct 2008 15:52:45 +0000 Subject: [PATCH] Move chanprotect settings from to . (why were they not there in the first place?) Document . git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10739 e03df62e-2008-0410-955e-edbf42e46eb7 --- conf/inspircd.conf.example | 22 ---------------------- conf/modules.conf.example | 26 ++++++++++++++++++++++++++ src/modules/m_chanprotect.cpp | 12 ++++++------ 3 files changed, 32 insertions(+), 28 deletions(-) diff --git a/conf/inspircd.conf.example b/conf/inspircd.conf.example index 35c59588c..db963890b 100644 --- a/conf/inspircd.conf.example +++ b/conf/inspircd.conf.example @@ -379,28 +379,6 @@ # should be suffixed with. suffixpart="\"" - # noservices: With this set to no, when a user joins a empty channel, - # the server will set +q on them. If set to yes, it will only set +o - # on them until they register the channel. - noservices="no" - - # qprefix: Prefix (symbol) to use for +q users. - qprefix="~" - - # aprefix: Prefix (symbol) to use for +a users. - aprefix="&" - - # deprotectself: If this value is set (true, yes or 1), it will allow - # +a and +q users to remove the +a and +q from themselves, otherwise, - # the status will have to be removed by services. - deprotectself="no" - - # deprotectothers: If this value is set to yes, true, or 1, then any - # user with +q or +a may remove the +q or +a from other users. - # The default setting is to not enable this feature, so that - # only +q may remove +a, and nothing but services may remove +q. - deprotectothers="no" - # syntaxhints: If enabled, if a user fails to send the correct parameters # for a command, the ircd will give back soome help text of what # the correct parameters are diff --git a/conf/modules.conf.example b/conf/modules.conf.example index d4cc65565..5dcff4117 100644 --- a/conf/modules.conf.example +++ b/conf/modules.conf.example @@ -363,6 +363,32 @@ # Chanprotect module: gives +q and +a channel modes # + + + #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # Check module: gives /check # Check is useful for looking up information on channels, diff --git a/src/modules/m_chanprotect.cpp b/src/modules/m_chanprotect.cpp index a88f5de38..927e3d4c2 100644 --- a/src/modules/m_chanprotect.cpp +++ b/src/modules/m_chanprotect.cpp @@ -362,12 +362,12 @@ class ModuleChanProtect : public Module */ ConfigReader Conf(ServerInstance); - FirstInGetsFounder = Conf.ReadFlag("options", "noservices", 0); + FirstInGetsFounder = Conf.ReadFlag("chanprotect", "noservices", 0); - std::string qpre = Conf.ReadValue("options", "qprefix", 0); + std::string qpre = Conf.ReadValue("chanprotect", "qprefix", 0); QPrefix = qpre.empty() ? 0 : qpre[0]; - std::string apre = Conf.ReadValue("options", "aprefix", 0); + std::string apre = Conf.ReadValue("chanprotect", "aprefix", 0); APrefix = apre.empty() ? 0 : apre[0]; if ((APrefix && QPrefix) && APrefix == QPrefix) @@ -379,9 +379,9 @@ class ModuleChanProtect : public Module if (cf && ServerInstance->Modes->FindPrefix(QPrefix) == cf) throw ModuleException("Looks like the +q prefix you picked for m_chanprotect is already in use. Pick another."); - DeprivSelf = Conf.ReadFlag("options","deprotectself", "yes", 0); - DeprivOthers = Conf.ReadFlag("options","deprotectothers", "yes", 0); - DeprivOthers = Conf.ReadFlag("options","setprivsonothers", "yes", 0); + DeprivSelf = Conf.ReadFlag("chanprotect","deprotectself", "yes", 0); + DeprivOthers = Conf.ReadFlag("chanprotect","deprotectothers", "yes", 0); + DeprivOthers = Conf.ReadFlag("chanprotect","setprivsonothers", "yes", 0); } virtual int OnUserPreJoin(User *user, Channel *chan, const char *cname, std::string &privs, const std::string &keygiven) -- 2.39.5