summaryrefslogtreecommitdiff
path: root/src/char
diff options
context:
space:
mode:
Diffstat (limited to 'src/char')
-rw-r--r--src/char/char.c31
-rw-r--r--src/char/inter.c1
2 files changed, 31 insertions, 1 deletions
diff --git a/src/char/char.c b/src/char/char.c
index 0471c91d6..61e0adaf5 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -3285,6 +3285,35 @@ int parse_frommap(int fd)
RFIFOSKIP(fd,6);
break;
+ case 0x3008:
+ if( RFIFOREST(fd) < RFIFOW(fd,4) )
+ return 0;/* packet wasn't fully received yet (still fragmented) */
+ else {
+ int sfd;/* stat server fd */
+ 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 */
+
+ if( (sfd = make_connection(host2ip("stats.rathena.org"),(uint16)25421,true) ) == -1 ) {
+ RFIFOSKIP(fd, RFIFOW(fd,2) );/* skip this packet */
+ break;/* connection not possible, we drop the report */
+ }
+
+ session[sfd]->flag.server = 1;/* to ensure we won't drop our own packet */
+
+ WFIFOHEAD(sfd, RFIFOW(fd,2) );
+
+ memcpy((char*)WFIFOP(sfd,0), (char*)RFIFOP(fd, 0), RFIFOW(fd,2));
+
+ WFIFOSET(sfd, RFIFOW(fd,2) );
+
+ flush_fifo(sfd);
+
+ do_close(sfd);
+
+ RFIFOSKIP(fd, RFIFOW(fd,2) );/* skip this packet */
+ }
+ break;
+
+
default:
{
// inter server - packet
@@ -4244,7 +4273,7 @@ int check_connect_login_server(int tid, unsigned int tick, int id, intptr_t data
return 0;
ShowInfo("Attempt to connect to login-server...\n");
- login_fd = make_connection(login_ip, login_port);
+ login_fd = make_connection(login_ip, login_port, false);
if (login_fd == -1)
{ //Try again later. [Skotlex]
login_fd = 0;
diff --git a/src/char/inter.c b/src/char/inter.c
index e3fca5e5a..7961b479d 100644
--- a/src/char/inter.c
+++ b/src/char/inter.c
@@ -1220,6 +1220,7 @@ 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)