X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2FObj%2Fbrisk.phh;h=f7430b54d8f732dea1924ed22bba2d0df839a2bd;hb=46b0825543d5a3ed5088ef7d9213f639a9dd8a63;hp=44b00f416331a90b4a1d8db88f7b51fe4538fa8b;hpb=e05b72f2d772b765dd9bd54098cd2c4efbb7b06b;p=brisk.git diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh index 44b00f4..f7430b5 100644 --- a/web/Obj/brisk.phh +++ b/web/Obj/brisk.phh @@ -782,6 +782,34 @@ class Client_prefs { } } +class ModerationItem +{ + var $table; + var $date; + var $content; + + function ModerationItem($where, $date, $content) + { + $this->where = $where; + $this->time = $time; + $this->content = $content; + } +} + +class Moderation +{ + var $row; + + function Moderation() + { + $this->item = Array(); + } + + function get_all() + { + return json_encode($this->item); + } +} class Room { @@ -1653,33 +1681,38 @@ class Room } if ($to_room != FALSE) { - for ($i = 0 ; $i < MAX_PLAYERS ; $i++) { - $user_cur = $this->user[$i]; - if ($target != "" && $user_cur->name != $target) - continue; - if ($user_cur->sess == '' || $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) { - if (($user->flags & USER_FLAG_AUTH) == 0) { - continue; + for ($i = 0 ; $i < MAX_PLAYERS ; $i++) { + $user_cur = $this->user[$i]; + if ($target != "" && $user_cur->name != $target) + continue; + if ($user_cur->sess == '' || $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) { + if (($user->flags & USER_FLAG_AUTH) == 0) { + continue; + } + } } - } - } - /* - else if ($is_ticker) { - if (($user_cur->flags & USER_FLAG_MAP_AUTH) == USER_FLAG_ISOLAUTH) { - if ($user->table >= TABLES_AUTH_N) + /* + else if ($is_ticker) { + if (($user_cur->flags & USER_FLAG_MAP_AUTH) == USER_FLAG_ISOLAUTH) { + if ($user->table >= TABLES_AUTH_N) continue; - } + } + } + */ + $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('$$(moder_win, "mainbody").innerHTML += "%s
";' , + xcape($to_room) ); + } + $user_cur->step_inc(); } - */ - $user_cur->comm[$user_cur->step % COMM_N] = "gst.st = ".($user_cur->step+1)."; "; - $user_cur->comm[$user_cur->step % COMM_N] .= $to_room; - $user_cur->step_inc(); - } } if ($to_tabl) {