]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/modules.h
Add third parameter to OnUserQuit (quit reason for opers only) - bump api version
[user/henk/code/inspircd.git] / include / modules.h
index 9928ad32618c1098c9f9239d0ff2927e40925e7c..16495dad6f992b565da24e895e0f0d0f63704cfd 100644 (file)
@@ -75,7 +75,7 @@ enum MessageType {
  * ipv4 servers, so this value will be ten times as
  * high on ipv6 servers.
  */
-#define NATIVE_API_VERSION 11009
+#define NATIVE_API_VERSION 11018
 #ifdef IPV6
 #define API_VERSION (NATIVE_API_VERSION * 10)
 #else
@@ -394,7 +394,7 @@ enum Implementation {       I_OnUserConnect, I_OnUserQuit, I_OnUserDisconnect, I_OnUse
                        I_OnPostLocalTopicChange, I_OnEvent, I_OnRequest, I_OnOperCompre, I_OnGlobalOper, I_OnPostConnect, I_OnAddBan, I_OnDelBan,
                        I_OnRawSocketAccept, I_OnRawSocketClose, I_OnRawSocketWrite, I_OnRawSocketRead, I_OnChangeLocalUserGECOS, I_OnUserRegister,
                        I_OnOperCompare, I_OnChannelDelete, I_OnPostOper, I_OnSyncOtherMetaData, I_OnSetAway, I_OnCancelAway, I_OnUserList,
-                       I_OnPostCommand, I_OnPostJoin, I_OnWhoisLine, I_OnBuildExemptList, I_OnRawSocketConnect, I_OnGarbageCollect };
+                       I_OnPostCommand, I_OnPostJoin, I_OnWhoisLine, I_OnBuildExemptList, I_OnRawSocketConnect, I_OnGarbageCollect, I_OnBufferFlushed };
 
 /** Base class for all InspIRCd modules
  *  This class is the base class for InspIRCd modules. All modules must inherit from this class,
@@ -471,9 +471,10 @@ class Module : public Extensible
         * This event is only called when the user is fully registered when they quit. To catch
         * raw disconnections, use the OnUserDisconnect method.
         * @param user The user who is quitting
-        * @param message The user's quit message
+        * @param message The user's quit message (as seen by non-opers)
+        * @param oper_message The user's quit message (as seen by opers)
         */
-       virtual void OnUserQuit(userrec* user, const std::string &message);
+       virtual void OnUserQuit(userrec* user, const std::string &message, const std::string &oper_message);
 
        /** Called whenever a user's socket is closed.
         * The details of the exiting user are available to you in the parameter userrec *user
@@ -518,9 +519,11 @@ class Module : public Extensible
         * system. You should use it to reload any files so that your module keeps in step with the
         * rest of the application. If a parameter is given, the core has done nothing. The module
         * receiving the event can decide if this parameter has any relevence to it.
+        * @param user The user performing the rehash, if any -- if this is server initiated, the
+        * value of this variable will be NULL.
         * @param parameter The (optional) parameter given to REHASH from the user.
         */
-       virtual void OnRehash(const std::string &parameter);
+       virtual void OnRehash(userrec* user, const std::string &parameter);
 
        /** Called when a raw command is transmitted or received.
         * This method is the lowest level of handler available to a module. It will be called with raw
@@ -1348,6 +1351,15 @@ class Module : public Extensible
         * method is called when it is time to do that.
         */
        virtual void OnGarbageCollect();
+
+       /** Called whenever a user's write buffer has been completely sent.
+        * This is called when the user's write buffer is completely empty, and
+        * there are no more pending bytes to be written and no pending write events
+        * in the socket engine's queue. This may be used to refill the buffer with
+        * data which is being spooled in a controlled manner, e.g. LIST lines.
+        * @param user The user who's buffer is now empty.
+        */
+       virtual void OnBufferFlushed(userrec* user);
 };