Реализация ChatMessageDTO.

This commit is contained in:
2023-01-28 04:24:37 +02:00
parent d9ec810f7f
commit 99b90a198b
105 changed files with 11492 additions and 10578 deletions
+8 -13
View File
@@ -13,11 +13,7 @@ if (!in_array(UserIp::get(), ['', '127.0.0.1', '91.228.152.24', $_SERVER['SERVER
function e($t)
{
mysql_query(
'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("core #' . date('d.m.Y') . ' %' . date(
'H:i:s'
) . ' (Критическая ошибка): <b>' . mysql_real_escape_string($t) . '</b>","capitalcity","TABU","6","1","-1")'
);
(new Chat())->debug($t, true);
}
if (isset($_GET['cron_core'])) {
@@ -111,14 +107,13 @@ if (isset($_GET['atak_user']) && $u->info['battle'] == 0 && $_GET['atak_user'] !
$magic->atackUser($u->info['id'], $ua['id'], $ua['team'], $ua['battle'], $ua['bbexp'], 50);
$rtxt = '[img[items/pal_button8.gif]] &quot;' . $u->info['login'] . '&quot; совершил' . $sx . ' нападение по метке на персонажа &quot;' . $ua['login'] . '&quot;.';
Db::sql(
'insert into chat (new, type, typeTime, time, city, room, text) values (1,6,1,unix_timestamp(),?,?,?)',
[
$u->info['city'],
$u->info['room'],
$rtxt,
]
);
$cmsg = new ChatMessage();
$cmsg->setCity($u->info['city']);
$cmsg->setRoom($u->info['room']);
$cmsg->setText($rtxt);
$cmsg->setType(6);
$cmsg->setTypeTime(1);
(new Chat())->sendMsg($cmsg);
header('location: main.php');
die();