summaryrefslogtreecommitdiff
path: root/src/elogin/parse.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-08-13 22:53:12 +0300
committerAndrei Karas <akaras@inbox.ru>2015-08-13 22:53:12 +0300
commitf8b3342f690816022d26038389431002e9cf3648 (patch)
tree1553caed418b7fc6496b196eb70894e460bec0e5 /src/elogin/parse.c
parenta38eb2a333972481d99c5fe0c152ba6d59fba839 (diff)
downloadevol-hercules-f8b3342f690816022d26038389431002e9cf3648.tar.gz
evol-hercules-f8b3342f690816022d26038389431002e9cf3648.tar.bz2
evol-hercules-f8b3342f690816022d26038389431002e9cf3648.tar.xz
evol-hercules-f8b3342f690816022d26038389431002e9cf3648.zip
Fix and restore client version in login and char server.
Diffstat (limited to 'src/elogin/parse.c')
-rw-r--r--src/elogin/parse.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/elogin/parse.c b/src/elogin/parse.c
index 3a015d1..657ef7e 100644
--- a/src/elogin/parse.c
+++ b/src/elogin/parse.c
@@ -67,9 +67,22 @@ int elogin_parse_client_login_pre(int *fdPtr,
return 1;
}
+ short *ptr = RFIFOP(fd, 2);
+ if (*ptr == 20)
+ *ptr = clientVersion;
return 0;
}
+int elogin_parse_client_login_post(int retVal, int *fdPtr,
+ struct login_session_data* sd,
+ const char *const ip __attribute__ ((unused)))
+{
+ sd = (struct login_session_data*)session[*fdPtr]->session_data;
+ if (sd)
+ sd->version = clientVersion;
+ return retVal;
+}
+
void elogin_parse_client_login2(int fd)
{
char username[NAME_LENGTH];