function MSB_newpost() { global $mybb, $tid, $settings, $lang, $url, $thread, $forum, $db; if (!in_array((int) $forum['fid'], explode(',', $mybb->settings['miunashout_folder_acc']))) { $lang->load('admin/config_miunashoutbox'); $name = format_name($mybb->user['username'], $mybb->user['usergroup'], $mybb->user['displaygroup']); $MSB_url = htmlspecialchars_decode($url); $link = '[url=' . $settings['bburl'] . '/' . $MSB_url . ']' . $thread['subject'] . '[/url]'; $linklang = $lang->sprintf($lang->miunashoutbox_newpost_lang, $link); $data = array("nick" => $name, "msg" => $linklang, "nickto" => "0", "uid" => $mybb->user['uid'], "gid" => $mybb->user['usergroup'], "colorsht" => $mybb->settings['miunashout_newpt_color'], "bold" => "NaN", "font" => "NaN", "size" => "NaN", "avatar" => $mybb->user['avatar'], "uidto" => "0," . $thread['uid'] . "", "type" => "system", "token" => msb_token_gen()); sendPostDataMSB('newposthread', $data); } }
function MSB_updatebadword() { global $mybb, $badwordcache, $cache; if (!$badwordcache) { if (!is_array($badword_cache)) { $badword_cache = $cache->read("badwords"); } foreach ($badword_cache as $badword) { $badword['badword'] = preg_quote(htmlspecialchars_uni($badword['badword'])); if (!$badword['replacement']) { $badword['replacement'] = "*****"; } $badword['replacement'] = htmlspecialchars_uni($badword['replacement']); $badwordcache[$badword['bid']] = $badword; } } $data = array("badw" => $badwordcache, "token" => msb_token_gen()); unset($badword); sendPostDataMSB('upbadwl', $data); }