X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Findex_wr.php;h=eb014101fe83cb34c6fb127b8e80074797131eeb;hb=a0b24745843fc7bad6f8291ef6f660e255af7825;hp=cb5ed920ed3a18c6f09257ae35b7142d269d53e5;hpb=171168210237aee11e4e26207e569c50eaa2ae0b;p=brisk.git
diff --git a/web/index_wr.php b/web/index_wr.php
index cb5ed92..eb01410 100644
--- a/web/index_wr.php
+++ b/web/index_wr.php
@@ -42,6 +42,8 @@ $mlang_indwr = array( 'unknownerr' => array( 'it' => 'errore sconosciuto',
'en' => 'To send a message to the administrator you have to be authenticated'),
'shutmsg' => array( 'it' => 'Il server sta per essere riavviato, non possono avere inizio nuove partite.',
'en' => 'The server is going to be rebooted, new games are not allowed.'),
+ 'mustappr' => array( 'it' => 'Il tavolo a cui volevi sederti richiede autentifica o apprendistato.',
+ 'en' => 'The table where you want to sit require authentication or apprentice'),
'mustauth' => array( 'it' => 'Il tavolo a cui volevi sederti richiede autentifica.',
'en' => 'The table where you want to sit require authentication'),
'mustcert' => array( 'it' => 'Il tavolo a cui volevi sederti richiede autentifica e certificazione.',
@@ -226,9 +228,6 @@ function index_wr_main(&$brisk, $remote_addr_full, $get, $post, $cookie)
echo show_notify(str_replace("\n", " ", placings_show(FALSE)), 0, $mlang_indwr['btn_close'][$G_lang], 800, 600);
}
- else if ($argz[0] == 'whysupport') {
- echo show_notify(str_replace("\n", " ", $G_room_whysupport[$G_lang]), 0, $mlang_indwr['btn_close'][$G_lng], 400, 200);
- }
else if ($argz[0] == 'apprentice') {
if (($cli_name = gpcs_var('cli_name', $get, $post, $cookie)) === FALSE)
$cli_name = "";
@@ -241,6 +240,12 @@ function index_wr_main(&$brisk, $remote_addr_full, $get, $post, $cookie)
// check existence of username or email
$is_trans = FALSE;
do {
+ error_log($cli_name);
+ if (login_consistency($cli_name) == FALSE) {
+ $mesg_to_user = "Il nickname non è conforme alle regole per la sua costruzione.";
+ break;
+ }
+
if (($bdb = BriskDB::create()) == FALSE) {
$mesg_to_user = "Connessione al database fallita";
break;
@@ -752,14 +757,6 @@ function index_wr_main(&$brisk, $remote_addr_full, $get, $post, $cookie)
log_wr($user->comm[$user->step % COMM_N]);
$user->step_inc();
- }
- else if ($argz[0] == 'whysupport') {
- $user->comm[$user->step % COMM_N] = "gst.st = ".($user->step+1)."; ";
- $user->comm[$user->step % COMM_N] .= show_notify(str_replace("\n", " ", $G_room_whysupport[$G_lang]), 0, $mlang_indwr['btn_backtotab'][$G_lang], 400, 200);
-
- log_wr($user->comm[$user->step % COMM_N]);
- $user->step_inc();
-
}
else if ($argz[0] == 'chatt') {
$brisk->chatt_send(&$user, xcapemesg($mesg));
@@ -827,6 +824,10 @@ function index_wr_main(&$brisk, $remote_addr_full, $get, $post, $cookie)
(!$user->is_auth() || $user->is_appr()) ) {
$not_allowed_msg = nickserv_msg($dt, $mlang_indwr['mustauth'][$G_lang]);
}
+ else if ( $table->auth_type == TABLE_AUTH_TY_APPR &&
+ (!$user->is_auth()) ) {
+ $not_allowed_msg = nickserv_msg($dt, $mlang_indwr['mustappr'][$G_lang]);
+ }
else if ($user->flags & USER_FLAG_TY_FIRONLY && $table->player_n > 0) {
$not_allowed_msg = nickserv_msg($dt, $mlang_indwr['mustfirst'][$G_lang]);
}