summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-22 08:50:36 +0000
committerLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-22 08:50:36 +0000
commitb219bc963c87f335cd9c0edd9114982b8e02f4aa (patch)
treee01eaab0b8c477fd9ce0f292bec10864cbc63ab4 /src
parent23aa6d218ca1c69f234725f5d78aae1f42e326db (diff)
downloadhercules-b219bc963c87f335cd9c0edd9114982b8e02f4aa.tar.gz
hercules-b219bc963c87f335cd9c0edd9114982b8e02f4aa.tar.bz2
hercules-b219bc963c87f335cd9c0edd9114982b8e02f4aa.tar.xz
hercules-b219bc963c87f335cd9c0edd9114982b8e02f4aa.zip
* [Fixed]:
- Compilation warnings and errors. [Improved]: - Changed and moved IP sync status messages to elaborate more. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7290 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/char/char.c4
-rw-r--r--src/char_sql/char.c4
-rw-r--r--src/login/login.c4
-rw-r--r--src/login_sql/login.c2
-rw-r--r--src/map/chrif.c2
-rw-r--r--src/map/map.c3
6 files changed, 11 insertions, 8 deletions
diff --git a/src/char/char.c b/src/char/char.c
index d0c13c105..9ee40416e 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -2290,9 +2290,9 @@ int parse_tologin(int fd) {
case 0x2735:
{
unsigned char ip[4];
- ShowInfo("IP Sync in progress...\n");
if (char_server_dns && resolve_hostbyname(char_server_dns, ip, NULL))
{
+ ShowInfo("IP Sync [%s] in progress...\n",char_server_dns);
WFIFOW(fd,0) = 0x2736;
WFIFOB(fd,2) = ip[0];
WFIFOB(fd,3) = ip[1];
@@ -3073,7 +3073,7 @@ int parse_frommap(int fd) {
case 0x2736:
for(i = 0; i < MAX_MAP_SERVERS; i++){
if(server_fd[i] == fd){
- ShowInfo("IP Sync (Server #%d) successful.\n",i);
+ ShowInfo("IP Sync (Server #%d %d.%d.%d.%d) successful.\n",i,(int)RFIFOB(fd,2),(int)RFIFOB(fd,3),(int)RFIFOB(fd,4),(int)RFIFOB(fd,5));
server[i].ip = RFIFOL(fd, 2);
}
}
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index e1ba1455b..e97535454 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -2175,9 +2175,9 @@ int parse_tologin(int fd) {
case 0x2735:
{
unsigned char ip_str[4];
- ShowInfo("IP Sync in progress...\n");
if (char_server_dns && resolve_hostbyname(char_server_dns, ip_str, NULL))
{
+ ShowInfo("IP Sync [%s] in progress...\n",char_server_dns);
WFIFOW(fd,0) = 0x2736;
WFIFOB(fd,2) = ip_str[0];
WFIFOB(fd,3) = ip_str[1];
@@ -2990,7 +2990,7 @@ int parse_frommap(int fd) {
case 0x2736:
for(i = 0; i < MAX_MAP_SERVERS; i++){
if(server_fd[i] == fd){
- ShowInfo("IP Sync (Server #%d) successful.\n",i);
+ ShowInfo("IP Sync (Server #%d %d.%d.%d.%d) successful.\n",i,(int)RFIFOB(fd,2),(int)RFIFOB(fd,3),(int)RFIFOB(fd,4),(int)RFIFOB(fd,5));
server[i].ip = RFIFOL(fd, 2);
}
}
diff --git a/src/login/login.c b/src/login/login.c
index 41d51220a..fe40c67ee 100644
--- a/src/login/login.c
+++ b/src/login/login.c
@@ -1172,7 +1172,7 @@ int mmo_auth(struct mmo_account* account, int fd) {
while((dnsbl_serv=strtok(dnsbl_servs,","))) {
sprintf(ip_dnsbl,"%s.%s",r_ip,dnsbl_serv);
- if(resolve_hostbyname(ip_dnsbl,NULL,NULL)!=NULL) {
+ if(resolve_hostbyname(ip_dnsbl,NULL,NULL)!=0) {
ShowInfo("DNSBL: (%s) Blacklisted. User Kicked.\n",ip);
return 3;
}
@@ -1958,7 +1958,7 @@ int parse_fromchar(int fd) {
case 0x2736: // WAN IP update from char-server
for(i = 0; i < MAX_SERVERS; i++) {
if (server_fd[i] == fd) {
- ShowInfo("IP Sync (Server #%d) successful.\n",i);
+ ShowInfo("IP Sync (Server #%d %d.%d.%d.%d) successful.\n",i,(int)RFIFOB(fd,2),(int)RFIFOB(fd,3),(int)RFIFOB(fd,4),(int)RFIFOB(fd,5));
server[i].ip = RFIFOL(fd,2);
}
}
diff --git a/src/login_sql/login.c b/src/login_sql/login.c
index a152b7dc4..180ac9c08 100644
--- a/src/login_sql/login.c
+++ b/src/login_sql/login.c
@@ -1398,7 +1398,7 @@ int parse_fromchar(int fd){
case 0x2736: // WAN IP update from char-server
for(i = 0; i < MAX_SERVERS; i++) {
if (server_fd[i] == fd) {
- ShowInfo("IP Sync (Server #%d) successful.\n",i);
+ ShowInfo("IP Sync (Server #%d %d.%d.%d.%d) successful.\n",i,(int)RFIFOB(fd,2),(int)RFIFOB(fd,3),(int)RFIFOB(fd,4),(int)RFIFOB(fd,5));
server[i].ip = RFIFOL(fd,2);
}
}
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 19002eab4..5b7dee2de 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -1414,8 +1414,8 @@ int chrif_disconnect(int fd) {
void chrif_update_ip(int fd){
char ip[4];
- ShowInfo("IP Sync in progress...\n");
if (map_server_dns && resolve_hostbyname(map_server_dns, ip, NULL)) {
+ ShowInfo("IP Sync [%s] in progress...\n",map_server_dns);
WFIFOW(fd, 0) = 0x2736;
WFIFOB(fd, 2) = ip[0];
WFIFOB(fd, 3) = ip[1];
diff --git a/src/map/map.c b/src/map/map.c
index 34498bd89..0aa48b914 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -6,7 +6,10 @@
#include <string.h>
#include <stdarg.h>
#include <math.h>
+
+#ifndef _WIN32
#include <unistd.h>
+#endif
#include "../common/core.h"
#include "../common/timer.h"