- Fixed a bug on the last fix :P
- Removed some of those annoying login-SQL on-log messages that are totally useless. git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5459 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
37912c2a7b
commit
8e70128bf9
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user