X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2FObj%2Fbrisk.phh;h=a90358917503bb91ea515dffb3368aaf89988d55;hb=97b2a573af9ba79216121ff90eaade1421994460;hp=e3abaa9d6cd0832bdefc93d239700df776d80043;hpb=92fff75b6f3b7c1f27bd6e455c483a94fb2ae89f;p=brisk.git diff --git a/web/Obj/brisk.phh b/web/Obj/brisk.phh index e3abaa9..a903589 100644 --- a/web/Obj/brisk.phh +++ b/web/Obj/brisk.phh @@ -1416,19 +1416,13 @@ class Brisk $ret = sprintf('gst.st = %d; ', $user_step); - $prefs = Client_prefs::from_user($user); - $ret .= sprintf('prefs_load(\'%s\', false, false);', json_encode($prefs)); - - if(false) { - if ($user->flags & USER_FLAG_ISOLAUTH) { - $ret .= 'list_set(\'isolation\', false, \''.$mlang_brisk['tit_onisol'][$G_lang].'\' ); '; - } - else if ($user->flags & USER_FLAG_LISTAUTH) { - $ret .= 'list_set(\'auth\', false, \''.$mlang_brisk['tit_onauth'][$G_lang].'\' ); '; - } - else { - $ret .= 'list_set(\'all\', false, \'\' ); '; - } + if ($user->is_auth()) { + $model = '{ "listen": { "__type": "radio" } }'; + $content = '{ "listen": {"val": "' . ($user->flags & USER_FLAG_ISOLAUTH ? "2" : + ($user->flags & USER_FLAG_LISTAUTH ? "1" : "0")) . + '" } }'; + $ret .= sprintf('g_prefsf.fields_descr_set(JSON.parse(\'%s\'));', $model); + $ret .= sprintf('g_prefsf.json2dom(JSON.parse(\'%s\'));', $content); } if ($user->subst == 'standup') @@ -2152,6 +2146,20 @@ class Brisk echo $this->info_show($user, urldecode($info_user), $dt); } while(0); } + else if (strncmp($msg, "/prefsn", 7) == 0) { + do { + if (! $user->is_auth()) { + if ($mlang_indwr) { + $to_user = nickserv_msg($dt, $mlang_indwr['info_auth'][$G_lang]); + } + else { + $to_user = nickserv_msg($dt, "error"); + } + break; + } + echo $this->prefsn_show($user, $dt); + } while(0); + } else if (strncmp($msg, "/st ", 4) == 0) { log_main("chatt_send BEGIN");