summaryrefslogtreecommitdiff
path: root/src/login
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-26 10:37:45 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-26 10:37:45 +0000
commit49e9510c432987393d10ec1b8b1c2d416c9feb42 (patch)
tree4d930ebf1094ad5972cb8ba20b89d12ce74d4f3c /src/login
parentfda87bd7ef5a71f4f5d5e604de1b15c58763efdd (diff)
downloadhercules-49e9510c432987393d10ec1b8b1c2d416c9feb42.tar.gz
hercules-49e9510c432987393d10ec1b8b1c2d416c9feb42.tar.bz2
hercules-49e9510c432987393d10ec1b8b1c2d416c9feb42.tar.xz
hercules-49e9510c432987393d10ec1b8b1c2d416c9feb42.zip
Adjusted eAthena code to compile cleanly in C++ mode.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12436 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/login')
-rw-r--r--src/login/login.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/login/login.c b/src/login/login.c
index 2931c87cb..7051ffb5e 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -131,7 +131,7 @@ void add_online_user(int char_server, int account_id)
struct online_login_data* p;
if( !login_config.online_check )
return;
- p = idb_ensure(online_db, account_id, create_online_user);
+ p = (struct online_login_data*)idb_ensure(online_db, account_id, create_online_user);
p->char_server = char_server;
if( p->waiting_disconnect != -1 )
{
@@ -154,7 +154,7 @@ void remove_online_user(int account_id)
static int waiting_disconnect_timer(int tid, unsigned int tick, int id, int data)
{
- struct online_login_data* p = idb_get(online_db, id);
+ struct online_login_data* p = (struct online_login_data*)idb_get(online_db, id);
if( p != NULL && p->waiting_disconnect == id )
{
p->waiting_disconnect = -1;
@@ -1122,7 +1122,7 @@ int mmo_auth(struct mmo_account* account, int fd)
else
safestrncpy(user_password, account->passwd, NAME_LENGTH);
- if( !check_password(session[fd]->session_data, account->passwdenc, user_password, auth_dat[i].pass) )
+ if( !check_password((struct login_session_data*)session[fd]->session_data, account->passwdenc, user_password, auth_dat[i].pass) )
{
ShowNotice("Invalid password (account: %s, pass: %s, received pass: %s, ip: %s)\n", account->userid, auth_dat[i].pass, (account->passwdenc) ? "[MD5]" : account->passwd, ip);
return 1; // 1 = Incorrect Password
@@ -1150,7 +1150,7 @@ int mmo_auth(struct mmo_account* account, int fd)
if( login_config.online_check )
{
- struct online_login_data* data = idb_get(online_db,auth_dat[i].account_id);
+ struct online_login_data* data = (struct online_login_data*)idb_get(online_db,auth_dat[i].account_id);
if( data )
{// account is already marked as online!
if( data->char_server > -1 )
@@ -1456,8 +1456,8 @@ int parse_fromchar(int fd)
char actual_email[40];
char new_email[40];
int account_id = RFIFOL(fd,2);
- safestrncpy(actual_email, RFIFOP(fd,6), 40); remove_control_chars(actual_email);
- safestrncpy(new_email, RFIFOP(fd,46), 40); remove_control_chars(new_email);
+ safestrncpy(actual_email, (char*)RFIFOP(fd,6), 40); remove_control_chars(actual_email);
+ safestrncpy(new_email, (char*)RFIFOP(fd,46), 40); remove_control_chars(new_email);
RFIFOSKIP(fd, 86);
if( e_mail_check(actual_email) == 0 )
@@ -1696,7 +1696,7 @@ int parse_fromchar(int fd)
users = RFIFOW(fd,4);
for (i = 0; i < users; i++) {
aid = RFIFOL(fd,6+i*4);
- p = idb_ensure(online_db, aid, create_online_user);
+ p = (struct online_login_data*)idb_ensure(online_db, aid, create_online_user);
p->char_server = id;
if (p->waiting_disconnect != -1)
{