]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/configreader.h
Implement IRCv3 message tag support.
[user/henk/code/inspircd.git] / include / configreader.h
index be5c582b9da1b59e3c9101a09434185f4908fedb..4cb051efff3d1e9f27928627306f55e19e713ec0 100644 (file)
@@ -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<bool(const std::string&)>& 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 */
@@ -101,8 +103,8 @@ class ServerLimits
        size_t MaxTopic;
        /** Maximum kick message length */
        size_t MaxKick;
-       /** Maximum GECOS (real name) length */
-       size_t MaxGecos;
+       /** Maximum real name length */
+       size_t MaxReal;
        /** Maximum away message length */
        size_t MaxAway;
        /** Maximum line length */
@@ -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
@@ -417,11 +430,6 @@ class CoreExport ServerConfig
         */
        std::string CaseMapping;
 
-       /** If set to true, the CycleHosts mode change will be sourced from the user,
-        * rather than the server
-        */
-       bool CycleHostsFromUser;
-
        /** If set to true, the full nick!user\@host will be shown in the TOPIC command
         * for who set the topic last. If false, only the nick is shown.
         */