ManaPlus
chatrecv.cpp
Go to the documentation of this file.
1 /*
2  * The ManaPlus Client
3  * Copyright (C) 2004-2009 The Mana World Development Team
4  * Copyright (C) 2009-2010 The Mana Developers
5  * Copyright (C) 2011-2018 The ManaPlus Developers
6  *
7  * This file is part of The ManaPlus Client.
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program. If not, see <http://www.gnu.org/licenses/>.
21  */
22 
23 #include "net/eathena/chatrecv.h"
24 
25 #include "actormanager.h"
26 #include "notifymanager.h"
27 
28 #include "being/localplayer.h"
29 #include "being/playerinfo.h"
30 #include "being/playerrelation.h"
31 #include "being/playerrelations.h"
32 
33 #include "const/gui/chat.h"
34 
36 
37 #include "gui/windows/chatwindow.h"
38 
40 
41 #include "net/messagein.h"
42 
43 #include "net/ea/chatrecv.h"
44 
46 
47 #include "resources/chatobject.h"
48 #include "utils/gettext.h"
49 #include "utils/stringutils.h"
50 
51 #include "debug.h"
52 
53 namespace EAthena
54 {
55 
56 namespace ChatRecv
57 {
58  std::string mChatRoom;
59 } // namespace ChatRecv
60 
62 {
63  const int type = msg.readUInt8("type");
64  const int flag = msg.readUInt8("flag");
65  switch (type)
66  {
67  case 0:
68  switch (flag)
69  {
70  case 0:
72  break;
73  case 1:
75  break;
76  case 2:
78  break;
79  default:
81  break;
82  }
83  break;
84  case 1:
85  switch (flag)
86  {
87  case 0:
90  break;
91  case 1:
94  break;
95  default:
98  break;
99  }
100  break;
101 
102  default:
104  break;
105  }
106 }
107 
109 {
110  BLOCK_START("ChatRecv::processChat")
111  const int chatMsgLength = msg.readInt16("len") - 4;
112  if (chatMsgLength <= 0)
113  {
114  BLOCK_END("ChatRecv::processChat")
115  return;
116  }
117 
118  processChatContinue(msg.readRawString(chatMsgLength, "message"),
120 }
121 
123 {
124  const int msgId = msg.readInt16("msg id");
125  // +++ here need load message from configuration file
126  std::string chatMsg;
127  if (msgId >= 1266 && msgId <= 1269)
128  {
130  return;
131  }
132  switch (msgId)
133  {
134  case 1334:
135  // TRANSLATORS: error message
136  chatMsg = _("Can't cast skill in this area.");
137  break;
138  case 1335:
139  // TRANSLATORS: error message
140  chatMsg = _("Can't use item in this area.");
141  break;
142  case 1773:
143  // TRANSLATORS: error message
144  chatMsg = _("Can't equip. Wrong level.");
145  break;
146  case 1774:
147  // TRANSLATORS: error message
148  chatMsg = _("Can't use. Wrong level.");
149  break;
150  case 1923:
151  // TRANSLATORS: error message
152  chatMsg = _("Work in progress."); // busy with npc
153  break;
154  default:
155  chatMsg = strprintf("Message #%d", msgId);
156  break;
157  }
159 }
160 
162 {
163  const int msgId = msg.readInt16("msg id");
164  const int value = msg.readInt32("value");
165  if (msgId == 1862)
166  {
168  return;
169  }
170  // +++ here need load message from configuration file
171  const std::string chatMsg = strprintf(
172  "Message #%d, value: %d", msgId, value);
174 }
175 
177 {
178  const int skillId = msg.readInt16("skill id");
179  const int msgId = msg.readInt32("msg id");
180  // +++ here need load message from configuration file
181  const std::string chatMsg = strprintf(
182  "Message #%d, skill: %d", msgId, skillId);
184 }
185 
187 {
188  BLOCK_START("ChatRecv::processChat")
189  int chatMsgLength = msg.readInt16("len") - 4;
190  msg.readInt32("unused");
191  msg.readInt32("chat color");
192  chatMsgLength -= 8;
193  if (chatMsgLength <= 0)
194  {
195  BLOCK_END("ChatRecv::processChat")
196  return;
197  }
198 
199  std::string message = msg.readRawString(chatMsgLength, "message");
200  std::string msg2 = message;
201  if (findCutFirst(msg2, "You're now in the '#") && findCutLast(msg2, "'"))
202  {
203  const size_t idx = msg2.find("' channel for '");
204  if (idx != std::string::npos && (chatWindow != nullptr))
205  {
206  chatWindow->addChannelTab(std::string("#").append(
207  msg2.substr(0, idx)), false);
208  return;
209  }
210  }
211  else
212  {
213  const std::string nick = Ea::ChatRecv::getLastWhisperNick();
214  if (nick.size() > 1 && nick[0] == '#')
215  {
216  if (message == strprintf("[ %s ] %s : \302\202\302",
217  nick.c_str(), localPlayer->getName().c_str()))
218  {
220  }
221  }
222  }
224 }
225 
226 std::string ChatRecv::extractChannelFromMessage(std::string &chatMsg)
227 {
228  std::string msg = chatMsg;
229  std::string channel(GENERAL_CHANNEL);
230  if (findCutFirst(msg, "[ #"))
231  { // found channel message
232  const size_t idx = msg.find(" ] ");
233  if (idx != std::string::npos)
234  {
235  channel = std::string("#").append(msg.substr(0, idx));
236  chatMsg = msg.substr(idx + 3);
237  }
238  }
239  return channel;
240 }
241 
242 void ChatRecv::processChatContinue(std::string chatMsg,
243  const ChatMsgTypeT own)
244 {
245  const std::string channel = extractChannelFromMessage(chatMsg);
246  bool allow(true);
247  if (chatWindow != nullptr)
248  {
249  allow = chatWindow->resortChatLog(chatMsg,
250  own,
251  channel,
254  }
255 
256  const size_t pos = chatMsg.find(" : ", 0);
257  if (pos != std::string::npos)
258  chatMsg.erase(0, pos + 3);
259 
260  trim(chatMsg);
261 
262  if (localPlayer != nullptr)
263  {
264  if (((chatWindow != nullptr) || Ea::ChatRecv::mShowMotd) && allow)
265  localPlayer->setSpeech(chatMsg);
266  }
267  BLOCK_END("ChatRecv::processChat")
268 }
269 
271 {
272  BLOCK_START("ChatRecv::processChat")
273  const int chatMsgLength = msg.readInt16("len") - 4;
274  if (chatMsgLength <= 0)
275  {
276  BLOCK_END("ChatRecv::processChat")
277  return;
278  }
279 
280  std::string chatMsg = msg.readRawString(chatMsgLength, "message");
281  // remove non persistend "colors" from server.
282  if (!findCutFirst(chatMsg, "ssss"))
283  findCutFirst(chatMsg, "eulb");
284 
285  if (chatWindow != nullptr)
286  chatWindow->addGlobalMessage(chatMsg);
287  BLOCK_END("ChatRecv::processChat")
288 }
289 
291 {
292  const int chatMsgLength = msg.readInt16("len") - 16;
293  msg.readInt32("font color");
294  msg.readInt16("font type");
295  msg.readInt16("font size");
296  msg.readInt16("font align");
297  msg.readInt16("font y");
298  if (chatWindow != nullptr)
299  {
300  const std::string chatMsg = msg.readRawString(chatMsgLength,
301  "message");
302  chatWindow->addGlobalMessage(chatMsg);
303  }
304  else
305  {
306  msg.readRawString(chatMsgLength, "message");
307  }
308 }
309 
311 {
312  BLOCK_START("ChatRecv::processWhisper")
313  int packetLen = 28;
314  if (msg.getVersion() >= 20091104)
315  packetLen += 4;
316  const int chatMsgLength = msg.readInt16("len") - packetLen;
317  std::string nick = msg.readString(24, "nick");
318  if (msg.getVersion() >= 20091104)
319  msg.readInt32("admin flag");
320 
321  if (chatMsgLength <= 0)
322  {
323  BLOCK_END("ChatRecv::processWhisper")
324  return;
325  }
326 
327  processWhisperContinue(nick, msg.readString(chatMsgLength, "message"));
328 }
329 
331 {
332  BLOCK_START("ChatRecv::processWhisperResponse")
333 
334  const uint8_t type = msg.readUInt8("response");
335  if (msg.getVersion() >= 20131223)
336  msg.readInt32("unknown");
337  if (type == 1 && (chatWindow != nullptr))
338  {
339  const std::string nick = Ea::ChatRecv::getLastWhisperNick();
340  if (nick.size() > 1 && nick[0] == '#')
341  {
343  // TRANSLATORS: chat message
344  strprintf(_("Message could not be sent, channel "
345  "%s is not exists."), nick.c_str()),
351  return;
352  }
353  }
355 }
356 
358 {
360  // +++ need put it in some object or window
361  const int count = (msg.readInt16("len") - 4) / 24;
362  for (int f = 0; f < count; f ++)
363  msg.readString(24, "nick");
364 }
365 
367 {
368  const int len = msg.readInt16("len") - 17;
369  ChatObject *const obj = new ChatObject;
370  obj->ownerId = msg.readBeingId("owner account id");
371  obj->chatId = msg.readInt32("chat id");
372  obj->maxUsers = msg.readInt16("max users");
373  obj->currentUsers = msg.readInt16("current users");
374  obj->type = msg.readUInt8("type");
375  obj->title = msg.readString(len, "title");
376  obj->update();
377 
378  Being *const dstBeing = actorManager->findBeing(obj->ownerId);
379  if (dstBeing != nullptr)
380  dstBeing->setChat(obj);
381 }
382 
384 {
385  const int count = (msg.readInt16("len") - 8) / 28;
386  const int id = msg.readInt32("chat id");
387 
388  // +++ ignore chat members for now
389  for (int f = 0; f < count; f ++)
390  {
391  msg.readInt32("role");
392  msg.readString(24, "name");
393  }
394 
395  const ChatObject *const oldChat = ChatObject::findById(id);
396 
397  if (oldChat != nullptr)
398  PlayerInfo::setRoomName(oldChat->title);
399  else
400  PlayerInfo::setRoomName(std::string());
401  chatWindow->joinRoom(true);
402  ChatObject *const obj = new ChatObject;
403  if (oldChat != nullptr)
404  {
405  obj->ownerId = oldChat->ownerId;
406  obj->chatId = oldChat->chatId;
407  obj->maxUsers = oldChat->maxUsers;
408  obj->currentUsers = oldChat->currentUsers;
409  obj->type = oldChat->type;
410  obj->title = oldChat->title;
411 // obj->update();
412  }
413  localPlayer->setChat(obj);
414 }
415 
417 {
418  msg.readInt16("users");
419  const std::string name = msg.readString(24, "name");
420  const int status = msg.readUInt8("flag"); // 0 - left, 1 - kicked
421  switch (status)
422  {
423  case 0:
425  break;
426  case 1:
428  break;
429  default:
430  UNIMPLEMENTEDPACKETFIELD(status);
431  break;
432  }
433  if ((localPlayer != nullptr) && name == localPlayer->getName())
434  {
435  if (chatWindow != nullptr)
436  chatWindow->joinRoom(false);
437  PlayerInfo::setRoomName(std::string());
438  if (localPlayer != nullptr)
439  localPlayer->setChat(nullptr);
440  }
441  else
442  {
443  Being *const being = actorManager->findBeingByName(
444  name, ActorType::Player);
445  if (being != nullptr)
446  being->setChat(nullptr);
447  }
448 }
449 
451 {
452  if (chatWindow == nullptr)
453  return;
454 
455  const std::string channel = msg.readString(24, "channel name");
456  const int flag = msg.readUInt8("flag");
457 
458  if (channel.size() < 2)
459  return;
460  switch (flag)
461  {
462  case 0:
463  default:
464  chatWindow->channelChatLog(channel,
465  // TRANSLATORS: chat message
466  strprintf(_("Can't open channel. Channel "
467  "%s is not exists."), channel.c_str()),
471  break;
472 
473  case 1:
474  case 2:
475  chatWindow->addChannelTab(std::string("#").append(
476  channel.substr(1)), false);
477  break;
478  }
479 }
480 
481 void ChatRecv::processWhisperContinue(const std::string &nick,
482  std::string chatMsg)
483 {
484  // ignoring future whisper messages
485  if (chatMsg.find("\302\202G") == 0 || chatMsg.find("\302\202A") == 0)
486  {
487  BLOCK_END("ChatRecv::processWhisper")
488  return;
489  }
490  // remove first unicode space if this is may be whisper command.
491  if (chatMsg.find("\302\202!") == 0)
492  chatMsg = chatMsg.substr(2);
493 
494  if (nick != "Server")
495  {
497  {
498  chatWindow->addWhisper(nick,
499  chatMsg,
501  }
502  }
503  else if (localChatTab != nullptr)
504  {
505  localChatTab->chatLog(chatMsg,
509  }
510  BLOCK_END("ChatRecv::processWhisper")
511 }
512 
514 {
515  if (actorManager == nullptr)
516  return;
517 
518  BLOCK_START("ChatRecv::processBeingChat")
519  const int chatMsgLength = msg.readInt16("len") - 8;
520  Being *const being = actorManager->findBeing(msg.readBeingId("being id"));
521 
522  if (chatMsgLength <= 0)
523  {
524  BLOCK_END("ChatRecv::processBeingChat")
525  return;
526  }
527 
528  std::string chatMsg = msg.readRawString(chatMsgLength, "message");
529 
530  if ((being != nullptr) && being->getType() == ActorType::Player)
531  being->setTalkTime();
532 
533  const size_t pos = chatMsg.find(" : ", 0);
534  std::string sender_name = ((pos == std::string::npos)
535  ? "" : chatMsg.substr(0, pos));
536 
537  if ((being != nullptr) && sender_name != being->getName()
538  && being->getType() == ActorType::Player)
539  {
540  if (!being->getName().empty())
541  sender_name = being->getName();
542  }
543  else
544  {
545  chatMsg.erase(0, pos + 3);
546  }
547 
548  trim(chatMsg);
549 
550  bool allow(true);
551  // We use getIgnorePlayer instead of ignoringPlayer here
552  // because ignorePlayer' side effects are triggered
553  // right below for Being::IGNORE_SPEECH_FLOAT.
554  if ((playerRelations.checkPermissionSilently(sender_name,
555  PlayerRelation::SPEECH_LOG) != 0u) && (chatWindow != nullptr))
556  {
557  allow = chatWindow->resortChatLog(
558  removeColors(sender_name).append(" : ").append(chatMsg),
563  }
564 
565  if (allow &&
566  being != nullptr &&
567  playerRelations.hasPermission(sender_name,
569  {
570  being->setSpeech(chatMsg);
571  }
572  BLOCK_END("ChatRecv::processBeingChat")
573 }
574 
576 {
577  const int result = msg.readUInt8("flag");
578  switch (result)
579  {
580  case 0:
581  {
583  chatWindow->joinRoom(true);
584  ChatObject *const obj = new ChatObject;
585  obj->ownerId = localPlayer->getId();
586  obj->chatId = 0;
587  obj->maxUsers = 1000;
588  obj->currentUsers = 1;
589  obj->type = 1;
590  obj->title = mChatRoom;
591  obj->update();
592  localPlayer->setChat(obj);
593  break;
594  }
595  case 1:
597  break;
598  case 2:
600  break;
601  default:
602  UNIMPLEMENTEDPACKETFIELD(result);
603  break;
604  }
605  mChatRoom.clear();
606 }
607 
609 {
610  const int chatId = msg.readInt32("chat id");
611  actorManager->removeRoom(chatId);
612 }
613 
615 {
616  const int result = msg.readUInt8("flag");
617  switch (result)
618  {
619  case 0:
621  break;
622  case 1:
624  break;
625  case 2:
627  break;
628  case 3:
629  break;
630  case 4:
632  break;
633  case 5:
635  break;
636  case 6:
638  break;
639  case 7:
641  break;
642  default:
643  UNIMPLEMENTEDPACKETFIELD(result);
644  break;
645  }
646 }
647 
649 {
650  msg.readInt16("users");
651  const std::string name = msg.readString(24, "name");
652  if (localChatTab == nullptr)
653  return;
655 }
656 
658 {
659  const int sz = msg.readInt16("len") - 17;
660  const BeingId ownerId = msg.readBeingId("owner id");
661  const int chatId = msg.readInt32("chat id");
662  const uint16_t limit = msg.readInt16("limit");
663  msg.readInt16("users");
664  const uint8_t type = msg.readUInt8("type");
665  const std::string &title = msg.readString(sz, "title");
666  ChatObject *const chat = localPlayer->getChat();
667  if ((chat != nullptr) && chat->chatId == chatId)
668  {
669  chat->ownerId = ownerId;
670  chat->maxUsers = limit;
671  chat->type = type;
672  if (chat->title != title)
673  {
674  chat->title = title;
675  actorManager->updateRoom(chat);
676  chatWindow->joinRoom(true);
677  }
678  }
679 }
680 
682 {
683  const int role = msg.readInt32("role");
684  const std::string name = msg.readString(24, "name");
685  switch (role)
686  {
687  case 0:
689  break;
690  case 1:
691  // dont show normal role
692  break;
693  default:
695  break;
696  }
697 }
698 
700 {
702  msg.readInt16("item id");
703 }
704 
706 {
708  msg.readInt32("exo");
709 }
710 
712 {
714 }
715 
717 {
718  const int result = msg.readInt32("type");
719  switch (result)
720  {
721  case 0:
723  break;
724  case 5:
725  break;
726  default:
727  UNIMPLEMENTEDPACKETFIELD(result);
728  break;
729  }
730 }
731 
733 {
734  const int result = msg.readUInt8("type");
735  const std::string name = msg.readString(24, "gm name");
736 
737  switch (result)
738  {
739  case 0:
741  break;
742  case 1:
744  break;
745  default:
746  UNIMPLEMENTEDPACKETFIELD(result);
747  break;
748  }
749 }
750 
752 {
753  msg.readBeingId("being id");
754  const std::string message = msg.readString(80, "message");
755  localChatTab->chatLog(message,
759 }
760 
762 {
764  const int sz = msg.readInt16("len") - 24 - 8;
765  msg.readBeingId("account id");
766  msg.readString(24, "nick");
767  msg.readString(sz, "message");
768 }
769 
771 {
772  const int sz = msg.readInt16("len") - 8;
773  msg.readBeingId("being id");
774  const std::string message = msg.readString(sz, "message");
775  localChatTab->chatLog(message,
779 }
780 
781 } // namespace EAthena
void processGmChat(Net::MessageIn &msg)
Definition: chatrecv.cpp:270
ChatWindow * chatWindow
Definition: chatwindow.cpp:88
void processColorChat(Net::MessageIn &msg)
Definition: chatrecv.cpp:186
void processWhisperResponse(Net::MessageIn &msg)
Definition: chatrecv.cpp:330
virtual unsigned char readUInt8(const char *const str)
Definition: messagein.cpp:74
#define _(s)
Definition: gettext.h:34
void processChatRoomRoleChange(Net::MessageIn &msg)
Definition: chatrecv.cpp:681
void processChatContinue(std::string chatMsg, const ChatMsgTypeT own)
Definition: chatrecv.cpp:242
static const unsigned int WHISPER
void processMannerMessage(Net::MessageIn &msg)
Definition: chatrecv.cpp:716
void processGmChat2(Net::MessageIn &msg)
Definition: chatrecv.cpp:290
void processChatSilence(Net::MessageIn &msg)
Definition: chatrecv.cpp:732
ChatTab * localChatTab
Definition: chattab.cpp:61
std::string mChatRoom
Definition: chatrecv.cpp:58
void update()
Definition: chatobject.cpp:48
virtual BeingId readBeingId(const char *const str)=0
std::string getLastWhisperNick()
Definition: chatrecv.cpp:70
void processChatRoomAddMember(Net::MessageIn &msg)
Definition: chatrecv.cpp:648
ChatTab * addChannelTab(const std::string &name, const bool switchTo)
void setSpeech(const std::string &text)
Definition: being.cpp:570
void setTalkTime()
Definition: being.h:705
void processFormatMessage(Net::MessageIn &msg)
Definition: chatrecv.cpp:122
BeingId getId() const
Definition: actorsprite.h:63
void handleMercenaryMessage(const int cmd)
uint16_t maxUsers
Definition: chatobject.h:47
#define BLOCK_START(name)
Definition: perfomance.h:78
void processIgnoreNickAck(Net::MessageIn &msg)
Definition: chatrecv.cpp:61
int BeingId
Definition: beingid.h:29
virtual int16_t readInt16(const char *const str)=0
void processChatRoomJoinFailed(Net::MessageIn &msg)
Definition: chatrecv.cpp:614
#define BLOCK_END(name)
Definition: perfomance.h:79
const bool TryRemoveColors_true
void chatLog(std::string line, ChatMsgTypeT own, const IgnoreRecord ignoreRecord, const TryRemoveColors tryRemoveColors)
Definition: chattab.cpp:110
bool msg(InputEvent &event)
Definition: chat.cpp:38
void processJoinChannel(Net::MessageIn &msg)
Definition: chatrecv.cpp:450
std::string removeColors(std::string msg)
void notify(const unsigned int message)
static const unsigned int SPEECH_FLOAT
void processChatDisplay(Net::MessageIn &msg)
Definition: chatrecv.cpp:366
static ChatObject * findById(const int id)
Definition: chatobject.cpp:63
bool hasPermission(const Being *const being, const unsigned int flags) const
bool findCutLast(std::string &str1, const std::string &str2)
std::string strprintf(const char *const format,...)
Definition: stringutils.cpp:99
WhisperQueue mSentWhispers
Definition: chatrecv.cpp:48
void processChatIgnoreList(Net::MessageIn &msg)
Definition: chatrecv.cpp:357
virtual std::string readRawString(int length, const char *const dstr)
Definition: messagein.cpp:246
LocalPlayer * localPlayer
void processBattleChatMessage(Net::MessageIn &msg)
Definition: chatrecv.cpp:761
uint16_t currentUsers
Definition: chatobject.h:48
void processChatTalkieBox(Net::MessageIn &msg)
Definition: chatrecv.cpp:751
void processMVPNoItem(Net::MessageIn &msg)
Definition: chatrecv.cpp:711
std::string trim(std::string const &str)
const bool IgnoreRecord_false
Definition: ignorerecord.h:29
Being * findBeing(const BeingId id) const
ActorTypeT getType() const
Definition: being.h:115
std::string extractChannelFromMessage(std::string &chatMsg)
Definition: chatrecv.cpp:226
void processMVPExp(Net::MessageIn &msg)
Definition: chatrecv.cpp:705
unsigned int getVersion() const
Definition: messagein.h:127
void processChatRoomCreateAck(Net::MessageIn &msg)
Definition: chatrecv.cpp:575
const std::string & getName() const
Definition: being.h:231
std::string empty
Definition: podict.cpp:25
void processChatRoomSettings(Net::MessageIn &msg)
Definition: chatrecv.cpp:657
void processWhisperResponseContinue(Net::MessageIn &msg, const uint8_t type)
Definition: chatrecv.cpp:80
void processChatRoomLeave(Net::MessageIn &msg)
Definition: chatrecv.cpp:416
const std::string GENERAL_CHANNEL
Definition: chat.h:28
void processChatRoomDestroy(Net::MessageIn &msg)
Definition: chatrecv.cpp:608
void addGlobalMessage(const std::string &line)
std::string title
Definition: chatobject.h:50
void setRoomName(const std::string &name)
Definition: playerinfo.cpp:634
void joinRoom(const bool isJoin)
void updateRoom(const ChatObject *const newChat)
static const unsigned int SPEECH_LOG
unsigned int checkPermissionSilently(const std::string &player_name, const unsigned int flags) const
void processFormatMessageNumber(Net::MessageIn &msg)
Definition: chatrecv.cpp:161
virtual int32_t readInt32(const char *const str)=0
virtual std::string readString(int length, const char *const dstr)
Definition: messagein.cpp:219
bool mShowMotd
Definition: chatrecv.cpp:51
Being * findBeingByName(const std::string &name, const ActorTypeT type) const
#define UNIMPLEMENTEDPACKET
Definition: logger.h:55
int chatId
Definition: chatobject.h:46
const bool TryRemoveColors_false
bool findCutFirst(std::string &str1, const std::string &str2)
void processMVPItem(Net::MessageIn &msg)
Definition: chatrecv.cpp:699
ChatMsgType ::T ChatMsgTypeT
Definition: chatmsgtype.h:40
BeingId ownerId
Definition: chatobject.h:45
void processChat(Net::MessageIn &msg)
Definition: chatrecv.cpp:108
void processScriptMessage(Net::MessageIn &msg)
Definition: chatrecv.cpp:770
void setChat(ChatObject *const obj)
Definition: being.cpp:5293
void processWhisperContinue(const std::string &nick, std::string chatMsg)
Definition: chatrecv.cpp:481
Definition: being.h:93
void processFormatMessageSkill(Net::MessageIn &msg)
Definition: chatrecv.cpp:176
PlayerRelationsManager playerRelations
void processWhisper(Net::MessageIn &msg)
Definition: chatrecv.cpp:310
void processChatRoomJoinAck(Net::MessageIn &msg)
Definition: chatrecv.cpp:383
uint8_t type
Definition: chatobject.h:49
void addWhisper(const std::string &nick, const std::string &mes, const ChatMsgTypeT own)
bool resortChatLog(std::string line, ChatMsgTypeT own, const std::string &channel, const IgnoreRecord ignoreRecord, const TryRemoveColors tryRemoveColors)
ChatObject * getChat() const
Definition: being.h:996
ActorManager * actorManager
void processBeingChat(Net::MessageIn &msg)
Definition: chatrecv.cpp:513
#define UNIMPLEMENTEDPACKETFIELD(field)
Definition: logger.h:58
void channelChatLog(const std::string &channel, const std::string &line, ChatMsgTypeT own, const IgnoreRecord ignoreRecord, const TryRemoveColors tryRemoveColors)
void removeRoom(const int chatId)
bool msg2(InputEvent &event)
Definition: chat.cpp:40