From: Matteo Nastasi (mop) Date: Sun, 30 Sep 2007 09:04:21 +0000 (+0000) Subject: corretto bug del change nick e aggiunto metodo log_only2 X-Git-Tag: 3.0.0~241 X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=commitdiff_plain;h=c263ac9f211e849fc05a98198a2542978f19d948;p=brisk.git corretto bug del change nick e aggiunto metodo log_only2 --- diff --git a/web/brisk.phh b/web/brisk.phh index 60eed4c..9d033ff 100644 --- a/web/brisk.phh +++ b/web/brisk.phh @@ -764,7 +764,7 @@ class brisco { $table = &$this->table[$user->table]; $user_cur->comm[$user_cur->step % COMM_N] = "gst.st = ".($user_cur->step+1)."; "; - $user_cur->comm[$user_cur->step % COMM_N] = sprintf('set_names(" %s", " %s", " %s", " %s", " %s"); ', + $user_cur->comm[$user_cur->step % COMM_N] .= sprintf('set_names(" %s", " %s", " %s", " %s", " %s"); ', xcape($this->user[$table->player[($user_cur->table_pos)%PLAYERS_N]]->name), xcape($this->user[$table->player[($user_cur->table_pos+1)%PLAYERS_N]]->name), xcape($this->user[$table->player[($user_cur->table_pos+2)%PLAYERS_N]]->name), @@ -924,6 +924,17 @@ function make_seed() return (float) $sec + ((float) $usec * 100000); } +function log_only2($sess, $log) { + if (BRISK_DEBUG != TRUE) + return; + + + if (($fp = @fopen("/tmp/brisk_only2.log", 'a')) != FALSE) { + fwrite($fp, sprintf("SESS: [%s] [%s]\n", $sess, $log)); + fclose($fp); + } +} + function log_only($sess, $log) { if (BRISK_DEBUG != TRUE) return;