إظهار سطر تنفيذ الكتم والطرد والحجب على العام

اضغط هنا لمعاينة كودي شات( Enter Codychat )

admin

Administrator
طاقم الإدارة
PHP:
في مجلد النظام

system \ function_2.php

muteaccount إبحث عن وظيفة

قم باستبدال الكود إلى نهاية وظيفة 

function banAccount







function muteAccount($id, $delay, $reason = ''){

    global $mysqli, $data, $lang, $cody;

$user = userDetails($id);

$hunter = escape($data['user_name']);

if(empty($user)){

return 3;

}

if(!canMuteUser($user)){

return 0;

}

if(isMuted($user)){

return 2;

}

systemMute($user, $delay, $reason);

boomNotify($id, 'mute', array('source'=> 'mute', 'reason'=> $reason, 'delay'=> $delay));

boomHistory($user['user_id'], 'mute', array('delay'=> $delay, 'reason'=> $reason));

boomConsole($id, 'mute', array('reason'=>$reason, 'delay'=> $delay));

$result = str_replace(array('%hunter%', '%target%'), array($hunter, $user['user_name']), $lang['mute_msg']);

systemPostChat($data['user_roomid'], $result);

return 1;

}

function unmuteAccount($id){

global $mysqli, $data, $lang, $cody;

$user = userDetails($id);

$hunter = escape($data['user_name']);

if(empty($user)){

return 3;

}

if(!canMuteUser($user)){

return 0;

}

if(!isMuted($user)){

return 2;

}

systemUnmute($user);

boomNotify($id, 'unmute', array('source'=> 'mute'));

boomConsole($id, 'unmute');

$result = str_replace(array('%hunter%', '%target%'), array($hunter, $user['user_name']), $lang['unmute_msg']);

systemPostChat($data['user_roomid'], $result);

return 1;

}

function kickAccount($id, $delay, $reason = ''){

global $mysqli, $data, $lang, $cody;

$user = userDetails($id);

$hunter = escape($data['user_name']);

if(empty($user)){

return 3;

}

if(!canKickUser($user)){

return 0;

}

if(isKicked($user)){

return 2;

}

if(!validKick($delay)){

return 0;

}

systemKick($user, $delay, $reason);

boomConsole($user['user_id'], 'kick', array('reason'=>$reason, 'delay'=> $delay));

boomHistory($user['user_id'], 'kick', array('delay'=> $delay, 'reason'=> $reason));

$result = str_replace(array('%hunter%', '%target%'), array($hunter, $user['user_name']), $lang['kick_msg']);

systemPostChat($data['user_roomid'], $result);

return 1;

}

function unkickAccount($id){

global $mysqli, $data, $lang, $cody;

$user = userDetails($id);

$hunter = escape($data['user_name']);

if(empty($user)){

return 3;

}

if(!canKickUser($user)){

return 0;

}

if(!isKicked($user)){

return 2;

}

systemUnkick($user);

boomConsole($user['user_id'], 'unkick');

$result = str_replace(array('%hunter%', '%target%'), array($hunter, $user['user_name']), $lang['unkick_msg']);

systemPostChat($data['user_roomid'], $result);

return 1;

}

function validKick($val){

$valid = array(2,5,10,15,30,60,1440,2880,4320,5760,7200,8640,10080,20160,43200);

if(in_array($val, $valid)){

return true;

}

}

function validMute($val){

$valid = array(2,5,10,15,30,60,1440,2880,4320,5760,7200,8640,10080,20160,43200);

if(in_array($val, $valid)){

return true;

}

}

function banAccount($id, $reason = ''){

global $mysqli, $data, $lang, $cody;

$user = userDetails($id);

$hunter = escape($data['user_name']);

if(!canBanUser($user)){

return 0;

}

if(isBanned($user)){

return 2;

}

systemBan($user, $reason);

boomConsole($user['user_id'], 'ban', array('custom'=>$user['user_ip'], 'reason'=> $reason));

boomHistory($user['user_id'], 'ban', array('reason'=> $reason));

$result = str_replace(array('%hunter%', '%target%'), array($hunter, $user['user_name']), $lang['ban_msg']);

systemPostChat($data['user_roomid'], $result);

return 1;

}

في ملف اللغة الخاصة بك



(system\language\yourlanguage\language.php)



قم بإضافة











$lang['mute_msg'] = '<p style="color:red">%target% is muted by %hunter%</p>';

$lang['unmute_msg'] = '%hunter% removed mute for %traget%';

$lang['kick_msg'] = '<p style="color:red">%target% is kicked by %hunter%</p>';

$lang['unkick_msg'] = '%hunter% removed kicked for %traget%';

$lang['ban_msg'] = '<p style="color:red">%target% is banned by %hunter%</p>';

$lang['unban_msg'] = '%hunter% removed ban for %traget%';

باللغة العربية :

$lang['mute_msg'] = '<p style="color:red">تم كتم %target% من قبل  %hunter%</p>';

$lang['unmute_msg'] = 'تم ازالة الكتم عن %target% من قبل %hunter%';

$lang['kick_msg'] = '<p style="color:red">تم طرد %target% من قبل  %hunter%</p>';

$lang['unkick_msg'] = 'تم فك الطرد عن %target% من قبل %hunter%';

$lang['ban_msg'] = '<p style="color:red">تم حجب %target% من قبل  %hunter%</p>';

$lang['unban_msg'] = 'تم فك حجب %target% من قبل  %hunter%';
 
التعديل الأخير:
أعلى