summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHaruna <haru@dotalux.com>2014-11-14 21:29:31 +0100
committerHaruna <haru@dotalux.com>2014-11-14 21:29:31 +0100
commit77b88fe80b907122b24d698938538c22e029d25f (patch)
tree376fcf9361c8bff543f4fb570037c058274addc0 /src
parent1ea115f7d795f8f5dea429172d7b4ab8f2b14d18 (diff)
parentec38bdbbed042537eb171eaf4436d7b250ab6766 (diff)
downloadhercules-77b88fe80b907122b24d698938538c22e029d25f.tar.gz
hercules-77b88fe80b907122b24d698938538c22e029d25f.tar.bz2
hercules-77b88fe80b907122b24d698938538c22e029d25f.tar.xz
hercules-77b88fe80b907122b24d698938538c22e029d25f.zip
Merge pull request #390 from 4144/loginpluginsext
add missing variables into interface in login server
Diffstat (limited to 'src')
-rw-r--r--src/login/login.c5
-rw-r--r--src/login/login.h2
2 files changed, 5 insertions, 2 deletions
diff --git a/src/login/login.c b/src/login/login.c
index 03921a413..b9de09fcd 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -1945,8 +1945,6 @@ int do_init(int argc, char** argv)
{
int i;
- login_defaults();
-
// initialize engine (to accept config settings)
account_engine[0].db = account_engine[0].constructor();
accounts = account_engine[0].db;
@@ -1955,6 +1953,8 @@ int do_init(int argc, char** argv)
exit(EXIT_FAILURE);
}
+ login_defaults();
+
// read login-server configuration
login_set_defaults();
@@ -2045,6 +2045,7 @@ void login_defaults(void) {
login = &login_s;
login->lc = &login_config;
+ login->accounts = accounts;
login->mmo_auth = login_mmo_auth;
login->mmo_auth_new = login_mmo_auth_new;
diff --git a/src/login/login.h b/src/login/login.h
index 1dd402291..f86abaf4b 100644
--- a/src/login/login.h
+++ b/src/login/login.h
@@ -9,6 +9,7 @@
#include "../common/mmo.h" // NAME_LENGTH,SEX_*
struct mmo_account;
+struct AccountDB;
enum E_LOGINSERVER_ST
{
@@ -140,6 +141,7 @@ struct login_interface {
DBMap* online_db;
int fd;
struct Login_Config *lc;
+ struct AccountDB* accounts;
int (*mmo_auth) (struct login_session_data* sd, bool isServer);
int (*mmo_auth_new) (const char* userid, const char* pass, const char sex, const char* last_ip);