summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am3
-rw-r--r--src/elogin/send.c15
2 files changed, 14 insertions, 4 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 86cd2a1..4c47003 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -135,7 +135,8 @@ MAP_SRC = emap/atcommand.c \
# need remove -Wno-unused
SHARED_CFLAGS = ${CFLAGS} -O3 -pipe -ffast-math -std=c99 -Wall -Wextra -Wno-sign-compare -Wno-unused -fno-omit-frame-pointer \
- -DPCRE_SUPPORT -I../../.. -I../../../../3rdparty -DPACKETVER=20150513 \
+ -DPCRE_SUPPORT -I../../.. -I../../../../3rdparty \
+ -DPACKETVER=20150513 \
-DevolPacketOffset=0
SHARED_LDFLAGS = -avoid-version -Wl,--no-undefined
diff --git a/src/elogin/send.c b/src/elogin/send.c
index f91cd84..8324ebe 100644
--- a/src/elogin/send.c
+++ b/src/elogin/send.c
@@ -20,13 +20,22 @@
void send_server_version(int fd)
{
- WFIFOHEAD(fd, 4 + 8);
+ const int sz = 20;
+ WFIFOHEAD(fd, sz);
WFIFOW(fd, 0) = 0x7531;
- WFIFOW(fd, 2) = 18;
+ WFIFOW(fd, 2) = sz;
WFIFOL(fd, 4) = 0; // unused
- WFIFOL(fd, 8) = 19; // plugin version
+ WFIFOL(fd, 8) = 20; // plugin version
WFIFOL(fd, 12) = serverPacketVersion; // server packet version
WFIFOW(fd, 16) = evolPacketOffset; // packet id offset
+ int flags = 0;
+#ifdef PACKETVER_RE
+ flag |= 1;
+#endif
+#ifdef PACKETVER_ZERO
+ flag |= 2;
+#endif
+ WFIFOW(fd, 18) = flags;
WFIFOSET(fd, WFIFOW(fd,2));
}