summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-10-16 21:27:02 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-10-16 21:27:02 +0000
commitbc69a6264e99a0609c1f198487c5c8143147d128 (patch)
treec7dbda6d6118a77454c2908fb52629e6fafe4b20 /include
parent512c5886658f9c29a56732e23e62ecc1776afd34 (diff)
Multiply API_VERSION by ten if IPV6 is defined, to prevent modules built for an ipv6 insp being loaded into an ipv4 insp (the sizes of structs such as userrec and inspsocket are different when ipv6 is enabled)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5486 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/modules.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/modules.h b/include/modules.h
index df9497fd2..18269e144 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -68,9 +68,18 @@ enum TargetTypeFlags {
#include "mode.h"
#include "dns.h"
-/** If you change the module API, change this value
+/** 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 API_VERSION 11001
+#define NATIVE_API_VERSION 11001
+#ifdef IPV6
+#define API_VERSION (NATIVE_API_VERSION * 10)
+#else
+#define API_VERSION (NATIVE_API_VERSION * 1)
+#endif
class ServerConfig;