diff options
-rw-r--r-- | conf/inspircd.conf.example | 22 | ||||
-rw-r--r-- | conf/modules.conf.example | 26 | ||||
-rw-r--r-- | 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 #<module name="m_chanprotect.so"> +<chanprotect + # 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="yes" + + # 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. + deprotectothers="yes" + + # setprivsonothers: If this value is set to yes, true, or 1, then any + # user with +q or +a may add the +q or +a to other users. + setprivsonothers="yes"> + + #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # 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) |