summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/char_sql/char.c2
-rw-r--r--src/login/login.c6
-rw-r--r--src/login_sql/login.c14
3 files changed, 11 insertions, 11 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index bb826e258..2b405cade 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -2919,7 +2919,7 @@ int lan_subnetcheck(long *p) {
ShowInfo("Subnet check [%u.%u.%u.%u]: Matches "CL_CYAN"%u.%u.%u.%u/%u.%u.%u.%u"CL_RESET"\n",
src[0], src[1], src[2], src[3], sbn[0], sbn[1], sbn[2], sbn[3], msk[0], msk[1], msk[2], msk[3]);
- return subnet[i].char_ip;
+ return subnet[i].map_ip;
}
}
diff --git a/src/login/login.c b/src/login/login.c
index cb7f1980c..538df26ab 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -2981,7 +2981,7 @@ int parse_admin(int fd) {
// Test to know if an IP come from LAN or WAN.
// Rewrote: Adnvanced subnet check [LuzZza]
//--------------------------------------------
-int lan_subnetcheck(unsigned char *p) {
+int lan_subnetcheck(long *p) {
int i;
unsigned char *sbn, *msk, *src = (unsigned char *)p;
@@ -3105,11 +3105,11 @@ int parse_login(int fd) {
else
ShowInfo("Connection of the account '%s' accepted.\n", account.userid);
server_num = 0;
- WFIFOHEAD(fd, 47+32*MAX_SERVERS);
+ WFIFOHEAD(fd, 47+32*MAX_SERVERS);
for(i = 0; i < MAX_SERVERS; i++) {
if (server_fd[i] >= 0) {
// Andvanced subnet check [LuzZza]
- if((subnet_char_ip = lan_subnetcheck(p)))
+ if((subnet_char_ip = lan_subnetcheck((long*)p)))
WFIFOL(fd,47+server_num*32) = subnet_char_ip;
else
WFIFOL(fd,47+server_num*32) = server[i].ip;
diff --git a/src/login_sql/login.c b/src/login_sql/login.c
index b9b79940f..bf4acb534 100644
--- a/src/login_sql/login.c
+++ b/src/login_sql/login.c
@@ -570,7 +570,7 @@ int mmo_auth( struct mmo_account* account , int fd){
sprintf(ip, "%d.%d.%d.%d", sin_addr[0], sin_addr[1], sin_addr[2], sin_addr[3]);
- ShowInfo("auth start for %s...\n", ip);
+ //ShowInfo("auth start for %s...\n", ip);
//accountreg with _M/_F .. [Sirius]
len = strlen(account->userid) -2;
@@ -664,11 +664,11 @@ int mmo_auth( struct mmo_account* account , int fd){
} else {
jstrescapecpy(user_password, account->passwd);
}
- ShowInfo("account id ok encval:%d\n",account->passwdenc);
+ //ShowInfo("account id ok encval:%d\n",account->passwdenc);
#ifdef PASSWORDENC
if (account->passwdenc > 0) {
int j = account->passwdenc;
- ShowInfo("start md5calc..\n");
+ //ShowInfo("start md5calc..\n");
if (j > 2)
j = 1;
do {
@@ -678,13 +678,13 @@ int mmo_auth( struct mmo_account* account , int fd){
sprintf(md5str, "%s%s", sql_row[2], md5key);
} else
md5str[0] = 0;
- ShowDebug("j:%d mdstr:%s\n", j, md5str);
+ //ShowDebug("j:%d mdstr:%s\n", j, md5str);
MD5_String2binary(md5str, md5bin);
encpasswdok = (memcmp(user_password, md5bin, 16) == 0);
} while (j < 2 && !encpasswdok && (j++) != account->passwdenc);
//printf("key[%s] md5 [%s] ", md5key, md5);
- ShowInfo("client [%s] accountpass [%s]\n", user_password, sql_row[2]);
- ShowInfo("end md5calc..\n");
+ //ShowInfo("client [%s] accountpass [%s]\n", user_password, sql_row[2]);
+ //ShowInfo("end md5calc..\n");
}
#endif
if ((strcmp(user_password, sql_row[2]) && !encpasswdok)) {
@@ -709,7 +709,7 @@ int mmo_auth( struct mmo_account* account , int fd){
}
return 1;
}
- ShowInfo("auth ok %s %s" RETCODE, tmpstr, account->userid);
+ //ShowInfo("auth ok %s %s" RETCODE, tmpstr, account->userid);
}
/*