summaryrefslogtreecommitdiff
path: root/src/login/account_sql.c
diff options
context:
space:
mode:
authorHaruna <haru@dotalux.com>2014-10-31 01:18:40 +0100
committerHaruna <haru@dotalux.com>2014-10-31 01:18:40 +0100
commit1d0452110f4b02f6d771c61d5c3a944f82b155f3 (patch)
treeb36963aeb2f4924e49b5f4e80c270bf4275fb4c4 /src/login/account_sql.c
parent72e18cdf9b612c476dd9ab2d45394c5e882e7dd1 (diff)
parent60becfc70e65ba7920079f990bfaa11851369f0c (diff)
downloadhercules-1d0452110f4b02f6d771c61d5c3a944f82b155f3.tar.gz
hercules-1d0452110f4b02f6d771c61d5c3a944f82b155f3.tar.bz2
hercules-1d0452110f4b02f6d771c61d5c3a944f82b155f3.tar.xz
hercules-1d0452110f4b02f6d771c61d5c3a944f82b155f3.zip
Merge pull request #378 from HerculesWS/hpmupdates
Char and login server preliminary support for the HPM system
Diffstat (limited to 'src/login/account_sql.c')
-rw-r--r--src/login/account_sql.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/login/account_sql.c b/src/login/account_sql.c
index 10852e5b1..5f9357c81 100644
--- a/src/login/account_sql.c
+++ b/src/login/account_sql.c
@@ -169,6 +169,10 @@ static bool account_db_sql_init(AccountDB* self)
if( codepage[0] != '\0' && SQL_ERROR == SQL->SetEncoding(sql_handle, codepage) )
Sql_ShowDebug(sql_handle);
+ Sql_HerculesUpdateCheck(db->accounts);
+#ifdef CONSOLE_INPUT
+ console->input->setSQL(db->accounts);
+#endif
return true;
}
@@ -655,11 +659,7 @@ static bool mmo_auth_tosql(AccountDB_SQL* db, const struct mmo_account* acc, boo
Sql* account_db_sql_up(AccountDB* self) {
AccountDB_SQL* db = (AccountDB_SQL*)self;
- Sql_HerculesUpdateCheck(db->accounts);
-#ifdef CONSOLE_INPUT
- console->input->setSQL(db->accounts);
-#endif
- return db->accounts;
+ return db ? db->accounts : NULL;
}
void mmo_save_accreg2(AccountDB* self, int fd, int account_id, int char_id) {
Sql* sql_handle = ((AccountDB_SQL*)self)->accounts;