define(DBG_AUTH, 0x0200);
define(DBG_CRIT, 0x0400);
define(DBG_AUTH, 0x0200);
define(DBG_CRIT, 0x0400);
define(BRISK_SINGLE_DEBUG,0);
define(BRISK_SINGLE_SESS, "");
define(BRISK_SINGLE_DEBUG,0);
define(BRISK_SINGLE_SESS, "");
$G_false = FALSE;
$G_all_points = array( 11,10,4,3,2, 0,0,0,0,0 );
$G_false = FALSE;
$G_all_points = array( 11,10,4,3,2, 0,0,0,0,0 );
-$root_wellarr = Array ( 'Brisk (Ver. '.$G_brisk_version.'), <b>NOVITA\'</b>: Garanzia dal sito e stato degli utenti (guarda l\'help).',
+/* MLANG: ALL THE INFO STRINGS IN brisk.phh */
+$root_wellarr = Array ( 'Brisk (Ver. '.$G_brisk_version.'), <b>NOVITA\'</b>: Aggiunto un watchdog per la rete e il tasto "reload" in room.',
'Se vuoi iscriverti alla <a target="_blank" href="http://www.milug.org/cgi-bin/mailman/listinfo/ml-briscola">Mailing List</a>, cliccala!' );
$table_wellarr = Array ( 'Benvenuto al tavolo. Se almeno tre giocatori non sbloccano l\'uscita cliccando il lucchetto, chi esce non può risedersi a un qualunque tavolo per '.floor(BAN_TIME/60).' minuti.');
'Se vuoi iscriverti alla <a target="_blank" href="http://www.milug.org/cgi-bin/mailman/listinfo/ml-briscola">Mailing List</a>, cliccala!' );
$table_wellarr = Array ( 'Benvenuto al tavolo. Se almeno tre giocatori non sbloccano l\'uscita cliccando il lucchetto, chi esce non può risedersi a un qualunque tavolo per '.floor(BAN_TIME/60).' minuti.');
- log_legal($curtime, $this->sess, $this->name, "STAT:LOGOUT", '');
+ log_legal($curtime, $this, "STAT:LOGOUT", '');
- log_legal($curtime, $user_cur->sess, $user_cur->name, "STAT:DESTROY_GAME", $plist);
+ log_legal($curtime, $user_cur, "STAT:DESTROY_GAME", $plist);
$this->room_join_wakeup(&$user_cur, FALSE, 0);
$table_cur->table_token = "";
$this->room_join_wakeup(&$user_cur, FALSE, 0);
$table_cur->table_token = "";
for ($i = 0 ; $i < $table_cur->player_n ; $i++) {
$plist .= '|'.$this->user[$table_cur->player[$i]]->sess;
}
for ($i = 0 ; $i < $table_cur->player_n ; $i++) {
$plist .= '|'.$this->user[$table_cur->player[$i]]->sess;
}
- log_legal($curtime, $user_cur->sess, $user_cur->name, "STAT:DESTROY_GAME(RECOVERY)", $plist);
+ log_legal($curtime, $user_cur, "STAT:DESTROY_GAME(RECOVERY)", $plist);
$this->room_join_wakeup(&$user_cur, TRUE, -2);
$table_cur->table_token = "";
$this->room_join_wakeup(&$user_cur, TRUE, -2);
$table_cur->table_token = "";
if ($user_cur->stat == 'room' && $user_cur->subst == 'sitdown') {
$this->room_wakeup(&$user_cur);
$user_cur->comm[$user_cur->step % COMM_N] = "gst.st = ".($user_cur->step+1)."; ";
if ($user_cur->stat == 'room' && $user_cur->subst == 'sitdown') {
$this->room_wakeup(&$user_cur);
$user_cur->comm[$user_cur->step % COMM_N] = "gst.st = ".($user_cur->step+1)."; ";
$user_cur->comm[$user_cur->step % COMM_N] .= show_notify("<br>Sei stato inattivo per ".(EXPIRE_TIME_SMAMMA/60.0)." minuti. <br><br>Quindi ritorni tra i <b>Giocatori in piedi</b>.", 0, "torna ai tavoli", 400, 100);
$user_cur->step_inc();
}
$user_cur->comm[$user_cur->step % COMM_N] .= show_notify("<br>Sei stato inattivo per ".(EXPIRE_TIME_SMAMMA/60.0)." minuti. <br><br>Quindi ritorni tra i <b>Giocatori in piedi</b>.", 0, "torna ai tavoli", 400, 100);
$user_cur->step_inc();
}
strncmp($msg, "/tav ", 5) == 0) {
do {
if ($user->stat != 'room' || $user->subst != 'sitdown') {
strncmp($msg, "/tav ", 5) == 0) {
do {
if ($user->stat != 'room' || $user->subst != 'sitdown') {
$msg = "<br>Per attivare il messaggio di segnalazione del tavolo occorre essere seduti.<br><br>";
$to_user = show_notify($msg, 0, "chiudi", 400, 100);
$msg = "<br>Per attivare il messaggio di segnalazione del tavolo occorre essere seduti.<br><br>";
$to_user = show_notify($msg, 0, "chiudi", 400, 100);
$msg = "<br>La password digitata non è corretta.<br><br>";
$to_user = show_notify($msg, 0, "chiudi", 400, 100);
break;
}
$msg = "<br>La password digitata non è corretta.<br><br>";
$to_user = show_notify($msg, 0, "chiudi", 400, 100);
break;
}
$to_user = sprintf('chatt_sub("%s", [2, "%s"],"Alarm <b>%s</b> inviato a <b>%s</b>.");',
$dt, NICKSERV, xcape(substr($msg, strlen($alarm_check))),
($target == "" ? "tutti" : xcape($target)) );
$msg = sprintf("<br><b>%s<br><br>%s</b><br><br>",
$dt.NICKSERV, xcape(substr($msg, strlen($alarm_check))));
$to_user = sprintf('chatt_sub("%s", [2, "%s"],"Alarm <b>%s</b> inviato a <b>%s</b>.");',
$dt, NICKSERV, xcape(substr($msg, strlen($alarm_check))),
($target == "" ? "tutti" : xcape($target)) );
$msg = sprintf("<br><b>%s<br><br>%s</b><br><br>",
$dt.NICKSERV, xcape(substr($msg, strlen($alarm_check))));
$to_all = show_notify($msg, 0, "chiudi", 400, 120);
} while (0);
} // /alarm chat command
$to_all = show_notify($msg, 0, "chiudi", 400, 120);
} while (0);
} // /alarm chat command
$to_user = sprintf('chatt_sub("%s", [2, "%s"],"<b>Per autenticare qualcuno devi a tua volta essere autenticato.</b>");', $dt, NICKSERV);
}
}
$to_user = sprintf('chatt_sub("%s", [2, "%s"],"<b>Per autenticare qualcuno devi a tua volta essere autenticato.</b>");', $dt, NICKSERV);
}
}
if ($user->flags & USER_FLAG_AUTH) {
if (strcasecmp($user->name,$name_new) != 0) {
if ($user->subst == 'standup' || ($user->subst != 'standup' && $this->table[$user->table]->auth_only == FALSE)) {
if ($user->flags & USER_FLAG_AUTH) {
if (strcasecmp($user->name,$name_new) != 0) {
if ($user->subst == 'standup' || ($user->subst != 'standup' && $this->table[$user->table]->auth_only == FALSE)) {
/* se nome gia' in uso, segnala cosa potrebbe capitare */
if (($user->flags & USER_FLAG_AUTH) == 0) {
$userdb = new LoginDB();
/* se nome gia' in uso, segnala cosa potrebbe capitare */
if (($user->flags & USER_FLAG_AUTH) == 0) {
$userdb = new LoginDB();
if ($userdb->login_exists($name_new)) {
$to_user .= sprintf('chatt_sub("%s", [2, "%s"],"Il nickname <b>\'%s\'</b> è già registrato, <b>se il suo proprietario si autentificherà verrai rinominato d\'ufficio come ghost<i>N</i>.</b>");', $dt, NICKSERV, xcape($name_new));
}
if ($userdb->login_exists($name_new)) {
$to_user .= sprintf('chatt_sub("%s", [2, "%s"],"Il nickname <b>\'%s\'</b> è già registrato, <b>se il suo proprietario si autentificherà verrai rinominato d\'ufficio come ghost<i>N</i>.</b>");', $dt, NICKSERV, xcape($name_new));
}
$to_user = sprintf('chatt_sub("%s", [2,"%s"],"Questo stato non esiste.");', $dt, NICKSERV);
break;
}
$to_user = sprintf('chatt_sub("%s", [2,"%s"],"Questo stato non esiste.");', $dt, NICKSERV);
break;
}
($user->stat == 'room' ? 'room' : 'table '.$user->table),$msg);
$user->chat_lst = "$msg";
($user->stat == 'room' ? 'room' : 'table '.$user->table),$msg);
$user->chat_lst = "$msg";
// echo "LOCK: ".FTOK_PATH."/main";
// exit;
if (($tok = @ftok(FTOK_PATH."/main", "B")) == -1) {
// echo "LOCK: ".FTOK_PATH."/main";
// exit;
if (($tok = @ftok(FTOK_PATH."/main", "B")) == -1) {
-function log_legal($curtime, $sess, $name, $where, $mesg)
+// function log_legal($curtime, $sess, $name, $where, $mesg)
+function log_legal($curtime, &$user, $where, $mesg)
{
GLOBAL $_SERVER;
if (($fp = @fopen(LEGAL_PATH."/legal.log", 'a')) != FALSE) {
/* Unix time | session | nickname | IP | where was | mesg */
{
GLOBAL $_SERVER;
if (($fp = @fopen(LEGAL_PATH."/legal.log", 'a')) != FALSE) {
/* Unix time | session | nickname | IP | where was | mesg */
- fwrite($fp, sprintf("%ld|%s|%s|%s|%s|%s|\n", $curtime, $sess, $name, $_SERVER['REMOTE_ADDR'], $where , $mesg));
+ fwrite($fp, sprintf("%ld|%s|%s|%s|%s|%s|%s|\n", $curtime, $user->sess,
+ ($user->flags & USER_FLAG_AUTH ? 'A' : 'N'),
+ $user->name, $_SERVER['REMOTE_ADDR'], $where , $mesg));
+ /* MLANG: "<hr>Nell'ultima mano ha chiamato <b>%s</b>, il socio era <b>%s</b>,<br>", "hanno fatto <b>cappotto</b> EBBRAVI!.<hr>", "dovevano fare <b>%s</b> punti e ne hanno fatti <b>%d</b>: hanno <b>%s</b>.<hr>", "<hr>Nell'ultima mano <b>%s</b> si è chiamato in mano,<br>", "ha fatto <b>cappotto</b> EBBRAVO!.<hr>", "doveva fare <b>%s</b> punti e ne ha fatti <b>%d</b>: ha <b>%s</b>.<hr>", ($table->old_asta_pnt > 61 ? "almeno ".$table->old_asta_pnt : 'più di 60'), $table->old_pnt, ($wol == 1 ? "vinto" : ($wol == 0 ? "pareggiato" : "perso" */
$noty .= sprintf("<hr>Nell'ultima mano ha chiamato <b>%s</b>, il socio era <b>%s</b>,<br>",
xcape($room->user[$win]->name),
xcape($room->user[$fri]->name));
$noty .= sprintf("<hr>Nell'ultima mano ha chiamato <b>%s</b>, il socio era <b>%s</b>,<br>",
xcape($room->user[$win]->name),
xcape($room->user[$fri]->name));
if ($table->mazzo == $table_pos)
$noty .= "Fai <b>tu</b> il mazzo,";
else {
if ($table->mazzo == $table_pos)
$noty .= "Fai <b>tu</b> il mazzo,";
else {
$ret .= sprintf( 'gst.st = %d; stat = "%s"; subst = "%s"; table_pos = %d;',
$sendstep, $user->stat, $user->subst, $table_pos);
$ret .= sprintf( 'gst.st = %d; stat = "%s"; subst = "%s"; table_pos = %d;',
$sendstep, $user->stat, $user->subst, $table_pos);
- log_rd(sprintf( 'SHOW_TABLE: gst.st = %d; stat = "%s"; subst = "%s"; table_pos = %d;',
- $sendstep, $user->stat, $user->subst, $table_pos));
+ log_rd(sprintf( 'SHOW_TABLE: gst.st = %d; stat = "%s"; subst = "%s"; table_pos = %d;', $sendstep, $user->stat, $user->subst, $table_pos));