From 2e3cd237127d4d429bd7132d2ed06e597ac9f4dc Mon Sep 17 00:00:00 2001 From: "Matteo Nastasi (mop)" Date: Sun, 30 Mar 2008 14:49:21 +0000 Subject: [PATCH] sitdown disable when shutdowning --- TODO.txt | 45 +++++++++++++++++---------------------------- web/Obj/brisk.phh | 7 +++++-- web/index_wr.php | 13 +++++++++++++ 3 files changed, 35 insertions(+), 30 deletions(-) diff --git a/TODO.txt b/TODO.txt index 47f083c..e38c293 100644 --- a/TODO.txt +++ b/TODO.txt @@ -6,15 +6,6 @@ TODO ==== - - - - IL js PER IL PRELOAD - - - - - URGENT - tables spawn DONE - spawn of a table @@ -23,40 +14,38 @@ DONE - return to index.php DONE - game's token DONE - recover of corrupted table data - DONE - closure of a table DONE - flush of the table - DONE - security checks for right scope access - DONE - garbage collector management DONE - recursive garbage - howto ? - DONE - stat & subst in browser - - TESTING - laccwr setting and exit if all players are unactive for some time - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - WIP - the list of test case - WIP - shm dimension - + DONE - laccwr setting and exit if all players are unactive for some time + DONE - the list of test case + DONE - shm dimension DONE - remove unused parts - move images + DONE - move images + DONE - optimizations + DONE - cambiare titolo al tavolo + DONE - shutdowning lock tables - - FAR - optimizations FAR - inheritances - FAR - testament - - + + + NORM - pubblic announcements + NORM - 10 sec to exit from table + NORM - moving label for tables click + +----------------- join ----------------- + NORM - map + NORM - restart preload img - NORM - chat vecchie in reload NORM - tools dir with a main and some pages where check briscola tools. - NORM - bottoni => immagini NORM - watchdog - MIN - cambiare titolo al tavolo + NORM - chat vecchie in reload (forse) MIDDLE TODO =========== diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh index db58be3..9497576 100644 --- a/web/Obj/brisk.phh +++ b/web/Obj/brisk.phh @@ -45,7 +45,7 @@ define(EXPIRE_TIME_SMAMMA, 360); // BAN_TIME da allineare anche in commons.js define(BAN_TIME, 900); define(GARBAGE_TIMEOUT, 10); -define(NICKSERV, "SERVER"); +define(NICKSERV, "BriskServ"); define(DBG_ONL2, 0x0001); define(DBG_ONLY, 0x0002); @@ -2055,8 +2055,11 @@ function root_wellcome($user) GLOBAL $root_wellarr; $ret = ""; + $timecur = time(); + $dt = date("H:i ", $timecur); + for ($i = 0 ; $i < count($root_wellarr) ; $i++) - $ret .= sprintf('chatt_sub("ChanServ: ","%s");', str_replace('"', '\"', $root_wellarr[$i])); + $ret .= sprintf('chatt_sub("%s","%s");', $dt.NICKSERV, str_replace('"', '\"', $root_wellarr[$i])); return ($ret); } diff --git a/web/index_wr.php b/web/index_wr.php index b5c1ffb..6493201 100644 --- a/web/index_wr.php +++ b/web/index_wr.php @@ -122,6 +122,19 @@ else if ($user->stat == 'room') { if ($argz[0] == 'sitdown') { log_wr("SITDOWN command"); + if ($G_shutdown) { + $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; "; + + $timecur = time(); + $dt = date("H:i ", $timecur); + $user->comm[$user->step % COMM_N] .= sprintf('chatt_sub("%s","Il server sta per essere riavviato, non possono avere inizio nuove partite.");', $dt.NICKSERV); + + $user->step_inc(); + Room::save_data($room); + Room::unlock_data($sem); + exit; + } + if ($user->the_end == TRUE) { log_wr("INFO:SKIP:argz == sitdown && the_end == TRUE => ignore request."); Room::unlock_data($sem); -- 2.17.1