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 @@
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 '! ' . $this->text;
+ return 'Внимание! ' . $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'] . '","В целях борьбы против рекламы, общение в чате доступно с 8-го уровня. ","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']);