summaryrefslogtreecommitdiff
path: root/src/char_sql/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_sql/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_sql/char.c')
-rw-r--r--src/char_sql/char.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index 4e325700e..5cc0191e5 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -2245,11 +2245,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) //Update login ip, too.
login_ip = new_ip;
- new_ip = resolve_hostbyname(char_ip_str, NULL, NULL);
+ new_ip = host2ip(char_ip_str);
if (new_ip && new_ip != char_ip)
{ //Update ip.
char_ip = new_ip;
@@ -4059,27 +4059,27 @@ int char_config_read(const char *cfgName) {
wisp_server_name[sizeof(wisp_server_name) - 1] = '\0';
}
} else if (strcmpi(w1, "login_ip") == 0) {
- unsigned char ip_str[16];
- login_ip = resolve_hostbyname(w2, NULL, ip_str);
+ char ip_str[16];
+ 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) {
- unsigned char ip_str[16];
- char_ip = resolve_hostbyname(w2, NULL, ip_str);
+ char ip_str[16];
+ 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) {
- unsigned char ip_str[16];
- bind_ip = resolve_hostbyname(w2, NULL, ip_str);
+ char ip_str[16];
+ 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);