From bc69a6264e99a0609c1f198487c5c8143147d128 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 16 Oct 2006 21:27:02 +0000 Subject: 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 --- include/modules.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'include') 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; -- cgit v1.2.3