summaryrefslogtreecommitdiff
path: root/src/login
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-02-14 17:04:42 -0200
committershennetsind <ind@henn.et>2013-02-14 17:15:36 -0200
commit810ba40b78087cc6aa7eb9ad3a3e46534393b9e8 (patch)
treee205d88bc02194101fc2a7aa2d80e5d884fe8a9c /src/login
parent20abc4a94a4bd3a7428c042cc6d1c313272fbc28 (diff)
downloadhercules-810ba40b78087cc6aa7eb9ad3a3e46534393b9e8.tar.gz
hercules-810ba40b78087cc6aa7eb9ad3a3e46534393b9e8.tar.bz2
hercules-810ba40b78087cc6aa7eb9ad3a3e46534393b9e8.tar.xz
hercules-810ba40b78087cc6aa7eb9ad3a3e46534393b9e8.zip
Introducing MySQL DB Update Checker
First version. Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/login')
-rw-r--r--src/login/account.h1
-rw-r--r--src/login/account_sql.c4
-rw-r--r--src/login/login.c4
3 files changed, 8 insertions, 1 deletions
diff --git a/src/login/account.h b/src/login/account.h
index 1b567be70..adbcb7102 100644
--- a/src/login/account.h
+++ b/src/login/account.h
@@ -152,5 +152,6 @@ struct AccountDB
AccountDBIterator* (*iterator)(AccountDB* self);
};
+void account_db_sql_up(AccountDB* self);
#endif // __ACCOUNT_H_INCLUDED__
diff --git a/src/login/account_sql.c b/src/login/account_sql.c
index 5073941e2..ae80163af 100644
--- a/src/login/account_sql.c
+++ b/src/login/account_sql.c
@@ -678,3 +678,7 @@ static bool mmo_auth_tosql(AccountDB_SQL* db, const struct mmo_account* acc, boo
return result;
}
+void account_db_sql_up(AccountDB* self) {
+ AccountDB_SQL* db = (AccountDB_SQL*)self;
+ Sql_HerculesUpdateCheck(db->accounts);
+} \ No newline at end of file
diff --git a/src/login/login.c b/src/login/login.c
index 7f272e2a4..c7e250040 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -1879,6 +1879,8 @@ int do_init(int argc, char** argv)
ShowStatus("The login-server is "CL_GREEN"ready"CL_RESET" (Server is listening on the port %u).\n\n", login_config.login_port);
login_log(0, "login server", 100, "login server started");
-
+
+ account_db_sql_up(accounts);
+
return 0;
}