summaryrefslogtreecommitdiff
path: root/src/login
diff options
context:
space:
mode:
Diffstat (limited to 'src/login')
-rw-r--r--src/login/login.c16
-rw-r--r--src/login/login.h2
2 files changed, 11 insertions, 7 deletions
diff --git a/src/login/login.c b/src/login/login.c
index 59a110348..e888d21f6 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -577,7 +577,7 @@ int parse_fromchar(int fd)
struct mmo_account acc;
int account_id = RFIFOL(fd,2);
- int state = RFIFOL(fd,6);
+ unsigned int state = RFIFOL(fd,6);
RFIFOSKIP(fd,10);
if( !accounts->load_num(accounts, &acc, account_id) )
@@ -1543,7 +1543,7 @@ int login_config_read(const char* cfgName)
else if(!strcmpi(w1, "check_client_version"))
login_config.check_client_version = (bool)config_switch(w2);
else if(!strcmpi(w1, "client_version_to_connect"))
- login_config.client_version_to_connect = atoi(w2);
+ login_config.client_version_to_connect = strtoul(w2, NULL, 10);
else if(!strcmpi(w1, "use_MD5_passwords"))
login_config.use_md5_passwds = (bool)config_switch(w2);
else if(!strcmpi(w1, "min_level_to_connect"))
@@ -1723,14 +1723,18 @@ int do_init(int argc, char** argv)
accounts = get_account_engine();
if( accounts == NULL )
{
- ShowError("do_init: account engine '%s' not found.\n", login_config.account_engine);
- runflag = 0;
- return 1;
+ ShowFatalError("do_init: account engine '%s' not found.\n", login_config.account_engine);
+ exit(EXIT_FAILURE);
}
else
{
ShowInfo("Using account engine '%s'.\n", login_config.account_engine);
- accounts->init(accounts);
+
+ if(!accounts->init(accounts))
+ {
+ ShowFatalError("do_init: Failed to initialize account engine '%s'.\n", login_config.account_engine);
+ exit(EXIT_FAILURE);
+ }
}
if( login_config.console )
diff --git a/src/login/login.h b/src/login/login.h
index 2e5af3b5e..807caaed6 100644
--- a/src/login/login.h
+++ b/src/login/login.h
@@ -58,7 +58,7 @@ struct Login_Config {
bool use_md5_passwds; // work with password hashes instead of plaintext passwords?
int min_level_to_connect; // minimum level of player/GM (0: player, 1-99: GM) to connect
bool check_client_version; // check the clientversion set in the clientinfo ?
- int client_version_to_connect; // the client version needed to connect (if checking is enabled)
+ uint32 client_version_to_connect; // the client version needed to connect (if checking is enabled)
bool admin_state; // is ladmin support enabled?
char admin_pass[24]; // security password for ladmin