From 37cc17c1b9a2dd29e1623a46cfc332e1aeb76751 Mon Sep 17 00:00:00 2001 From: ultramage Date: Mon, 2 Apr 2007 13:46:11 +0000 Subject: * Some source code cleaning - Fixed the badly worded messages during mapserver startup - Cleaned up socket config reading - Split resolve_hostbyname() into 2 separate functions for clarity - Moved the probably obsolete LOWER/UPPER macros to db.c (TODO: remove) - Moved the badly placed compare_item() function to storage.c (see r779) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10119 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/char/char.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/char/char.c') diff --git a/src/char/char.c b/src/char/char.c index 68d67f56c..a09ca72dd 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -2478,11 +2478,11 @@ int parse_tologin(int fd) { WBUFW(buf,0) = 0x2b1e; mapif_sendall(buf, 2); - new_ip = resolve_hostbyname(login_ip_str, NULL, NULL); + new_ip = host2ip(login_ip_str); if (new_ip && new_ip != login_ip) login_ip = new_ip; //Update login up. - new_ip = resolve_hostbyname(char_ip_str, NULL, NULL); + new_ip = host2ip(char_ip_str); if (new_ip && new_ip != char_ip) { //Update ip. WFIFOHEAD(fd,6); @@ -4113,26 +4113,26 @@ int char_config_read(const char *cfgName) { } } else if (strcmpi(w1, "login_ip") == 0) { char ip_str[16]; - login_ip = resolve_hostbyname(w2, NULL, ip_str); + login_ip = host2ip(w2); if (login_ip) { strncpy(login_ip_str, w2, sizeof(login_ip_str)); - ShowStatus("Login server IP address : %s -> %s\n", w2, ip_str); + ShowStatus("Login server IP address : %s -> %s\n", w2, ip2str(login_ip, ip_str)); } } else if (strcmpi(w1, "login_port") == 0) { login_port = atoi(w2); } else if (strcmpi(w1, "char_ip") == 0) { char ip_str[16]; - char_ip = resolve_hostbyname(w2, NULL, ip_str); + char_ip = host2ip(w2); if (char_ip){ strncpy(char_ip_str, w2, sizeof(char_ip_str)); - ShowStatus("Character server IP address : %s -> %s\n", w2, ip_str); + ShowStatus("Character server IP address : %s -> %s\n", w2, ip2str(char_ip, ip_str)); } } else if (strcmpi(w1, "bind_ip") == 0) { char ip_str[16]; - bind_ip = resolve_hostbyname(w2, NULL, ip_str); + bind_ip = host2ip(w2); if (bind_ip) { strncpy(bind_ip_str, w2, sizeof(bind_ip_str)); - ShowStatus("Character server binding IP address : %s -> %s\n", w2, ip_str); + ShowStatus("Character server binding IP address : %s -> %s\n", w2, ip2str(bind_ip, ip_str)); } } else if (strcmpi(w1, "char_port") == 0) { char_port = atoi(w2); -- cgit v1.2.3-60-g2f50