summaryrefslogtreecommitdiff
path: root/src/login
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-12-09 17:19:43 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-12-09 17:19:43 +0000
commit4bb106036bb644e33fe41340b3ae8f7b603c1210 (patch)
treec8342fee4adbdb925ef60607882273441ef04200 /src/login
parent4d1b09949d8dfb0e111a2070486c79bb5ffbf971 (diff)
downloadhercules-4bb106036bb644e33fe41340b3ae8f7b603c1210.tar.gz
hercules-4bb106036bb644e33fe41340b3ae8f7b603c1210.tar.bz2
hercules-4bb106036bb644e33fe41340b3ae8f7b603c1210.tar.xz
hercules-4bb106036bb644e33fe41340b3ae8f7b603c1210.zip
small fix to the server's packet parsing code to display server IPs correctly.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11876 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/login')
-rw-r--r--src/login/login.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/login/login.c b/src/login/login.c
index 530d2eeda..a270a203a 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -1024,8 +1024,7 @@ int mmo_auth(struct mmo_account* account, int fd)
char user_password[32+1]; // reserve for md5-ed pw
char ip[16];
- uint8* sin_addr = (uint8*)&session[fd]->client_addr;
- sprintf(ip, "%u.%u.%u.%u", sin_addr[3], sin_addr[2], sin_addr[1], sin_addr[0]);
+ ip2str(session[fd]->client_addr, ip);
// DNS Blacklist check
if( login_config.use_dnsbl )
@@ -1034,6 +1033,7 @@ int mmo_auth(struct mmo_account* account, int fd)
char ip_dnsbl[256];
char* dnsbl_serv;
bool matched = false;
+ uint8* sin_addr = (uint8*)&session[fd]->client_addr;
sprintf(r_ip, "%u.%u.%u.%u", sin_addr[0], sin_addr[1], sin_addr[2], sin_addr[3]);
@@ -1817,7 +1817,7 @@ int parse_login(int fd)
struct mmo_account account;
int result, j;
unsigned int i;
- uint32 ipl = session[fd]->client_addr;
+ uint32 ipl;
char ip[16];
if( session[fd]->eof )
@@ -1826,6 +1826,7 @@ int parse_login(int fd)
return 0;
}
+ ipl = login_config.login_ip;
ip2str(ipl, ip);
while( RFIFOREST(fd) >= 2 )