33 lines
846 B
PHP
33 lines
846 B
PHP
<?php
|
||
if (!defined('GAME')) {
|
||
die();
|
||
}
|
||
|
||
if ($p['deletInfo'] != 1) {
|
||
$uer = 'У Вас нет прав на использование данного заклятия';
|
||
return;
|
||
}
|
||
|
||
$uu = \Core\Db::getRow('select id, login, info_delete from users where login = ? order by id limit 1', [$_POST['logingo']]);
|
||
|
||
if (!isset($uu['id'])) {
|
||
$uer = 'Персонаж не найден.';
|
||
return;
|
||
}
|
||
|
||
if ($uu['info_delete'] <= time()) {
|
||
$uer = 'Персонаж не обезличен';
|
||
return;
|
||
}
|
||
|
||
(new \Moderation\Moderation($uu['id']))->undepersonalize();
|
||
|
||
$uer = "Персонаж {$uu['login']} больше не под подозрением.";
|
||
|
||
$cmsg = new ChatMessage();
|
||
$cmsg->setRoom($u->info['room']);
|
||
$cmsg->setText("[img[items/uncui.gif]] $uer");
|
||
$cmsg->setType(6);
|
||
$cmsg->setTypeTime(1);
|
||
(new Chat())->sendMsg($cmsg);
|