summaryrefslogtreecommitdiff
path: root/src/char/char.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-02 13:46:11 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-02 13:46:11 +0000
commit37cc17c1b9a2dd29e1623a46cfc332e1aeb76751 (patch)
tree6f8dd05942422f043ef2df9e9364dd954a826bb3 /src/char/char.c
parent5758d3649f0bf74677b3f470acb4e17a98910100 (diff)
downloadhercules-37cc17c1b9a2dd29e1623a46cfc332e1aeb76751.tar.gz
hercules-37cc17c1b9a2dd29e1623a46cfc332e1aeb76751.tar.bz2
hercules-37cc17c1b9a2dd29e1623a46cfc332e1aeb76751.tar.xz
hercules-37cc17c1b9a2dd29e1623a46cfc332e1aeb76751.zip
* 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
Diffstat (limited to 'src/char/char.c')
-rw-r--r--src/char/char.c16
1 files changed, 8 insertions, 8 deletions
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);