]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/modules.h
Document ENCAP.
[user/henk/code/inspircd.git] / include / modules.h
index f527cb0650a80595cb905988f83f64eafefbcf29..a625a082c9cf96d54a8c3263be00767053adb72d 100644 (file)
@@ -251,13 +251,17 @@ do { \
 class CoreExport Version : public classbase
 {
  public:
-        /** Version numbers, build number, flags and API version
-         */
-        const int Major, Minor, Revision, Build, Flags, API;
+       /** Version information.
+        */
+       std::string version;
+
+       /** Flags and API version
+        */
+       const int Flags, API;
 
-        /** Initialize version class
-         */
-        Version(int major, int minor, int revision, int build, int flags, int api_ver);
+       /** Initialize version class
+        */
+       Version(const std::string &sversion, int flags, int api_ver);
 };
 
 /** The ModuleMessage class is the base class of Request and Event
@@ -384,7 +388,7 @@ enum Priority { PRIORITY_FIRST, PRIORITY_DONTCARE, PRIORITY_LAST, PRIORITY_BEFOR
 enum Implementation
 {
        I_BEGIN,
-       I_OnUserConnect, I_OnUserQuit, I_OnUserDisconnect, I_OnUserJoin, I_OnUserPart, I_OnRehash, I_OnServerRaw, 
+       I_OnUserConnect, I_OnUserQuit, I_OnUserDisconnect, I_OnUserJoin, I_OnUserPart, I_OnRehash, I_OnServerRaw, I_OnSendSnotice,
        I_OnUserPreJoin, I_OnUserPreKick, I_OnUserKick, I_OnOper, I_OnInfo, I_OnWhois, I_OnUserPreInvite,
        I_OnUserInvite, I_OnUserPreMessage, I_OnUserPreNotice, I_OnUserPreNick, I_OnUserMessage, I_OnUserNotice, I_OnMode,
        I_OnGetServerDescription, I_OnSyncUser, I_OnSyncChannel, I_OnSyncChannelMetaData, I_OnSyncUserMetaData,
@@ -396,7 +400,7 @@ enum Implementation
        I_OnRawSocketAccept, I_OnRawSocketClose, I_OnRawSocketWrite, I_OnRawSocketRead, I_OnChangeLocalUserGECOS, I_OnUserRegister,
        I_OnChannelPreDelete, I_OnChannelDelete, I_OnPostOper, I_OnSyncOtherMetaData, I_OnSetAway, I_OnUserList,
        I_OnPostCommand, I_OnPostJoin, I_OnWhoisLine, I_OnBuildExemptList, I_OnRawSocketConnect, I_OnGarbageCollect, I_OnBufferFlushed,
-       I_OnText, I_OnPassCompare, I_OnRunTestSuite, I_OnNamesListItem, I_OnNumeric, I_OnHookUserIO,
+       I_OnText, I_OnPassCompare, I_OnRunTestSuite, I_OnNamesListItem, I_OnNumeric, I_OnHookUserIO, I_OnHostCycle,
        I_END
 };
 
@@ -527,6 +531,15 @@ class CoreExport Module : public Extensible
         */
        virtual void OnServerRaw(std::string &raw, bool inbound, User* user);
 
+       /** Called whenever a snotice is about to be sent to a snomask.
+        * snomask and type may both be modified; the message may not.
+        * @param snomask The snomask the message is going to (e.g. 'A')
+        * @param type The textual description the snomask will go to (e.g. 'OPER')
+        * @param message The text message to be sent via snotice
+        * @return 1 to block the snotice from being sent entirely, 0 else.
+        */
+       virtual int OnSendSnotice(char &snomask, std::string &type, const std::string &message);
+
        /** Called whenever a user is about to join a channel, before any processing is done.
         * Returning a value of 1 from this function stops the process immediately, causing no
         * output to be sent to the user by the core. If you do this you must produce your own numerics,
@@ -1372,6 +1385,12 @@ class CoreExport Module : public Extensible
        virtual void OnNamesListItem(User* issuer, User* user, Channel* channel, std::string &prefixes, std::string &nick);
 
        virtual int OnNumeric(User* user, unsigned int numeric, const std::string &text);
+
+       /** Called for every time the user's host or ident changes, to indicate wether or not the 'Changing host'
+        * message should be sent, if enabled. Certain modules such as auditorium may opt to hide this message
+        * even if it is enabled.
+        */
+       virtual bool OnHostCycle(User* user);
 };