diff options
author | Haru <haru@dotalux.com> | 2014-05-04 06:13:56 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2014-05-09 08:29:46 +0200 |
commit | b6b3f58795288701d0e162d43fa6f0a47af913b3 (patch) | |
tree | a75f686731786ed1746325589d8acb1569409981 /src/login | |
parent | 1c4e3820d5f4ff9870c28104122f6733db4d55a6 (diff) | |
download | hercules-b6b3f58795288701d0e162d43fa6f0a47af913b3.tar.gz hercules-b6b3f58795288701d0e162d43fa6f0a47af913b3.tar.bz2 hercules-b6b3f58795288701d0e162d43fa6f0a47af913b3.tar.xz hercules-b6b3f58795288701d0e162d43fa6f0a47af913b3.zip |
Fixed order of includes in all source files
- Changed order according to the (upcoming) code style guidelines.
- Fixes several issues caused by missing headers when their include
order is changed or in plugins.
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/login')
-rw-r--r-- | src/login/account.h | 1 | ||||
-rw-r--r-- | src/login/account_sql.c | 17 | ||||
-rw-r--r-- | src/login/ipban_sql.c | 14 | ||||
-rw-r--r-- | src/login/login.c | 21 | ||||
-rw-r--r-- | src/login/login.h | 2 | ||||
-rw-r--r-- | src/login/loginlog.h | 2 | ||||
-rw-r--r-- | src/login/loginlog_sql.c | 9 |
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"; |