]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/modules.h
parameters[0] -> parameter.c_str()
[user/henk/code/inspircd.git] / include / modules.h
index d6a4ecb890e8c0f8c78eee676b8027ddf17ef20f..c7c61c221e05245516c0e1c140b8fa8146bbedb9 100644 (file)
@@ -678,8 +678,9 @@ class CoreExport Module : public Extensible
         * @param sender The original sender of the PRIVMSG or NOTICE
         * @param status The status char to be used for the channel list
         * @param exempt_list The exempt list to be populated
+        * @param text The original message text causing the exempt list to be built
         */
-       virtual void OnBuildExemptList(MessageType message_type, chanrec* chan, userrec* sender, char status, CUList &exempt_list);
+       virtual void OnBuildExemptList(MessageType message_type, chanrec* chan, userrec* sender, char status, CUList &exempt_list, const std::string &text);
        
        /** Called before any nickchange, local or remote. This can be used to implement Q-lines etc.
         * Please note that although you can see remote nickchanges through this function, you should
@@ -1376,7 +1377,7 @@ class CoreExport Module : public Extensible
 
 
 #define CONF_NOT_A_NUMBER      0x000010
-#define CONF_NOT_UNSIGNED      0x000080
+#define CONF_INT_NEGATIVE      0x000080
 #define CONF_VALUE_NOT_FOUND   0x000100
 #define CONF_FILE_NOT_FOUND    0x000200
 
@@ -1455,11 +1456,12 @@ class CoreExport ConfigReader : public classbase
         * This method retrieves an integer value from the config file. Where multiple copies of the tag
         * exist in the config file, index indicates which of the values to retrieve. Any invalid integer
         * values in the tag will cause the objects error value to be set, and any call to GetError() will
-        * return CONF_INVALID_NUMBER to be returned. needs_unsigned is set if the number must be unsigned.
-        * If a signed number is placed into a tag which is specified unsigned, 0 will be returned and GetError()
-        * will return CONF_NOT_UNSIGNED
+        * return CONF_INVALID_NUMBER to be returned. need_positive is set if the number must be non-negative.
+        * If a negative number is placed into a tag which is specified positive, 0 will be returned and GetError()
+        * will return CONF_INT_NEGATIVE. Note that need_positive is not suitable to get an unsigned int - you
+        * should cast the result to achieve that effect.
         */
-       long ReadInteger(const std::string &tag, const std::string &name, int index, bool needs_unsigned);
+       int ReadInteger(const std::string &tag, const std::string &name, int index, bool need_positive);
        /** Retrieves an integer value from the config file.
         * This method retrieves an integer value from the config file. Where multiple copies of the tag
         * exist in the config file, index indicates which of the values to retrieve. Any invalid integer
@@ -1468,7 +1470,7 @@ class CoreExport ConfigReader : public classbase
         * If a signed number is placed into a tag which is specified unsigned, 0 will be returned and GetError()
         * will return CONF_NOT_UNSIGNED. If the tag is not found, the default value is used instead.
         */
-       long ReadInteger(const std::string &tag, const std::string &name, const std::string &default_value, int index, bool needs_unsigned);
+       int ReadInteger(const std::string &tag, const std::string &name, const std::string &default_value, int index, bool need_positive);
 
        /** Returns the last error to occur.
         * Valid errors can be found by looking in modules.h. Any nonzero value indicates an error condition.