]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/modules.h
Replace std::deque with std::vector in spanningtree and related modules
[user/henk/code/inspircd.git] / include / modules.h
index a539f318502ee23ffc58067f34cb6433817a934c..21e4760897f234045690980735f169f3c88b6287 100644 (file)
@@ -76,18 +76,8 @@ enum MessageType {
        MSG_NOTICE = 1
 };
 
-/** If you change the module API, change this value.
- * If you have enabled ipv6, the sizes of structs is
- * different, and modules will be incompatible with
- * ipv4 servers, so this value will be ten times as
- * high on ipv6 servers.
- */
-#define NATIVE_API_VERSION 12000
-#ifdef IPV6
-#define API_VERSION (NATIVE_API_VERSION * 10)
-#else
-#define API_VERSION (NATIVE_API_VERSION * 1)
-#endif
+/** If you change the module API, change this value. */
+#define API_VERSION 13000
 
 class ServerConfig;
 
@@ -786,7 +776,7 @@ class CoreExport Module : public Extensible
         * @param text The actual modes and their parameters if any
         * @param translate The translation types of the mode parameters
         */
-       virtual void OnMode(User* user, void* dest, int target_type, const std::deque<std::string> &text, const std::deque<TranslateType> &translate);
+       virtual void OnMode(User* user, void* dest, int target_type, const std::vector<std::string> &text, const std::vector<TranslateType> &translate);
 
        /** Allows modules to alter or create server descriptions
         * Whenever a module requires a server description, for example for display in
@@ -895,7 +885,7 @@ class CoreExport Module : public Extensible
         * @param modeline The modes and parameters to be sent
         * @param translate The translation types of the mode parameters
         */
-       virtual void ProtoSendMode(void* opaque, TargetTypeFlags target_type, void* target, const std::deque<std::string> &modeline, const std::deque<TranslateType> &translate);
+       virtual void ProtoSendMode(void* opaque, TargetTypeFlags target_type, void* target, const std::vector<std::string> &modeline, const std::vector<TranslateType> &translate);
 
        /** Implemented by modules which provide the ability to link servers.
         * These modules will implement this method, which allows metadata (extra data added to
@@ -1301,7 +1291,7 @@ class CoreExport Module : public Extensible
         */
        virtual int OnDelBan(User* source, Channel* channel,const std::string &banmask);
 
-       virtual void OnHookUserIO(User* user, const std::string &targetip);
+       virtual void OnHookUserIO(User* user);
 
        /** Called immediately after any  connection is accepted. This is intended for raw socket
         * processing (e.g. modules which wrap the tcp connection within another library) and provides
@@ -1309,10 +1299,11 @@ class CoreExport Module : public Extensible
         * There are no return values from this call as all modules get an opportunity if required to
         * process the connection.
         * @param fd The file descriptor returned from accept()
-        * @param ip The IP address of the connecting user
+        * @param client The client IP address and port
+        * @param server The server IP address and port
         * @param localport The local port number the user connected to
         */
-       virtual void OnRawSocketAccept(int fd, const std::string &ip, int localport);
+       virtual void OnRawSocketAccept(int fd, irc::sockets::sockaddrs* client, irc::sockets::sockaddrs* server);
 
        /** Called immediately before any write() operation on a user's socket in the core. Because
         * this event is a low level event no user information is associated with it. It is intended