Реализация 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
+123 -128
View File
@@ -1704,10 +1704,16 @@ class Battle
'INSERT INTO `eff_users` (`no_Ace`,`id_eff`,`overType`,`uid`,`name`,`data`,`timeUse`) VALUES ("1","31","23","' . $u->info['id'] . '","Касание Хаоса","nofastfinisheff=1","' . time(
) . '")'
);
mysql_query(
"INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $u->info['city'] . "','" . $u->info['room'] . "','','" . $u->info['login'] . "','Вы создали предмет "Образец"x" . (($this->info['izlomObr'] - $this->info['izlomObrNow']) * 7) . "','" . time(
) . "','6','0')"
$cmsg = new ChatMessage();
$cmsg->setCity($u->info['city']);
$cmsg->setRoom($u->info['room']);
$cmsg->setTo($u->info['login']);
$cmsg->setType(6);
$cmsg->setText(
'Вы создали предмет "Образец" x' . (($this->info['izlomObr'] - $this->info['izlomObrNow']) * 7)
);
(new Chat())->sendMsg($cmsg);
$i01 = 1;
while ($i01 <= (($this->info['izlomObr'] - $this->info['izlomObrNow'])) * 7) {
$u->addItem(1226, $u->info['id'], '|sudba=' . $u->info['login']);
@@ -1738,6 +1744,7 @@ class Battle
public function finishBattle($t, $v, $nl, $tl)
{
global $magic, $u, $q, $c;
$chat = new Chat();
mysql_query('LOCK TABLES users,stats,battle,battle_last,battle_end,chat WRITE');
$frtu = false;
$test = mysql_fetch_array(
@@ -2116,6 +2123,10 @@ class Battle
$i = 0;
while ($i < count($this->users)) {
$cmsg = new ChatMessage();
$cmsg->setType(6);
$cmsg->setCity($this->users[$i]['city']);
$cmsg->setIsAlert(true);
if ($this->users[$i]['no_ip'] == 'trupojor') {
$mon = mysql_fetch_array(
mysql_query(
@@ -2128,15 +2139,14 @@ class Battle
mysql_query(
'UPDATE `stats` SET `hpNow` = "' . $this->stats[$i]['hpAll'] . '",`mpNow` = "' . $this->stats[$i]['mpAll'] . '" WHERE `id` = "' . $this->users[$i]['id'] . '" LIMIT 1'
);
mysql_query(
'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("<font color=red>Внимание!</font> ' . mysql_real_escape_string(
str_replace(
'{b}',
'<strong>' . $this->users[$i]['login'] . '</strong> [' . $this->users[$i]['level'] . ']<a target=_blank href=info/' . $this->users[$i]['id'] . ' ><img width=12 height=11 src=https://img.new-combats.com/i/inf_capitalcity.gif ></a>',
$mon['nich_text']
)
) . ' ","' . $this->users[$i]['city'] . '","","6","1","' . time() . '")'
$cmsg->setText(
str_replace(
'{b}',
'<strong>' . $this->users[$i]['login'] . '</strong> [' . $this->users[$i]['level'] . ']<a target=_blank href=info/' . $this->users[$i]['id'] . ' ><img width=12 height=11 src=https://img.new-combats.com/i/inf_capitalcity.gif ></a>',
$mon['nich_text']
)
);
$chat->sendMsg($cmsg);
} elseif ($this->info['team_win'] != $this->users[$i]['team']) {
//Выиграли
$j = 0;
@@ -2171,18 +2181,14 @@ class Battle
mysql_query(
'UPDATE `stats` SET `res_x` = "' . $truptimelast . '" WHERE `id` = "' . $this->users[$i]['id'] . '" LIMIT 1'
);
mysql_query(
'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("<font color=red>Внимание!</font> ' . mysql_real_escape_string(
str_replace(
'{b}',
'<strong>' . $this->users[$i]['login'] . '</strong> [' . $this->users[$i]['level'] . ']<a target=_blank href=info/' . $this->users[$i]['id'] . ' ><img width=12 height=11 src=https://img.new-combats.com/i/inf_capitalcity.gif ></a>',
str_replace(
'{u}', $usrwin,
$mon['win_text']
)
)
) . ' ","' . $this->users[$i]['city'] . '","","6","1","' . time() . '")'
$cmsg->setText(
str_replace(
'{b}',
'<strong>' . $this->users[$i]['login'] . '</strong> [' . $this->users[$i]['level'] . ']<a target=_blank href=info/' . $this->users[$i]['id'] . ' ><img width=12 height=11 src=https://img.new-combats.com/i/inf_capitalcity.gif ></a>',
str_replace('{u}', $usrwin, $mon['win_text'])
)
);
$chat->sendMsg($cmsg);
unset($usrwin);
} else {
//Проиграли
@@ -2194,15 +2200,14 @@ class Battle
mysql_query(
'UPDATE `stats` SET `hpNow` = "' . $this->stats[$i]['hpAll'] . '",`mpNow` = "' . $this->stats[$i]['mpAll'] . '" WHERE `id` = "' . $this->users[$i]['id'] . '" LIMIT 1'
);
mysql_query(
'INSERT INTO `chat` (`text`,`city`,`to`,`type`,`new`,`time`) VALUES ("<font color=red>Внимание!</font> ' . mysql_real_escape_string(
str_replace(
'{b}',
'<strong>' . $this->users[$i]['login'] . '</strong> [' . $this->users[$i]['level'] . ']<a target=_blank href=info/' . $this->users[$i]['id'] . ' ><img width=12 height=11 src=https://img.new-combats.com/i/inf_capitalcity.gif ></a>',
$mon['lose_text']
)
) . ' ","' . $this->users[$i]['city'] . '","","6","1","' . time() . '")'
$cmsg->setText(
str_replace(
'{b}',
'<strong>' . $this->users[$i]['login'] . '</strong> [' . $this->users[$i]['level'] . ']<a target=_blank href=info/' . $this->users[$i]['id'] . ' ><img width=12 height=11 src=https://img.new-combats.com/i/inf_capitalcity.gif ></a>',
$mon['lose_text']
)
);
$chat->sendMsg($cmsg);
}
}
}
@@ -2240,19 +2245,21 @@ class Battle
'UPDATE `users_achiv` SET `pg`= `pg`+1 WHERE `id` = "' . $pld['id'] . '" LIMIT 1'
);
if ($this->users[$i]['team'] == $this->info['team_win']) {
if (rand(1, 100) <= 5) {
$u->addItem(10020, $pld['id'], '');
$pld['battle_text'] .= ' и <strong>Жетон Успеха</strong>. ';
}
if ($this->users[$i]['team'] == $this->info['team_win'] && rand(1, 100) <= 5) {
$u->addItem(10020, $pld['id'], '');
$pld['battle_text'] .= ' и <strong>Жетон Успеха</strong>. ';
}
} else {
$pld['battle_text'] .= ' Вы ничего не получили. <strong>Нужно набить больше 500 урона урона</strong> .';
}
$cmsg = new ChatMessage();
$cmsg->setCity($pld['city']);
$cmsg->setRoom($pld['room']);
$cmsg->setTo($pld['login']);
$cmsg->setText($pld['battle_text']);
$cmsg->setType(6);
$chat->sendMsg($cmsg);
mysql_query(
"INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $pld['city'] . "','" . $pld['room'] . "','','" . $pld['login'] . "','" . $pld['battle_text'] . "','-1','6','0')"
);
mysql_query(
'DELETE FROM `stats` WHERE `id` = "' . $this->users[$i]['id'] . '" LIMIT 1'
);
@@ -2291,7 +2298,6 @@ class Battle
'UPDATE `stats` SET `zv` = "0",`team` = "0",`exp` = `exp` + `battle_exp`,`battle_exp` = "0",`battle_yron` = "0",`enemy` = "0", `timeGo` = "' . time(
) . '" WHERE `id` = "' . $this->users[$i]['id'] . '" LIMIT 1'
);
//mysql_query('UPDATE `stats` SET `zv` = "0",`team` = "0",`exp` = `exp` + `battle_exp`,`battle_exp` = "0",`timeGo` = "'.time().'" WHERE `id` = "'.$this->users[$i]['id'].'" LIMIT 1');
mysql_query('DELETE FROM `eff_users` WHERE `uid` = "' . $this->users[$i]['id'] . '" LIMIT 100');
} elseif ($this->users[$i]['bot'] > 0) {
$this->users[$i]['battle'] = 0;
@@ -2376,6 +2382,13 @@ class Battle
'SELECT * FROM `dungeon_bots` WHERE `dn` = "' . $this->info['dn_id'] . '" AND `for_dn` = "0" AND `x` = "' . $this->info['x'] . '" AND `delete` = "0" AND `y`= "' . $this->info['y'] . '" LIMIT 100'
);
while ($tbot = mysql_fetch_array($j1)) {
$cmsg = new ChatMessage();
$cmsg->setDn($this->info['dn_id']);
$cmsg->setCity($this->users[0]['city']);
$cmsg->setRoom($this->users[0]['room']);
$cmsg->setType(6);
$cmsg->setTypeTime(1);
$j2 = 0;
while ($j2 < $tbot['colvo']) {
if (isset($tbot['id2'])) {
@@ -2397,8 +2410,7 @@ class Battle
)
);
}
if (isset($questDrop['id'])) { // Если квест есть, предмет имеет шанс выпасть
} elseif (isset($itmz[2]) && $itmz[2] != '') {
if (!isset($questDrop['id']) && isset($itmz[2]) && $itmz[2] != '') {
$itmz[1] = 0;
} // Если предмет квестовый, а квеста у игрока нет, то предмет выпадет с вероятностью 0
unset($questDrop);
@@ -2414,11 +2426,10 @@ class Battle
);
$itmnm = $itmnm['name'];
$rtxt = 'У <strong>' . $tbot2['login'] . '</strong> был предмет &quot;' . $itmnm . '&quot; и кто угодно может поднять его';
mysql_query(
"INSERT INTO `chat` (`dn`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`,`new`) VALUES ('" . $this->info['dn_id'] . "','" . $this->users[0]['city'] . "','" . $this->users[0]['room'] . "','','','" . $rtxt . "','" . time(
) . "','6','0','1','1')"
$cmsg->setText(
'У <strong>' . $tbot2['login'] . '</strong> был предмет &quot;' . $itmnm . '&quot; и кто угодно может поднять его'
);
$chat->sendMsg($cmsg);
$ins = mysql_query(
'INSERT INTO `dungeon_items` (`dn`,`user`,`item_id`,`time`,`x`,`y`) VALUES (
@@ -2441,64 +2452,60 @@ class Battle
}
//
//Квест 1-15 сентября,
if (date('m') == 9 && date('d') < 15) {
if ($this->get_chanse(99) == true) {
//Не выпало
} elseif ($this->info['dungeon'] == 12 || $this->info['dungeon'] == 101) {
$tou = 0; //какому юзеру предназначено
/* выделяем случайного юзера из команды */
$itmz = [
rand(4745, 4751),
100,
];
//
$itmnm = mysql_fetch_array(
mysql_query(
'SELECT `name` FROM `items_main` WHERE `id` = "' . $itmz[0] . '" LIMIT 1'
)
);
$itmnm = $itmnm['name'];
$rtxt = 'У <strong>' . $tbot2['login'] . '</strong> был предмет &quot;' . $itmnm . '&quot; и кто угодно может поднять его';
if (
date('m') == 9 &&
date('d') < 15 &&
!$this->get_chanse(99) &&
($this->info['dungeon'] == 12 || $this->info['dungeon'] == 101)
) {
$tou = 0; //какому юзеру предназначено
/* выделяем случайного юзера из команды */
$itmz = [
rand(4745, 4751),
100,
];
//
$itmnm = mysql_fetch_array(
mysql_query(
"INSERT INTO `chat` (`dn`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`,`new`) VALUES ('" . $this->info['dn_id'] . "','" . $this->users[0]['city'] . "','" . $this->users[0]['room'] . "','','','" . $rtxt . "','" . time(
) . "','6','0','1','1')"
);
'SELECT `name` FROM `items_main` WHERE `id` = "' . $itmz[0] . '" LIMIT 1'
)
);
$itmnm = $itmnm['name'];
$ins = mysql_query(
'INSERT INTO `dungeon_items` (`dn`,`user`,`item_id`,`time`,`x`,`y`) VALUES (
$cmsg->setText(
'У <strong>' . $tbot2['login'] . '</strong> был предмет &quot;' . $itmnm . '&quot; и кто угодно может поднять его'
);
$chat->sendMsg($cmsg);
$ins = mysql_query(
'INSERT INTO `dungeon_items` (`dn`,`user`,`item_id`,`time`,`x`,`y`) VALUES (
"' . $this->info['dn_id'] . '",
"' . $tou . '",
"' . $itmz[0] . '",
"' . time() . '",
"' . $this->info['x'] . '",
"' . $this->info['y'] . '")'
);
}
);
}
//
//Странички саныча,
if (rand(1, 100) <= 99) {
//Не выпало
} elseif ($this->info['dungeon'] == 12 || $this->info['dungeon'] == 3 ||
$this->info['dungeon'] == 101 || $this->info['dungeon'] == 16 ||
$this->info['dungeon'] == 9 || $this->info['dungeon'] == 10 ||
$this->info['dungeon'] == 13 || $this->info['dungeon'] == 106) {
$tou = 0; //какому юзеру предназначено
// выделяем случайного юзера из команды
$itmz = rand(3143, 3192);
$itmz = mt_rand(3143, 3192);
//
$itmnm = mysql_fetch_array(
mysql_query('SELECT `name` FROM `items_main` WHERE `id` = "' . $itmz . '" LIMIT 1')
);
$itmnm = $itmnm['name'];
$rtxt = 'У <strong>' . $tbot2['login'] . '</strong> был предмет &quot;' . $itmnm . '&quot; и кто угодно может поднять его';
mysql_query(
"INSERT INTO `chat` (`dn`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`,`new`) VALUES ('" . $this->info['dn_id'] . "','" . $this->users[0]['city'] . "','" . $this->users[0]['room'] . "','','','" . $rtxt . "','" . time(
) . "','6','0','1','1')"
);
$cmsg->setText('У <strong>' . $tbot2['login'] . '</strong> был предмет &quot;' . $itmnm . '&quot; и кто угодно может поднять его');
$chat->sendMsg($cmsg);
$ins = mysql_query(
'INSERT INTO `dungeon_items` (`dn`,`user`,`item_id`,`time`,`x`,`y`) VALUES (
@@ -2538,21 +2545,18 @@ class Battle
$i = $this->uids[$u->info['id']];
if ($this->info['team_win'] >= 0) {
$cmsg = new ChatMessage();
$cmsg->setCity($this->users[$i]['city']);
$cmsg->setRoom($this->users[$i]['room']);
$cmsg->setType(6);
if ($this->stats[$i]['pbe'] > 0) {
//Бонус покупателя
$this->expCoef += $this->stats[$i]['pbe'];
}
if ($this->info['razdel'] == 5) {
if ($c['m'] >= 6 && $c['m'] <= 8) {
//Летний период
$this->expCoef += 5;
} elseif ($c['w'] == 0 || $c['w'] == 6) {
//Выходные дни
$this->expCoef += 5;
}
if ($this->info['razdel'] == 5 && ($c['m'] >= 6 && $c['m'] <= 8 || $c['w'] == 0 || $c['w'] == 6)) {
$this->expCoef += 5;
}
$this->stats[$i]['exp'] += $this->expCoef;
@@ -2724,10 +2728,8 @@ class Battle
//Поломка предметов
if ($act01 == 1) {
//победа
if ($this->users[$i]['dnow'] == 0) {
if ($this->users[$i]['hpNow'] < 1) {
$lom = 0.05;
}
if ($this->users[$i]['dnow'] == 0 && $this->users[$i]['hpNow'] < 1) {
$lom = 0.05;
}
} elseif ($act01 == 2) {
//поражение
@@ -2769,12 +2771,9 @@ class Battle
}
unset($ulan);
//
mysql_query(
"INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`
) VALUES (
'1','" . $this->users[$i]['city'] . "','" . $this->users[$i]['room'] . "','','" . $this->users[$i]['login'] . "'
,'Ваш питомец &quot;" . $a004['name'] . "&quot; получил опыт: <strong>" . $aexp . "</strong>','-1','6','0')"
);
$cmsg->setTo($this->users[$i]['login']);
$cmsg->setText("Ваш питомец «{$a004['name']}» получил опыт: <strong>$aexp</strong>");
$chat->sendMsg($cmsg);
//
$upd = mysql_query(
'UPDATE `users_animal` SET `exp` = `exp` + ' . $aexp . ' WHERE `id` = "' . $this->users[$i]['animal'] . '" AND `level` < ' . $this->users[$i]['level'] . ' LIMIT 1'
@@ -3675,17 +3674,18 @@ class Battle
'UPDATE `items_users` SET `delete` = "' . time(
) . '" WHERE `uid` = "' . $u->info['id'] . '" AND `item_id` = "1189" OR `item_id` = "4447" OR `item_id` = "1174") LIMIT 1000'
);
if ($this->users[$i]['sex'] == 0) {
$rtxt = '<strong>' . $this->users[$i]['login'] . '</strong> трагически погиб без права на воскрешение и покидает подземелье' . $nld;
} else {
$rtxt = '<strong>' . $this->users[$i]['login'] . '</strong> трагически погибла без права на воскрешение и покидает подземелье' . $nld;
}
}
if ($rtxt != '') {
mysql_query(
"INSERT INTO `chat` (`dn`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`,`typeTime`,`new`) VALUES ('" . $this->info['dn_id'] . "','" . $this->users[$i]['city'] . "','" . $this->users[$i]['room'] . "','','','" . $rtxt . "','" . time(
) . "','6','0','1','1')"
);
if (!empty($rtxt)) {
$cmsg->setDn($this->info['dn_id']);
$cmsg->setText($rtxt);
$cmsg->setTypeTime(1);
$chat->sendMsg($cmsg);
}
}
@@ -3704,9 +3704,9 @@ class Battle
);
if ($this->info['turnir'] == 0) {
//пишем в чат
mysql_query(
"INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $this->users[$i]['city'] . "','" . $this->users[$i]['room'] . "','','" . $this->users[$i]['login'] . "','" . $this->users[$i]['battle_text'] . "','-1','6','0')"
);
$cmsg->setTo($this->users[$i]['login']);
$cmsg->setText($this->users[$i]['battle_text']);
$chat->sendMsg($cmsg);
} else {
mysql_query(
'UPDATE `turnirs` SET `winner` = "' . $this->info['team_win'] . '" WHERE `id` = "' . $this->info['turnir'] . '" LIMIT 1'
@@ -3759,6 +3759,13 @@ class Battle
public function addGlobalItems($bid, $uid, $itm, $eff, $ico, $exp, $cr, $ecr)
{
global $u;
$chat = new Chat();
$cmsg = new ChatMessage();
$cmsg->setType(6);
$cmsg->setCity($this->users[$this->uids[$uid]]['city']);
$cmsg->setRoom($this->users[$this->uids[$uid]]['room']);
$cmsg->setTo($this->users[$this->uids[$uid]]['login']);
$cmsg->setColor('#cb0000');
//
//Выпадение дропа на ЦП
if ($bid == 1008) {
@@ -4055,11 +4062,9 @@ class Battle
$cr
) . ') WHERE `id` = "' . mysql_real_escape_string($uid) . '" LIMIT 1'
);
mysql_query(
"INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $this->users[$this->uids[$uid]]['city'] . "','" . $this->users[$this->uids[$uid]]['room'] . "','','" . $this->users[$this->uids[$uid]]['login'] . "','<font color=#cb0000><strong>Вы получили кредиты:</strong> " . mysql_real_escape_string(
$cr
) . " <strong>кр.</strong></font>','-1','6','0')"
);
$cmsg->setText("<strong>Вы получили кредиты: $cr кр.</strong>");
$chat->sendMsg($cmsg);
}
//
if ($ecr != '' && $ecr > 0 && $this->stats[$this->uids[$uid]]['hpNow'] > 0) {
@@ -4070,20 +4075,16 @@ class Battle
) . ') WHERE `id` = "' . $this->users[$this->uids[$uid]]['id'] . '" LIMIT 1'
);
if (!$resulttp) {
mysql_query(
"INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $this->users[$this->uids[$uid]]['city'] . "','" . $this->users[$this->uids[$uid]]['room'] . "','','" . $this->users[$this->uids[$uid]]['login'] . "','<font color=#cb0000><strong>Трупожор был пуст!!!</strong></font>','-1','6','0')"
);
$cmsg->setText("<strong>Трупожор был пуст!</strong>");
$chat->sendMsg($cmsg);
$u->addDelo(
4, $this->users[$this->uids[$uid]]['id'],
'&quot;<font color="olive">System.battle</font>&quot;: (В бою трупожор), ПУСТ!!! ', time(),
$this->users[$this->uids[$uid]]['city'], 'System.battle', 0, 0
);
} else {
mysql_query(
"INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $this->users[$this->uids[$uid]]['city'] . "','" . $this->users[$this->uids[$uid]]['room'] . "','','" . $this->users[$this->uids[$uid]]['login'] . "','<font color=#cb0000><strong>Вы получили Евро-кредиты:</strong> " . mysql_real_escape_string(
$ecr
) . " <strong>екр.</strong></font>','-1','6','0')"
);
$cmsg->setText("<strong>Вы получили еврокредиты: $ecr екр.</strong>");
$chat->sendMsg($cmsg);
$u->addDelo(
4, $this->users[$this->uids[$uid]]['id'],
'&quot;<font color="olive">System.battle</font>&quot;: Персонаж получил <strong>' . $ecr . ' ЕКР</strong> (В бою трупожор), сейчас: <strong>' . $this->users[$this->uids[$uid]]['money2'] . ' ЕКР</strong>',
@@ -4179,11 +4180,8 @@ class Battle
}
if ($txt != '') {
$txt = ltrim($txt, ', ');
mysql_query(
"INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $this->users[$this->uids[$uid]]['city'] . "','" . $this->users[$this->uids[$uid]]['room'] . "','','" . $this->users[$this->uids[$uid]]['login'] . "','<font color=#cb0000><strong>Вы совершили подвиг:</strong> " . mysql_real_escape_string(
$txt
) . "</font>','-1','6','0')"
);
$cmsg->setText("<strong>Вы совершили подвиг:</strong> $txt");
$chat->sendMsg($cmsg);
}
}
if ($itm != '') {
@@ -4219,11 +4217,8 @@ class Battle
}
if ($txt != '') {
$txt = ltrim($txt, ', ');
mysql_query(
"INSERT INTO `chat` (`new`,`city`,`room`,`login`,`to`,`text`,`time`,`type`,`toChat`) VALUES ('1','" . $this->users[$this->uids[$uid]]['city'] . "','" . $this->users[$this->uids[$uid]]['room'] . "','','" . $this->users[$this->uids[$uid]]['login'] . "','<font color=#cb0000><strong>Вы получили предметы:</strong> " . mysql_real_escape_string(
$txt
) . "</font>','-1','6','0')"
);
$cmsg->setText("<strong>Вы получили предметы:</strong> $txt");
$chat->sendMsg($cmsg);
}
}
//