summaryrefslogtreecommitdiff
path: root/src/configreader.cpp
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-13 22:10:57 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-13 22:10:57 +0000
commit32be456c07972a289ebbf8db99b88a591e963235 (patch)
tree59644e48d23de5f4aa442253da53a4a8ef7cf5fd /src/configreader.cpp
parent763deccf122440ed8ea876ac53e0a6198b38240e (diff)
Replace strip/blockcolor tags with <options:exemptchanops>, sexy string of modes to exempt chanops from (currently Sc are supported).
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7018 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r--src/configreader.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 1bc530b9b..6e728c311 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -341,6 +341,14 @@ bool ValidateModeLists(ServerConfig* conf, const char* tag, const char* value, V
return true;
}
+bool ValidateExemptChanOps(ServerConfig* conf, const char* tag, const char* value, ValueItem &data)
+{
+ memset(conf->ExemptChanOps, 0, 256);
+ for (const unsigned char* x = (const unsigned char*)data.GetString(); *x; ++x)
+ conf->ExemptChanOps[*x] = true;
+ return true;
+}
+
bool ValidateWhoWas(ServerConfig* conf, const char* tag, const char* value, ValueItem &data)
{
conf->WhoWasMaxKeep = conf->GetInstance()->Duration(data.GetString());
@@ -567,6 +575,7 @@ void ServerConfig::Read(bool bail, userrec* user)
static char debug[MAXBUF]; /* Temporary buffer for debugging value */
static char maxkeep[MAXBUF]; /* Temporary buffer for WhoWasMaxKeep value */
static char hidemodes[MAXBUF]; /* Modes to not allow listing from users below halfop */
+ static char exemptchanops[MAXBUF]; /* Exempt channel ops from these modes */
int rem = 0, add = 0; /* Number of modules added, number of modules removed */
std::ostringstream errstr; /* String stream containing the error output */
@@ -613,6 +622,7 @@ void ServerConfig::Read(bool bail, userrec* user)
{"options", "announceinvites", "1", new ValueContainerBool (&this->AnnounceInvites), DT_BOOLEAN, NoValidation},
{"options", "hostintopic", "1", new ValueContainerBool (&this->FullHostInTopic), DT_BOOLEAN, NoValidation},
{"options", "hidemodes", "", new ValueContainerChar (hidemodes), DT_CHARPTR, ValidateModeLists},
+ {"options", "exemptchanops","", new ValueContainerChar (exemptchanops), DT_CHARPTR, ValidateExemptChanOps},
{"pid", "file", "", new ValueContainerChar (this->PID), DT_CHARPTR, NoValidation},
{"whowas", "groupsize", "10", new ValueContainerInt (&this->WhoWasGroupSize), DT_INTEGER, NoValidation},
{"whowas", "maxgroups", "10240", new ValueContainerInt (&this->WhoWasMaxGroups), DT_INTEGER, NoValidation},