summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt4
-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
7 files changed, 15 insertions, 8 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 1b49ba9e9..e711c320e 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,10 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/06/21
+ * [Fixed]:
+ - Compilation warnings and errors.
+ [Improved]:
+ - Changed and moved IP sync status messages to elaborate more. [Lance]
* Tested and fixed resolve_hostbyname. Applied said function around most of
the code where needed. Removed includes for the OS/network system pretty
much from every file (our socket.c file should handle this) [Skotlex]
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"