X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fconfigreader.h;h=b603f2e10f060e26483802c964a6d59e25fbc50c;hb=8f5952d1e56c9dbefebbacfc7e40546a9df901e8;hp=460fd342c6a47a45a08d5e5299394d0259bbfc15;hpb=35b70631f0532a5828b04a8e0c02092a285f331a;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/configreader.h b/include/configreader.h index 460fd342c..b603f2e10 100644 --- a/include/configreader.h +++ b/include/configreader.h @@ -42,6 +42,8 @@ class CoreExport ConfigTag : public refcountbase const std::string src_name; const int src_line; + /** Get the value of an option, using def if it does not exist */ + std::string getString(const std::string& key, const std::string& def, const TR1NS::function& validator); /** Get the value of an option, using def if it does not exist */ std::string getString(const std::string& key, const std::string& def = "", size_t minlen = 0, size_t maxlen = UINT32_MAX); /** Get the value of an option, using def if it does not exist */ @@ -146,6 +148,18 @@ struct CommandLineConf */ bool writelog; + /** If this is true, a PID file will be written + * to the file given in the "file" variable of + * the tag in the config file. This is + * the default. + * Passing --nopid as a command line argument + * sets this to false; in this case, a PID file + * will not be written, even the default PID + * file that is usually written when the + * tag is not defined in the config file. + */ + bool writepid; + /** Saved argc from startup */ int argc; @@ -198,6 +212,19 @@ class CoreExport ServerConfig void CrossCheckConnectBlocks(ServerConfig* current); public: + /** How to treat a user in a channel who is banned. */ + enum BannedUserTreatment + { + /** Don't treat a banned user any different to normal. */ + BUT_NORMAL, + + /** Restrict the actions of a banned user. */ + BUT_RESTRICT_SILENT, + + /** Restrict the actions of a banned user and notify them of their treatment. */ + BUT_RESTRICT_NOTIFY + }; + class ServerPaths { public: @@ -318,10 +345,8 @@ class CoreExport ServerConfig */ bool GenericOper; - /** If this value is true, banned users (+b, not extbans) will not be able to change nick - * if banned on any channel, nor to message them. - */ - bool RestrictBannedUsers; + /** How to treat a user in a channel who is banned. */ + BannedUserTreatment RestrictBannedUsers; /** The size of the read() buffer in the user * handling code, used to read data into a user's