summaryrefslogtreecommitdiff
path: root/src/map/chrif.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-09-16 21:14:33 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-09-16 21:14:33 +0000
commit5cd75ecd95c257e61c15fef5692918c5642e2aea (patch)
tree76433fa0e32f228d737b651a81ded6da34fbf1aa /src/map/chrif.c
parent77912311a7ad7151e4a2476cac73f3ec181d27bd (diff)
downloadhercules-5cd75ecd95c257e61c15fef5692918c5642e2aea.tar.gz
hercules-5cd75ecd95c257e61c15fef5692918c5642e2aea.tar.bz2
hercules-5cd75ecd95c257e61c15fef5692918c5642e2aea.tar.xz
hercules-5cd75ecd95c257e61c15fef5692918c5642e2aea.zip
Introducing rAthena's anonymous data collector. This aims at improving rAthena's overall features by letting we know which options are most and least used.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16785 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/chrif.c')
-rw-r--r--src/map/chrif.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 064104018..02bd3686c 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -1523,7 +1523,7 @@ static int check_connect_char_server(int tid, unsigned int tick, int id, intptr_
}
chrif_state = 0;
- char_fd = make_connection(char_ip, char_port);
+ char_fd = make_connection(char_ip, char_port,false);
if (char_fd == -1)
{ //Attempt to connect later. [Skotlex]
return 0;
@@ -1562,6 +1562,20 @@ int chrif_removefriend(int char_id, int friend_id) {
return 0;
}
+void chrif_send_report(char* buf, int len) {
+#ifndef STATS_OPT_OUT
+ WFIFOHEAD(char_fd,len + 2);
+
+ WFIFOW(char_fd,0) = 0x3008;
+
+ memcpy(WFIFOP(char_fd,2), buf, len);
+
+ WFIFOSET(char_fd,len + 2);
+
+ flush_fifo(char_fd); /* ensure it's sent now. */
+#endif
+}
+
/**
* @see DBApply
*/