summaryrefslogtreecommitdiff
path: root/src/char
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-04-25 17:28:48 +0200
committerGitHub <noreply@github.com>2018-04-25 17:28:48 +0200
commita1f048fc6bdb14199cfaaf2b8f221333a764ddc9 (patch)
treebbabede2500cdafa2a1a8ea4e9b546bbc0cace8d /src/char
parenta4df55e940057e2882a4b01dd1471c73af70e2bd (diff)
parent0903a1f80285f02e1c902dafb2ab5e1783b9e671 (diff)
downloadhercules-a1f048fc6bdb14199cfaaf2b8f221333a764ddc9.tar.gz
hercules-a1f048fc6bdb14199cfaaf2b8f221333a764ddc9.tar.bz2
hercules-a1f048fc6bdb14199cfaaf2b8f221333a764ddc9.tar.xz
hercules-a1f048fc6bdb14199cfaaf2b8f221333a764ddc9.zip
Merge pull request #2023 from MishimaHaruna/remove-stat-server
Remove stat server
Diffstat (limited to 'src/char')
-rw-r--r--src/char/char.c46
-rw-r--r--src/char/char.h3
-rw-r--r--src/char/inter.c3
3 files changed, 3 insertions, 49 deletions
diff --git a/src/char/char.c b/src/char/char.c
index 7e5b7e0dc..de4c4c8f0 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2012-2016 Hercules Dev Team
+ * Copyright (C) 2012-2018 Hercules Dev Team
* Copyright (C) Athena Dev Teams
*
* Hercules is free software: you can redistribute it and/or modify
@@ -3803,41 +3803,6 @@ void char_parse_frommap_update_ip(int fd, int id)
RFIFOSKIP(fd,6);
}
-void char_parse_frommap_request_stats_report(int fd)
-{
- int sfd;/* stat server fd */
- struct hSockOpt opt;
- RFIFOSKIP(fd, 2);/* we skip first 2 bytes which are the 0x3008, so we end up with a buffer equal to the one we send */
-
- opt.silent = 1;
- opt.setTimeo = 1;
-
- if ((sfd = sockt->make_connection(sockt->host2ip("stats.herc.ws"),(uint16)25427,&opt) ) == -1) {
- RFIFOSKIP(fd, RFIFOW(fd,2) );/* skip this packet */
- RFIFOFLUSH(fd);
- return;/* connection not possible, we drop the report */
- }
-
- sockt->session[sfd]->flag.server = 1;/* to ensure we won't drop our own packet */
- sockt->realloc_fifo(sfd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK);
-
- WFIFOHEAD(sfd, RFIFOW(fd,2) );
-
- memcpy(WFIFOP(sfd,0), RFIFOP(fd, 0), RFIFOW(fd,2));
-
- WFIFOSET(sfd, RFIFOW(fd,2) );
-
- do {
- sockt->flush(sfd);
- HSleep(1);
- } while( !sockt->session[sfd]->flag.eof && sockt->session[sfd]->wdata_size );
-
- sockt->close(sfd);
-
- RFIFOSKIP(fd, RFIFOW(fd,2) );/* skip this packet */
- RFIFOFLUSH(fd);
-}
-
void char_parse_frommap_scdata_update(int fd)
{
int account_id = RFIFOL(fd, 2);
@@ -4068,14 +4033,6 @@ int char_parse_frommap(int fd)
chr->parse_frommap_update_ip(fd, id);
break;
- case 0x3008:
- if( RFIFOREST(fd) < RFIFOW(fd,4) )
- return 0;/* packet wasn't fully received yet (still fragmented) */
- else {
- chr->parse_frommap_request_stats_report(fd);
- }
- break;
-
/* individual sc data insertion/update */
case 0x2740:
if( RFIFOREST(fd) < 28 )
@@ -6577,7 +6534,6 @@ void char_defaults(void)
chr->map_auth_failed = char_map_auth_failed;
chr->parse_frommap_auth_request = char_parse_frommap_auth_request;
chr->parse_frommap_update_ip = char_parse_frommap_update_ip;
- chr->parse_frommap_request_stats_report = char_parse_frommap_request_stats_report;
chr->parse_frommap_scdata_update = char_parse_frommap_scdata_update;
chr->parse_frommap_scdata_delete = char_parse_frommap_scdata_delete;
chr->parse_frommap = char_parse_frommap;
diff --git a/src/char/char.h b/src/char/char.h
index 3689690c7..93b236966 100644
--- a/src/char/char.h
+++ b/src/char/char.h
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2012-2016 Hercules Dev Team
+ * Copyright (C) 2012-2018 Hercules Dev Team
* Copyright (C) Athena Dev Teams
*
* Hercules is free software: you can redistribute it and/or modify
@@ -225,7 +225,6 @@ struct char_interface {
void (*map_auth_failed) (int fd, int account_id, int char_id, int login_id1, char sex, uint32 ip);
void (*parse_frommap_auth_request) (int fd, int id);
void (*parse_frommap_update_ip) (int fd, int id);
- void (*parse_frommap_request_stats_report) (int fd);
void (*parse_frommap_scdata_update) (int fd);
void (*parse_frommap_scdata_delete) (int fd);
int (*parse_frommap) (int fd);
diff --git a/src/char/inter.c b/src/char/inter.c
index b095a046d..cd363e8a2 100644
--- a/src/char/inter.c
+++ b/src/char/inter.c
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2012-2016 Hercules Dev Team
+ * Copyright (C) 2012-2018 Hercules Dev Team
* Copyright (C) Athena Dev Teams
*
* Hercules is free software: you can redistribute it and/or modify
@@ -1411,7 +1411,6 @@ int inter_parse_frommap(int fd)
case 0x3005: mapif->parse_RegistryRequest(fd); break;
case 0x3006: mapif->parse_NameChangeRequest(fd); break;
case 0x3007: mapif->parse_accinfo(fd); break;
- /* 0x3008 is used by the report stuff */
default:
if( inter_party->parse_frommap(fd)
|| inter_guild->parse_frommap(fd)