summaryrefslogtreecommitdiff
path: root/src/login
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2014-05-10 17:17:13 +0200
committerHaru <haru@dotalux.com>2014-05-10 17:17:13 +0200
commit0ab52ac65bdba93be94e4149e267698d31b41d72 (patch)
treee7f0cd0d549c8a04a35693cc98b6b27c06eeb2ed /src/login
parent94657284973f4037596bae468ebfbee5c217e02b (diff)
downloadhercules-0ab52ac65bdba93be94e4149e267698d31b41d72.tar.gz
hercules-0ab52ac65bdba93be94e4149e267698d31b41d72.tar.bz2
hercules-0ab52ac65bdba93be94e4149e267698d31b41d72.tar.xz
hercules-0ab52ac65bdba93be94e4149e267698d31b41d72.zip
Re-commit of "Fixed order of includes in all source files"
This reverts commit 94657284973f4037596bae468ebfbee5c217e02b.
Diffstat (limited to 'src/login')
-rw-r--r--src/login/account.h1
-rw-r--r--src/login/account_sql.c17
-rw-r--r--src/login/ipban_sql.c14
-rw-r--r--src/login/login.c21
-rw-r--r--src/login/login.h2
-rw-r--r--src/login/loginlog.h2
-rw-r--r--src/login/loginlog_sql.c9
7 files changed, 42 insertions, 24 deletions
diff --git a/src/login/account.h b/src/login/account.h
index 234e7c0c1..329ae31c8 100644
--- a/src/login/account.h
+++ b/src/login/account.h
@@ -7,6 +7,7 @@
#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 1483196ab..2e4ed7ab9 100644
--- a/src/login/account_sql.c
+++ b/src/login/account_sql.c
@@ -2,17 +2,22 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
+#define HERCULES_CORE
+
+#include "../config/core.h" // CONSOLE_INPUT
+#include "account.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "../common/console.h"
#include "../common/malloc.h"
#include "../common/mmo.h"
#include "../common/showmsg.h"
+#include "../common/socket.h"
#include "../common/sql.h"
#include "../common/strlib.h"
#include "../common/timer.h"
-#include "../common/console.h"
-#include "../common/socket.h"
-#include "account.h"
-#include <stdlib.h>
-#include <string.h>
/// global defines
#define ACCOUNT_SQL_DB_VERSION 20110114
@@ -652,7 +657,7 @@ Sql* account_db_sql_up(AccountDB* self) {
AccountDB_SQL* db = (AccountDB_SQL*)self;
Sql_HerculesUpdateCheck(db->accounts);
#ifdef CONSOLE_INPUT
- console->setSQL(db->accounts);
+ console->input->setSQL(db->accounts);
#endif
return db->accounts;
}
diff --git a/src/login/ipban_sql.c b/src/login/ipban_sql.c
index 74f45e418..081f28d84 100644
--- a/src/login/ipban_sql.c
+++ b/src/login/ipban_sql.c
@@ -2,6 +2,15 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
+#define HERCULES_CORE
+
+#include "ipban.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"
@@ -9,11 +18,6 @@
#include "../common/socket.h"
#include "../common/strlib.h"
#include "../common/timer.h"
-#include "login.h"
-#include "ipban.h"
-#include "loginlog.h"
-#include <stdlib.h>
-#include <string.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 af59fcf38..cb46e0226 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -2,6 +2,18 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
+#define HERCULES_CORE
+
+#include "login.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.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"
@@ -12,15 +24,6 @@
#include "../common/strlib.h"
#include "../common/timer.h"
#include "../common/utils.h"
-#include "../common/HPM.h"
-#include "account.h"
-#include "ipban.h"
-#include "login.h"
-#include "loginlog.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
struct Login_Config login_config;
diff --git a/src/login/login.h b/src/login/login.h
index 14c361a15..e77b96a0e 100644
--- a/src/login/login.h
+++ b/src/login/login.h
@@ -5,8 +5,8 @@
#ifndef _LOGIN_LOGIN_H_
#define _LOGIN_LOGIN_H_
-#include "../common/mmo.h" // NAME_LENGTH,SEX_*
#include "../common/core.h" // CORE_ST_LAST
+#include "../common/mmo.h" // NAME_LENGTH,SEX_*
enum E_LOGINSERVER_ST
{
diff --git a/src/login/loginlog.h b/src/login/loginlog.h
index 730fb6e62..a86ad431c 100644
--- a/src/login/loginlog.h
+++ b/src/login/loginlog.h
@@ -4,6 +4,7 @@
#ifndef _LOGIN_LOGINLOG_H_
#define _LOGIN_LOGINLOG_H_
+#include "../common/cbasetypes.h"
unsigned long loginlog_failedattempts(uint32 ip, unsigned int minutes);
void login_log(uint32 ip, const char* username, int rcode, const char* message);
@@ -11,5 +12,4 @@ bool loginlog_init(void);
bool loginlog_final(void);
bool loginlog_config_read(const char* w1, const char* w2);
-
#endif /* _LOGIN_LOGINLOG_H_ */
diff --git a/src/login/loginlog_sql.c b/src/login/loginlog_sql.c
index 231ac783b..2cbc02c93 100644
--- a/src/login/loginlog_sql.c
+++ b/src/login/loginlog_sql.c
@@ -2,13 +2,18 @@
// See the LICENSE file
// Portions Copyright (c) Athena Dev Teams
+#define HERCULES_CORE
+
+#include "loginlog.h"
+
+#include <string.h>
+#include <stdlib.h> // exit
+
#include "../common/cbasetypes.h"
#include "../common/mmo.h"
#include "../common/socket.h"
#include "../common/sql.h"
#include "../common/strlib.h"
-#include <string.h>
-#include <stdlib.h> // exit
// global sql settings (in ipban_sql.c)
static char global_db_hostname[32] = "127.0.0.1";