diff --git a/_incl_data/class/Chat.php b/_incl_data/class/Chat.php index bc76e54f..97b021da 100644 --- a/_incl_data/class/Chat.php +++ b/_incl_data/class/Chat.php @@ -115,7 +115,6 @@ class Chat `delete`, global, molch, - nosee, typeTime, dn, frv @@ -138,7 +137,6 @@ class Chat $chatMessage->getDelete(), $chatMessage->getGlobal(), $chatMessage->getMolch(), - $chatMessage->getNosee(), $chatMessage->getTypeTime(), $chatMessage->getDn(), $chatMessage->getFireworks(), diff --git a/_incl_data/class/ChatMessage.php b/_incl_data/class/ChatMessage.php index d1214b0f..ebd52b86 100644 --- a/_incl_data/class/ChatMessage.php +++ b/_incl_data/class/ChatMessage.php @@ -1,7 +1,7 @@ <?php -#todo ������� ����� ����� ����� city, room, color, invis �������� ������� �� login (�����������) -#todo ���� ��� ���, ������ �������� ����� ����� ������������. +#todo кажется часть полей вроде city, room, color, invis напрямик зависит от login (отправитель) +#todo если это так, частью сеттеров можно будет пожертвовать. class ChatMessage { @@ -21,13 +21,12 @@ class ChatMessage private bool $isAlert = false; private int $invis = 0; private int $da = 0; - private int $nosee = 0; private int $delete = 0; private int $molch = 0; private int $global = 0; private int $dn = 0; /** - * ���������, ���� ������! + * Феерверки, чёрт подери! * _incl_data\class\magic\feerverks.php * @var string|null */ @@ -97,22 +96,6 @@ class ChatMessage $this->molch = $molch; } - /** - * @return int - */ - public function getNosee(): int - { - return $this->nosee; - } - - /** - * @param int $nosee - */ - public function setNosee(int $nosee): void - { - $this->nosee = $nosee; - } - /** * @return int */ @@ -224,7 +207,7 @@ class ChatMessage public function getText(): string { if ($this->isAlert) { - return '<span style="color: red">��������!</span> ' . $this->text; + return '<span style="color: red">Внимание!</span> ' . $this->text; } return $this->text; } @@ -362,7 +345,7 @@ class ChatMessage } /** - * ��������� � ��������� ������� ������� "��������!". + * Добавляет к сообщению красный префикс "Внимание!". * @param bool $isAlert */ public function setIsAlert(bool $isAlert): void @@ -387,7 +370,7 @@ class ChatMessage } /** - * �������� ��� ������������ �������� ����������. + * Заглушка для опциональной передачи параметров. * @param string $json * @return void */ diff --git a/online.php b/online.php index cd49a18a..7e6336ff 100644 --- a/online.php +++ b/online.php @@ -415,10 +415,8 @@ if (isset($_POST['msg']) && str_replace(' ', '', $_POST['msg']) != '') { ); } } - unset($admq); - } else { - unset($admq); } + unset($admq); } $qix = mysql_fetch_array( @@ -509,19 +507,8 @@ if (isset($_POST['msg']) && str_replace(' ', '', $_POST['msg']) != '') { $i++; } - $msg['nosee'] = 0; - - if ($u->info['level'] < 1) { - $msg['nosee'] = round($u->info['host_reg']); - if ($msg['nosee'] == 0) { - $msg['nosee'] = -1; - $r['js'] .= 'chat.sendMsg(["new","' . time( - ) . '","6","","' . $u->info['login'] . '","<small><b>В целях борьбы против рекламы, общение в чате доступно с 8-го уровня.</b> </small>","red","1","1","0"]);'; - } - } //todo: внимательно перебрать логику, возможно есть ненужные\дефолтные поля. $cmsg = new ChatMessage(); - $cmsg->setNosee($msg['nosee']); $cmsg->setInvis($u->info['invis']); $cmsg->setDa($msg['da']); $cmsg->setDelete($msg['delete']);