30 lines
910 B
PHP
30 lines
910 B
PHP
<?php
|
||
if (!defined('GAME')) {
|
||
die();
|
||
}
|
||
|
||
if ($p['m1'] != 1 && $p['citym1'] != 1) {
|
||
$uer = 'У Вас нет прав на использование данного заклятия';
|
||
return;
|
||
}
|
||
|
||
$uu = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `login` = "' . mysql_real_escape_string($_POST['logingo']) . '" LIMIT 1'));
|
||
if (!isset($uu['id'])) {
|
||
$uer = 'Персонаж не найден в этом городе';
|
||
return;
|
||
}
|
||
|
||
$time = new DateTime();
|
||
$time->modify("+ {$_POST['time']} minute");
|
||
(new \Moderation\Moderation($uu['id']))->silence($time);
|
||
|
||
$uer = "Персонажу {$uu['login']} запрещено общаться в чате до {$time->format('d M Y H:i')}.";
|
||
unset($time);
|
||
|
||
$cmsg = new ChatMessage();
|
||
$cmsg->setRoom($u->info['room']);
|
||
$cmsg->setText("[img[items/silence.gif]] $uer");
|
||
$cmsg->setType(6);
|
||
$cmsg->setTypeTime(1);
|
||
(new Chat())->sendMsg($cmsg);
|