]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/modules.h
Patch by dz avoiding <badchan:redirect> loops, and tidying up on-rehash checks.
[user/henk/code/inspircd.git] / include / modules.h
index e14b13c9b5a591c2e7c32f2c33e34d468ec61ee0..29e4313dcd5d71356953bb4fef6ed6bf46f79bdb 100644 (file)
@@ -335,7 +335,7 @@ class CoreExport Request : public ModuleMessage
         * sent the request to. It is up to your module to know what this data is and
         * how to deal with it.
         */
-       char* Send();
+       const char* Send();
 };
 
 
@@ -626,9 +626,10 @@ class CoreExport Module : public Extensible
         * @param source The user who is issuing the INVITE
         * @param dest The user being invited
         * @param channel The channel the user is being invited to
+        * @param timeout The time the invite will expire (0 == never)
         * @return 1 to deny the invite, 0 to allow
         */
-       virtual int OnUserPreInvite(User* source,User* dest,Channel* channel);
+       virtual int OnUserPreInvite(User* source,User* dest,Channel* channel, time_t timeout);
        
        /** Called after a user has been successfully invited to a channel.
         * You cannot prevent the invite from occuring using this function, to do that,
@@ -636,8 +637,9 @@ class CoreExport Module : public Extensible
         * @param source The user who is issuing the INVITE
         * @param dest The user being invited
         * @param channel The channel the user is being invited to
+        * @param timeout The time the invite will expire (0 == never)
         */
-       virtual void OnUserInvite(User* source,User* dest,Channel* channel);
+       virtual void OnUserInvite(User* source,User* dest,Channel* channel, time_t timeout);
        
        /** Called whenever a user is about to PRIVMSG A user or a channel, before any processing is done.
         * Returning any nonzero value from this function stops the process immediately, causing no
@@ -1099,7 +1101,9 @@ class CoreExport Module : public Extensible
         * @param param The parameter for the mode or an empty string
         * @param adding true of the mode is being added, false if it is being removed
         * @param pcnt The parameter count for the mode (0 or 1)
-        * @return 1 to deny the mode, 0 to allow
+        * @return ACR_DENY to deny the mode, ACR_DEFAULT to do standard mode checking, and ACR_ALLOW
+        * to skip all permission checking. Please note that for remote mode changes, your return value
+        * will be ignored!
         */
        virtual int OnRawMode(User* user, Channel* chan, const char mode, const std::string &param, bool adding, int pcnt);
 
@@ -1193,7 +1197,7 @@ class CoreExport Module : public Extensible
         * may be able to use for pre-determined purposes (e.g. the results of an SQL query, etc).
         * @param request The Request class being received
         */
-       virtual char* OnRequest(Request* request);
+       virtual const char* OnRequest(Request* request);
 
        /** Called whenever a password check is to be made. Replaces the old OldOperCompare API.
         * The password field (from the config file) is in 'password' and is to be compared against