From 36d1e27085681388ea4989bdd62aad522ddf0dc6 Mon Sep 17 00:00:00 2001 From: "Matteo Nastasi (mop)" Date: Mon, 1 Jul 2013 18:47:30 +0200 Subject: [PATCH] modified check to skip chatt call to be able to log all msg in moderation --- web/Obj/brisk.phh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh index 3a0905e..9cfa723 100644 --- a/web/Obj/brisk.phh +++ b/web/Obj/brisk.phh @@ -1685,9 +1685,20 @@ class Room $user_cur = $this->user[$i]; if ($target != "" && $user_cur->name != $target) continue; - if ($user_cur->sess == '' || $user_cur->stat == 'table' || $user->idx_get() == $i) + if ($user_cur->sess == '') continue; + + if ($user_cur->flags_vlt_get(USER_FLAG_MODER)) { + $user_cur->comm[$user_cur->step % COMM_N] .= sprintf('g_moder.add([%d, "%s", %d, "%s", "%s"]);' , + $curtime, "userid", + ($user->stat == 'table' ? $user->table : -1), + xcape($user->name), xcape($msg) ); + $user_cur->step_inc(); + } + if ($user_cur->stat == 'table' || $user->idx_get() == $i) + continue; + if ($is_normchat == TRUE) { // use MAP_AUTH to check if auth or isolation if ($user_cur->flags & USER_FLAG_MAP_AUTH) { @@ -1706,11 +1717,6 @@ class Room */ $user_cur->comm[$user_cur->step % COMM_N] = "gst.st = ".($user_cur->step+1)."; "; $user_cur->comm[$user_cur->step % COMM_N] .= $to_room; - - if ($user_cur->flags_vlt_get(USER_FLAG_MODER)) { - $user_cur->comm[$user_cur->step % COMM_N] .= sprintf('g_moder.add([111, 222, "table N", "%s", "%s"]);' , - xcape($user->name), xcape($to_room) ); - } $user_cur->step_inc(); } } -- 2.17.1