summaryrefslogtreecommitdiff
path: root/src/elogin
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-08-10 14:50:09 +0300
committerAndrei Karas <akaras@inbox.ru>2015-08-16 15:52:35 +0300
commit38c48c78eb1d5822565504363863918e39e0cd4a (patch)
tree740ed3f18baff57e0ac33e6e8405d217546429d3 /src/elogin
parent2ed4142dfcde097648857f41f8064b0a19c350c7 (diff)
downloadevol-hercules-38c48c78eb1d5822565504363863918e39e0cd4a.tar.gz
evol-hercules-38c48c78eb1d5822565504363863918e39e0cd4a.tar.bz2
evol-hercules-38c48c78eb1d5822565504363863918e39e0cd4a.tar.xz
evol-hercules-38c48c78eb1d5822565504363863918e39e0cd4a.zip
Fix compilation after HPM update in server.
Diffstat (limited to 'src/elogin')
-rw-r--r--src/elogin/config.c2
-rw-r--r--src/elogin/init.c7
-rw-r--r--src/elogin/login.c2
-rw-r--r--src/elogin/parse.c14
-rw-r--r--src/elogin/send.c2
5 files changed, 18 insertions, 9 deletions
diff --git a/src/elogin/config.c b/src/elogin/config.c
index 6abaa6c..dc0b10f 100644
--- a/src/elogin/config.c
+++ b/src/elogin/config.c
@@ -1,6 +1,8 @@
// Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// Copyright (c) 2014 Evol developers
+#include "common/hercules.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/elogin/init.c b/src/elogin/init.c
index 7d112ea..8e75241 100644
--- a/src/elogin/init.c
+++ b/src/elogin/init.c
@@ -1,6 +1,8 @@
// Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// Copyright (c) 2014 Evol developers
+#include "common/hercules.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -10,6 +12,8 @@
#include "common/mmo.h"
#include "common/socket.h"
#include "common/strlib.h"
+#include "common/timer.h"
+#include "common/mapindex.h"
#include "login/login.h"
#include "ecommon/init.h"
@@ -31,8 +35,6 @@ HPExport void plugin_init (void)
{
interfaces_init_common();
- login = GET_SYMBOL("login");
-
addPacket(0x7530, 22, login_parse_version, hpParse_Login);
addPacket(0x027c, 95, elogin_parse_client_login2, hpParse_Login);
addPacket(0x5000, 54, elogin_parse_change_paassword, hpParse_FromChar);
@@ -44,7 +46,6 @@ HPExport void plugin_init (void)
HPExport void server_preinit (void)
{
- iMalloc = GET_SYMBOL("iMalloc");
addLoginConf("update_server", config_update_server);
}
diff --git a/src/elogin/login.c b/src/elogin/login.c
index 3766a1e..ef64ce4 100644
--- a/src/elogin/login.c
+++ b/src/elogin/login.c
@@ -1,6 +1,8 @@
// Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// Copyright (c) 2014 Evol developers
+#include "common/hercules.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/elogin/parse.c b/src/elogin/parse.c
index 657ef7e..53857e6 100644
--- a/src/elogin/parse.c
+++ b/src/elogin/parse.c
@@ -1,6 +1,8 @@
// Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// Copyright (c) 2014 Evol developers
+#include "common/hercules.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -23,7 +25,7 @@ int clientVersion = 0;
void login_parse_version(int fd)
{
- struct login_session_data* sd = (struct login_session_data*)session[fd]->session_data;
+ struct login_session_data* sd = (struct login_session_data*)sockt->session[fd]->session_data;
if (!sd)
return;
@@ -67,7 +69,7 @@ int elogin_parse_client_login_pre(int *fdPtr,
return 1;
}
- short *ptr = RFIFOP(fd, 2);
+ short *ptr = (short*)RFIFOP(fd, 2);
if (*ptr == 20)
*ptr = clientVersion;
return 0;
@@ -77,7 +79,7 @@ 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;
+ sd = (struct login_session_data*)sockt->session[*fdPtr]->session_data;
if (sd)
sd->version = clientVersion;
return retVal;
@@ -104,13 +106,13 @@ void elogin_parse_client_login2(int fd)
safestrncpy(email, (const char*)RFIFOP(fd, 51), 40);
clienttype = RFIFOB(fd, 50);
- struct login_session_data* sd = (struct login_session_data*)session[fd]->session_data;
+ struct login_session_data* sd = (struct login_session_data*)sockt->session[fd]->session_data;
if (!sd)
return;
char ip[16];
- uint32 ipl = session[fd]->client_addr;
- ip2str(ipl, ip);
+ uint32 ipl = sockt->session[fd]->client_addr;
+ sockt->ip2str(ipl, ip);
sd->clienttype = clienttype;
sd->version = clientVersion;
sd->passwdenc = 0;
diff --git a/src/elogin/send.c b/src/elogin/send.c
index bcee1b5..021d40f 100644
--- a/src/elogin/send.c
+++ b/src/elogin/send.c
@@ -1,6 +1,8 @@
// Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// Copyright (c) 2014 Evol developers
+#include "common/hercules.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>