summaryrefslogtreecommitdiff
path: root/src/map/chrif.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/chrif.c')
-rw-r--r--src/map/chrif.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 236590ff3..353533561 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -943,6 +943,21 @@ int chrif_char_offline(struct map_session_data *sd)
* Tell char-server to reset all chars offline [Wizputer]
*-----------------------------------------
*/
+int chrif_flush_fifo(void) {
+ if (char_fd < 1)
+ return -1;
+
+ set_nonblocking(char_fd, 0);
+ flush_fifos();
+ set_nonblocking(char_fd, 1);
+
+ return 0;
+}
+
+/*=========================================
+ * Tell char-server to reset all chars offline [Wizputer]
+ *-----------------------------------------
+ */
int chrif_char_reset_offline(void) {
if (char_fd < 1)
return -1;