diff options
author | shennetsind <ind@henn.et> | 2013-05-04 15:40:59 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-05-04 15:40:59 -0300 |
commit | c5986ba47dbd5034018ab288c39feee7ff5d7d1f (patch) | |
tree | ea8d5e6f03f4993e1bf94b4d334a5dd2546c5950 /src/map/chrif.c | |
parent | 6731a64f92ccecd09803ec07afa8bc817ab8d17d (diff) | |
download | hercules-c5986ba47dbd5034018ab288c39feee7ff5d7d1f.tar.gz hercules-c5986ba47dbd5034018ab288c39feee7ff5d7d1f.tar.bz2 hercules-c5986ba47dbd5034018ab288c39feee7ff5d7d1f.tar.xz hercules-c5986ba47dbd5034018ab288c39feee7ff5d7d1f.zip |
Upgrading Stat Server from 2.5 to 3.0
also: modified encode_zip in grfio for a upcoming modification and some minor stuff in some other places.
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/chrif.c')
-rw-r--r-- | src/map/chrif.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/map/chrif.c b/src/map/chrif.c index cf7886422..69fc79bb8 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -1577,19 +1577,19 @@ int chrif_removefriend(int char_id, int friend_id) { } 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. */ + if( char_fd ) { + 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 - } /** |