From c5986ba47dbd5034018ab288c39feee7ff5d7d1f Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sat, 4 May 2013 15:40:59 -0300 Subject: 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 --- src/map/chrif.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/map/chrif.c') 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 - } /** -- cgit v1.2.3-60-g2f50