From 1d87073070b3dc3ccb9a0935f21237e83ad7c895 Mon Sep 17 00:00:00 2001 From: "Matteo Nastasi (mop)" Date: Thu, 27 Nov 2014 08:42:34 +0100 Subject: [PATCH] development command to logout manually users --- web/Obj/brisk.phh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh index 4cd3b18..bc53cac 100644 --- a/web/Obj/brisk.phh +++ b/web/Obj/brisk.phh @@ -1867,6 +1867,37 @@ class Brisk /* for old isolation management $is_ticker = TRUE; */ } while (0); } // /tav chat command + // just for development use currently + else if (FALSE && strncmp($msg, "/out ", 5) == 0) { + fprintf(STDERR, "MOP OUT\n"); + $target = substr($msg, 5); + for ($i = 0 ; $i < MAX_PLAYERS ; $i++) { + $user_out = $this->user[$i]; + if (!strcmp($user_out->name, $target)) { + + $user_out->the_end = TRUE; + fprintf(STDERR, "MOP: GHOST_SESS: %d\n", GHOST_SESS_REAS_LOUT); + $this->ghost_sess->push($curtime, $user_out->sess, GHOST_SESS_REAS_LOUT); + + if ($user_out->stat == 'table' || $user_out->stat == 'room') { + if ($user_out->subst == 'sitdown' || $user_out->stat == 'table') { + $this->room_wakeup($user_out); + } + else if ($user_out->subst == 'standup') { + $this->room_outstandup($user_out); + } + else { + log_rd2("LOGOUT FROM WHAT ???"); + } + } + + fprintf(STDERR, "MOP: OUT FIND [%s] step %d rd_step %d\n", $target, $user_out->step, $user_out->rd_step); + break; + } + } + } + + else if (strncmp($msg, "/alarm ", 7) == 0) { if (strncmp($msg, "/alarm to ", 10) == 0) { -- 2.17.1