本人想於後台禁言,解除禁言及暫時封鎖帳號這些功能運作時
可以紀綠在聊天紀錄(history.txt)之中
主要目的是可以監察GM曾做過甚麼
本人曾努力試作,參考chat.php寫入文字的句子
終於成功了
於acpmain.php中
example(1)紀錄禁言
//將玩家禁言
function chatban_player()
{
...
}
- 代碼: 選擇全部
echo ("<br><b><font color='Red'>使用者帳號:(".$_POST["target_name"].") 已經禁言。</font></b>");
以下
加入
- 代碼: 選擇全部
$s='###1###0###<b><font color="Red">***'.$_SESSION['ADMINID'].' 於('.date("H:i").')將使用者帳號:('.$_POST['target_name'].') 禁言。***</font></b>';
$fp = fopen("history.txt",'a+');
while(!is_writeable("history.txt")){}
fputs($fp,$s."\r\n");
fclose($fp);
unset($s);
unset($fp);
example(2)
//將玩家解除禁言
function chatunban_player()
{
...
}
- 代碼: 選擇全部
echo ("<br><b><font color='Red'>使用者帳號:(".$_POST["target_name"].") 已經解除禁言。</font></b>");
以下
加入
- 代碼: 選擇全部
$s='###1###0###<b><font color="Red">***'.$_SESSION['ADMINID'].' 於('.date("H:i").')將使用者帳號:('.$_POST['target_name'].') 解除禁言。***</font></b>';
$fp = fopen("history.txt",'a+');
while(!is_writeable("history.txt")){}
fputs($fp,$s."\r\n");
fclose($fp);
unset($s);
unset($fp);
當然還可以照樣修改到停權,暫時停權,解除停權,刪除聊天畫面等等[quote="涅魂"]<u>積分 +3</u>
分享修改心得
at 2007-03-22 06:45 pm[/point]