]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/modules.h
Support for /invite <user> <channel> <timeout> - if the user doesn't partake in ...
[user/henk/code/inspircd.git] / include / modules.h
index 1cb3d36c500a05c2972a3fbe269b833d0595de26..09b1f954b0e45fbccb696710f0525906bcffe8e9 100644 (file)
@@ -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
@@ -1824,6 +1826,14 @@ class CoreExport ModuleManager : public classbase
         */
        modulelist* FindInterface(const std::string &InterfaceName);
 
+       /** Determine if a module has published the named interface.
+        * This could be used in, for example, OnLoadModule to pick up other modules that can be used.
+        * @param mod The module to check.
+        * @param InterfaceName the interface you want to check for
+        * @return True if the module provides the interface, false otherwise.
+        */
+       bool ModuleHasInterface(Module* mod, const std::string& InterfaceName);
+
        /** Given a pointer to a Module, return its filename
         * @param m The module pointer to identify
         * @return The module name or an empty string