summaryrefslogtreecommitdiff
path: root/src/login
diff options
context:
space:
mode:
Diffstat (limited to 'src/login')
-rw-r--r--src/login/HPMlogin.c36
-rw-r--r--src/login/HPMlogin.h4
-rw-r--r--src/login/Makefile.in12
-rw-r--r--src/login/account.h6
-rw-r--r--src/login/account_sql.c23
-rw-r--r--src/login/ipban.h2
-rw-r--r--src/login/ipban_sql.c20
-rw-r--r--src/login/login.c36
-rw-r--r--src/login/login.h6
-rw-r--r--src/login/loginlog.h2
-rw-r--r--src/login/loginlog_sql.c15
11 files changed, 78 insertions, 84 deletions
diff --git a/src/login/HPMlogin.c b/src/login/HPMlogin.c
index 6b223d249..0a7729da8 100644
--- a/src/login/HPMlogin.c
+++ b/src/login/HPMlogin.c
@@ -5,26 +5,22 @@
#include "HPMlogin.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-
-#include "../common/HPM.h"
-#include "../common/cbasetypes.h"
-#include "../common/conf.h"
-#include "../common/db.h"
-#include "../common/des.h"
-#include "../common/ers.h"
-#include "../common/malloc.h"
-#include "../common/mapindex.h"
-#include "../common/mmo.h"
-#include "../common/showmsg.h"
-#include "../common/socket.h"
-#include "../common/strlib.h"
-#include "../common/sysinfo.h"
-
-#include "../common/HPMDataCheck.h"
+#include "common/HPM.h"
+#include "common/cbasetypes.h"
+
+#if 0 // TODO (HPMDataCheck is disabled for the time being)
+#include "common/conf.h"
+#include "common/db.h"
+#include "common/des.h"
+#include "common/ers.h"
+#include "common/mapindex.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "common/sysinfo.h"
+#include "login/login.h"
+#include "common/HPMDataCheck.h"
+#endif
bool HPM_login_grabHPData(struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr) {
/* record address */
diff --git a/src/login/HPMlogin.h b/src/login/HPMlogin.h
index 6e01eae01..2a4d5c538 100644
--- a/src/login/HPMlogin.h
+++ b/src/login/HPMlogin.h
@@ -8,8 +8,8 @@
#error You should never include HPMlogin.h from a plugin.
#endif
-#include "../common/cbasetypes.h"
-#include "../common/HPM.h"
+#include "common/cbasetypes.h"
+#include "common/HPM.h"
struct hplugin;
diff --git a/src/login/Makefile.in b/src/login/Makefile.in
index 9b1db69c2..60382dc87 100644
--- a/src/login/Makefile.in
+++ b/src/login/Makefile.in
@@ -9,18 +9,20 @@ CONFIG_H = $(wildcard $(CONFIG_D)/*.h) $(wildcard $(CONFIG_D)/*/*.h)
COMMON_D = ../common
COMMON_H = $(wildcard $(COMMON_D)/*.h)
SYSINFO_INC = $(COMMON_D)/sysinfo.inc
+COMMON_INCLUDE = -I..
-LIBCONFIG_D = ../../3rdparty/libconfig
+THIRDPARTY_D = ../../3rdparty
+THIRDPARTY_INCLUDE = -I$(THIRDPARTY_D)
+
+LIBCONFIG_D = $(THIRDPARTY_D)/libconfig
LIBCONFIG_OBJ = $(addprefix $(LIBCONFIG_D)/, libconfig.o grammar.o scanctx.o \
scanner.o strbuf.o)
LIBCONFIG_H = $(addprefix $(LIBCONFIG_D)/, libconfig.h grammar.h parsectx.h \
scanctx.h scanner.h strbuf.h wincompat.h)
-LIBCONFIG_INCLUDE = -I$(LIBCONFIG_D)
-MT19937AR_D = ../../3rdparty/mt19937ar
+MT19937AR_D = $(THIRDPARTY_D)/mt19937ar
MT19937AR_OBJ = $(MT19937AR_D)/mt19937ar.o
MT19937AR_H = $(MT19937AR_D)/mt19937ar.h
-MT19937AR_INCLUDE = -I$(MT19937AR_D)
LOGIN_C = account_sql.c HPMlogin.c ipban_sql.c login.c loginlog_sql.c
LOGIN_OBJ = $(addprefix obj_sql/, $(patsubst %.c,%.o,$(LOGIN_C)))
@@ -94,7 +96,7 @@ login-server: ../../login-server@EXEEXT@
obj_sql/%.o: %.c $(LOGIN_H) $(COMMON_H) $(CONFIG_H) $(MT19937AR_H) $(LIBCONFIG_H) | obj_sql
@echo " CC $<"
- @$(CC) @CFLAGS@ @DEFS@ $(MT19937AR_INCLUDE) $(LIBCONFIG_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
+ @$(CC) @CFLAGS@ @DEFS@ $(COMMON_INCLUDE) $(THIRDPARTY_INCLUDE) @MYSQL_CFLAGS@ @CPPFLAGS@ -c $(OUTPUT_OPTION) $<
# missing object files
$(COMMON_D)/obj_all/common.a:
diff --git a/src/login/account.h b/src/login/account.h
index 82ae28bbb..1e95c19de 100644
--- a/src/login/account.h
+++ b/src/login/account.h
@@ -5,9 +5,9 @@
#ifndef LOGIN_ACCOUNT_H
#define LOGIN_ACCOUNT_H
-#include "../common/cbasetypes.h"
-#include "../common/mmo.h" // ACCOUNT_REG2_NUM
-#include "../common/sql.h" // Sql
+#include "common/cbasetypes.h"
+#include "common/mmo.h" // ACCOUNT_REG2_NUM
+#include "common/sql.h" // Sql
typedef struct AccountDB AccountDB;
typedef struct AccountDBIterator AccountDBIterator;
diff --git a/src/login/account_sql.c b/src/login/account_sql.c
index 8975250b8..3f72e6867 100644
--- a/src/login/account_sql.c
+++ b/src/login/account_sql.c
@@ -4,21 +4,20 @@
#define HERCULES_CORE
-#include "../config/core.h" // CONSOLE_INPUT
+#include "config/core.h" // CONSOLE_INPUT
#include "account.h"
+#include "common/cbasetypes.h"
+#include "common/console.h"
+#include "common/malloc.h"
+#include "common/mmo.h"
+#include "common/nullpo.h"
+#include "common/showmsg.h"
+#include "common/socket.h"
+#include "common/sql.h"
+#include "common/strlib.h"
+
#include <stdlib.h>
-#include <string.h>
-
-#include "../common/console.h"
-#include "../common/malloc.h"
-#include "../common/mmo.h"
-#include "../common/nullpo.h"
-#include "../common/showmsg.h"
-#include "../common/socket.h"
-#include "../common/sql.h"
-#include "../common/strlib.h"
-#include "../common/timer.h"
/// global defines
#define ACCOUNT_SQL_DB_VERSION 20110114
diff --git a/src/login/ipban.h b/src/login/ipban.h
index c6535ec10..8f3cac16c 100644
--- a/src/login/ipban.h
+++ b/src/login/ipban.h
@@ -4,7 +4,7 @@
#ifndef LOGIN_IPBAN_H
#define LOGIN_IPBAN_H
-#include "../common/cbasetypes.h"
+#include "common/cbasetypes.h"
#ifdef HERCULES_CORE
// TODO: Interface
diff --git a/src/login/ipban_sql.c b/src/login/ipban_sql.c
index f995450ce..b4fce009d 100644
--- a/src/login/ipban_sql.c
+++ b/src/login/ipban_sql.c
@@ -6,19 +6,15 @@
#include "ipban.h"
+#include "login/login.h"
+#include "login/loginlog.h"
+#include "common/cbasetypes.h"
+#include "common/nullpo.h"
+#include "common/sql.h"
+#include "common/strlib.h"
+#include "common/timer.h"
+
#include <stdlib.h>
-#include <string.h>
-
-#include "login.h"
-#include "loginlog.h"
-#include "../common/cbasetypes.h"
-#include "../common/db.h"
-#include "../common/malloc.h"
-#include "../common/nullpo.h"
-#include "../common/sql.h"
-#include "../common/socket.h"
-#include "../common/strlib.h"
-#include "../common/timer.h"
// global sql settings
static char global_db_hostname[32] = "127.0.0.1";
diff --git a/src/login/login.c b/src/login/login.c
index 9c01c3956..1fdf2d198 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -6,26 +6,26 @@
#include "login.h"
+#include "login/HPMlogin.h"
+#include "login/account.h"
+#include "login/ipban.h"
+#include "login/loginlog.h"
+#include "common/HPM.h"
+#include "common/cbasetypes.h"
+#include "common/core.h"
+#include "common/db.h"
+#include "common/malloc.h"
+#include "common/md5calc.h"
+#include "common/nullpo.h"
+#include "common/random.h"
+#include "common/showmsg.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "common/timer.h"
+#include "common/utils.h"
+
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
-
-#include "HPMlogin.h"
-#include "account.h"
-#include "ipban.h"
-#include "loginlog.h"
-#include "../common/HPM.h"
-#include "../common/core.h"
-#include "../common/db.h"
-#include "../common/malloc.h"
-#include "../common/md5calc.h"
-#include "../common/nullpo.h"
-#include "../common/random.h"
-#include "../common/showmsg.h"
-#include "../common/socket.h"
-#include "../common/strlib.h"
-#include "../common/timer.h"
-#include "../common/utils.h"
struct login_interface login_s;
struct Login_Config login_config;
diff --git a/src/login/login.h b/src/login/login.h
index 22bae50e0..f05ff6d0f 100644
--- a/src/login/login.h
+++ b/src/login/login.h
@@ -5,8 +5,10 @@
#ifndef LOGIN_LOGIN_H
#define LOGIN_LOGIN_H
-#include "../common/core.h" // CORE_ST_LAST
-#include "../common/mmo.h" // NAME_LENGTH,SEX_*
+#include "common/cbasetypes.h"
+#include "common/core.h" // CORE_ST_LAST
+#include "common/db.h"
+#include "common/mmo.h" // NAME_LENGTH,SEX_*
struct mmo_account;
struct AccountDB;
diff --git a/src/login/loginlog.h b/src/login/loginlog.h
index 2104ff277..f4327764a 100644
--- a/src/login/loginlog.h
+++ b/src/login/loginlog.h
@@ -4,7 +4,7 @@
#ifndef LOGIN_LOGINLOG_H
#define LOGIN_LOGINLOG_H
-#include "../common/cbasetypes.h"
+#include "common/cbasetypes.h"
#ifdef HERCULES_CORE
// TODO: Interface
diff --git a/src/login/loginlog_sql.c b/src/login/loginlog_sql.c
index 2c6f76e38..da698e187 100644
--- a/src/login/loginlog_sql.c
+++ b/src/login/loginlog_sql.c
@@ -6,15 +6,14 @@
#include "loginlog.h"
-#include <string.h>
-#include <stdlib.h> // exit
+#include "common/cbasetypes.h"
+#include "common/mmo.h"
+#include "common/nullpo.h"
+#include "common/socket.h"
+#include "common/sql.h"
+#include "common/strlib.h"
-#include "../common/cbasetypes.h"
-#include "../common/mmo.h"
-#include "../common/nullpo.h"
-#include "../common/socket.h"
-#include "../common/sql.h"
-#include "../common/strlib.h"
+#include <stdlib.h> // exit
// global sql settings (in ipban_sql.c)
static char global_db_hostname[32] = "127.0.0.1";