X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=include%2Fconfigreader.h;h=b603f2e10f060e26483802c964a6d59e25fbc50c;hb=4df41508c1adfdd8211994dc206de82718ee097d;hp=be5c582b9da1b59e3c9101a09434185f4908fedb;hpb=9cd7a2e54683a05d175a86e901f2f0df7d680902;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/configreader.h b/include/configreader.h index be5c582b9..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 */ @@ -210,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: @@ -330,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