summaryrefslogtreecommitdiff
path: root/src/char/char.cpp
diff options
context:
space:
mode:
authormekolat <mekolat@users.noreply.github.com>2015-05-17 16:59:59 -0400
committermekolat <mekolat@users.noreply.github.com>2015-05-17 16:59:59 -0400
commit48021640ce0e76f1dfd7527b88fa33f2b74f4909 (patch)
tree8d1fcabdd4dd2c7b47da1a34b72490a8f19b867b /src/char/char.cpp
parent87f9bae4da0314e97f1a3e38513960998ee4d05d (diff)
downloadtmwa-48021640ce0e76f1dfd7527b88fa33f2b74f4909.tar.gz
tmwa-48021640ce0e76f1dfd7527b88fa33f2b74f4909.tar.bz2
tmwa-48021640ce0e76f1dfd7527b88fa33f2b74f4909.tar.xz
tmwa-48021640ce0e76f1dfd7527b88fa33f2b74f4909.zip
reject very old manaplus versions
Diffstat (limited to 'src/char/char.cpp')
-rw-r--r--src/char/char.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/char/char.cpp b/src/char/char.cpp
index 345265f..7ad6dff 100644
--- a/src/char/char.cpp
+++ b/src/char/char.cpp
@@ -62,6 +62,7 @@
#include "../proto2/any-user.hpp"
#include "../proto2/login-admin.hpp"
#include "../proto2/login-char.hpp"
+#include "../proto2/login-user.hpp"
#include "../proto2/char-map.hpp"
#include "../proto2/char-user.hpp"
@@ -2259,6 +2260,14 @@ void parse_char(Session *s)
special.magic_packet_length = 4;
send_ppacket<0x8000>(s, special);
+ if(sd->packet_client_version < MIN_CLIENT_VERSION)
+ {
+ Packet_Fixed<0x006a> fixed_6a;
+ fixed_6a.error_code = 5;
+ send_fpacket<0x006a, 23>(s, fixed_6a);
+ goto x65_out;
+ }
+
// search authentification
for (AuthFifoEntry& afi : auth_fifo)
{