-if ($argz[0] == 'shutdown') {
- log_auth($user_cur->sess, "Shutdown session.");
-
- $user->sess = "";
- $user->name = "";
- $user->the_end = FALSE;
-
- log_rd2($user->sess, "AUTO LOGOUT.");
- if ($user->subst == 'sitdown' || $user->stat == 'table')
- $bri->room_wakeup(&$user);
- else if ($user->subst == 'standup')
- $bri->room_outstandup(&$user);
- else
- log_rd2($sess, "SHUTDOWN FROM WHAT ???");
-}
-else if ($user->stat == 'room') {
- $user->laccwr = time();
-
- if ($argz[0] == 'help') {
- $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; ";
- $user->comm[$user->step % COMM_N] .= show_notify(str_replace("\n", " ", $G_room_help), 0, "torna ai tavoli", 600, 500);
-
- log_wr($sess, $user->comm[$user->step % COMM_N]);
- $user->step++;
-
- }
- else if ($argz[0] == 'about') {
- $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; ";
- $user->comm[$user->step % COMM_N] .= show_notify(str_replace("\n", " ", $G_room_about), 0, "torna ai tavoli", 400, 200);
-
- log_wr($sess, $user->comm[$user->step % COMM_N]);
- $user->step++;
-
- }
- else if ($argz[0] == 'logout') {
- $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; ";
- $user->comm[$user->step % COMM_N] .= sprintf('postact_logout();');
- $user->the_end = TRUE;
- $user->step++;
- }
- else if ($argz[0] == 'chatt') {
- $bri->chatt_send(&$user,$mesg);
- }
- else if ($argz[0] == 'sitdown') {
- if ($user->stat != 'room' || $user->subst != 'standup') {
- log_wr($sess, "Warning ! sitdown out fsm");
- unlock_data($sem);
- exit;
+$mlang_indwr = array( 'btn_backtotab' => array( 'it' => 'Torna ai tavoli.',
+ 'en' => 'Back to tables.' ),
+ 'warrrepl' => array( 'it' => '<br>Il nominativo è stato inoltrato all\'amministratore.<br><br>Nell\'arco di pochi giorni verrà<br><br>notificata al garantito l\'avvenuta registrazione.',
+ 'en' => '<br>The subscription was forwarded to the administrator.<br><br>In a few days we will notify<br><br>your friend the occurred registration.'),
+ 'btn_close' => array( 'it' => 'chiudi',
+ 'en' => 'close' ),
+ 'commerr' => array( 'it' => '<b>E\' occorso un errore durante il salvataggio, riprova o contatta l\'amministratore.</b>',
+ 'en' => '<b>An error was occurred during the saving, try again or contact the administrator.</b>'),
+ 'coerrdb' => array( 'it' => '<b>Il database è temporaneamente irraggiungibile, riprova più tardi o contatta l\'amministratore.</b>',
+ 'en' => '<b>The database is temporarly unavailable, retry to later or conctact the administrator.</b>'),
+ 'warrmust' => array( 'it' => '<b>Per autenticare qualcuno devi a tua volta essere autenticato e certificato.</b>',
+ 'en' => 'To authenticate somebody you have to be authenticated and certified yourown'),
+ 'mesgrepl' => array( 'it' => '<br><br>Il messaggio è stato inoltrato all\'amministratore.',
+ 'en' => '<br><br>The message was forwarded to the administrator'),
+ 'mesgmust' => array( 'it' => '<b>Per mandare messaggi all\'amministratore devi essere autenticato.</b>',
+ 'en' => 'To send a message to the administrator you have to be authenticated'),
+ 'shutmsg' => array( 'it' => '<b>Il server sta per essere riavviato, non possono avere inizio nuove partite.</b>',
+ 'en' => '<b>The server is going to be rebooted, new games are not allowed.</b>'),
+ 'mustauth' => array( 'it' => '<b>Il tavolo a cui volevi sederti richiede autentifica.</b>',
+ 'en' => '<b>The table where you want to sit require authentication</b>'),
+ 'mustcert' => array( 'it' => '<b>Il tavolo a cui volevi sederti richiede autentifica e certificazione.</b>',
+ 'en' => '<b>The table where you want to sit require authentication and certification</b>'),
+ 'tabwait_a'=> array( 'it' => '<b>Il tavolo si è appena liberato, ci si potrà sedere tra ',
+ 'en' => '<b>The table is only just opened, you will sit down in '), // FIXME
+ 'tabwait_b'=> array( 'it' => ' secondi.</b>',
+ 'en' => ' seconds.</b>'),
+ 'mustfirst'=> array( 'it' => '<b>Il tuo utente può sedersi al tavolo solo per primo.</b>',
+ 'en' => '<b>Your can sit down as first user only.' ),
+ 'pollmust' => array( 'it' => '<b>Per partecipare al sondaggio devi essere autenticato.</b>',
+ 'en' => '<b>To vote for the poll you have to be authenticated</b>'),
+ 'pollnone' => array( 'it' => '<br><br>Al momento non è attivo alcun sondaggio.',
+ 'en' => '<br><br>At this moment no polls are active.'),
+ 'pollchoo' => array( 'it' => '<br><br>Non hai espresso nessuna preferenza.',
+ 'en' => '<br><br>You don\'t choose any preference, do it'),
+ 'pollagai' => array( 'it' => '<br>Per questo sondaggio hai già votato.<br><br>Non si può esprimere la propria preferenza più di una volta.',
+ 'en' => '<br>You just express your preference about this poll.<br><br>You cannot do it again.'),
+ 'pollrec' => array ('it' => '<br><br>Il tuo voto è stato registrato.',
+ 'en' => '<br><br>Your vote had be stored.'),
+ 'badwake_a'=> array( 'it' => '<br>Ti sei alzato da un tavolo senza il consenso degli altri giocatori.<br><br>Dovrai aspettare ancora ',
+ 'en' => '<br>You stand up without the permission of the other players.<br><br>You will wait '),
+ 'badwake_b'=> array( 'it' => ' prima di poterti sedere nuovamente.',
+ 'en' => ' before you can sit down again.'),
+ 'btn_stays'=> array( 'it' => 'resta in piedi.',
+ 'en' => 'stay standing.'),
+ 'badsit_a' => array( 'it' => '<br>Tu o qualcuno col tuo stesso indirizzo IP si è alzato da un tavolo senza il consenso degli altri giocatori.<br><br>Dovrai aspettare ancora ',
+ 'en' => '<br>You or someone with your same IP address is standing up from a table without the permission of the other players <br><br>You will wait '),
+ 'badsit_b' => array( 'it' => ' prima di poterti sedere nuovamente.<br><br>Se non sei stato tu ad alzarti e possiedi un login con password, autenticandoti con quello, potrai accedere.',
+ 'en' => ' before you can sit down again. If you don\'t leave the table and you have a login with a password, authenticating with this one you will access'),
+ 'nu_msubj' => array( 'it' => 'Brisk: verifica email',
+ 'en' => 'Brisk: email verification'),
+ // %s(guar) %s(login) %s(baseurl) %d(code) %s(hash)
+ 'nu_mtext' => array( 'it' =>
+'Ciao, sono l\' amministratore del sito di Brisk.
+
+L\' utente \'%s\' ha garantito per te col nickname \'%s\',
+vai al link: <%s>
+per confermare il tuo indirizzo di posta elettronica.
+
+Ciò è necessario per ottenere la password.
+
+Saluti e buone partite, mop.',
+ 'en' => 'EN mtext [%s] [%s] [%s]'),
+ 'nu_mhtml' => array( 'it' => 'Ciao, sono l\' amministratore del sito di Brisk.<br><br>
+L\' utente \'%s\' ha garantito per te col nickname \'%s\',<br>
+<a href="%s">clicca qui</a> per confermare il tuo indirizzo di posta elettronica.<br><br>
+Ciò è necessario per ottenere la password.<br><br>
+Saluti e buone partite, mop.<br>',
+ 'en' => 'EN mhtml [%s] [%s] [%s]'),
+
+ 'nu_gtext' => array( 'it' =>
+'Ciao %s, sono l\' amministratore del sito di Brisk.
+
+Ti volevo avvisare che ho attivato i login di \'%s\' che hai
+garantito.
+
+Ti ricordo che i login vanno dati a persone di fiducia, se 3
+di quelli che hai autenticato verranno segnati come molestatori
+verrà sospeso anche il tuo accesso.
+
+Grazie dell\' impegno, mop.',
+ 'en' => 'EN nu_gtext [%s][%s]'),
+
+ 'nu_ghtml' => array( 'it' =>
+'Ciao %s, sono l\' amministratore del sito di Brisk.<br><br>
+Ti volevo avvisare che ho attivato i login di \'%s\' che hai
+garantito.<br><br>
+Ti ricordo che i login vanno dati a persone di fiducia, se 3
+di quelli che hai autenticato verranno segnati come molestatori
+verrà sospeso anche il tuo accesso.<br><br>
+Grazie dell\' impegno, mop.',
+ 'en' => 'EN nu_ghtml [%s][%s]')
+ );
+
+define('LICMGR_CHO_ACCEPT', 0);
+define('LICMGR_CHO_REFUSE', 1);
+define('LICMGR_CHO_AFTER', 2);
+
+function index_wr_main(&$brisk, $remote_addr_full, $get, $post, $cookie)
+{
+ GLOBAL $G_domain, $G_webbase, $G_mail_seed;
+ GLOBAL $G_shutdown, $G_alarm_passwd, $G_ban_list, $G_black_list, $G_lang, $G_room_help, $G_room_about;
+ GLOBAL $G_room_passwdhowto, $mlang_indwr;
+ GLOBAL $G_tos_vers;
+
+ log_load("index_wr.php");
+ $remote_addr = addrtoipv4($remote_addr_full);
+
+ if (($mesg = gpcs_var('mesg', $get, $post, $cookie)) === FALSE)
+ unset($mesg);
+
+ if (($sess = gpcs_var('sess', $get, $post, $cookie)) === FALSE)
+ $sess = "";
+
+
+ if (DEBUGGING == "local" && $remote_addr != '127.0.0.1') {
+ echo "Debugging time!";
+ return (FALSE);