#include <chathandler.h>
Definition at line 33 of file chathandler.h.
◆ ChatHandler()
TmwAthena::ChatHandler::ChatHandler |
( |
| ) |
|
◆ ~ChatHandler()
TmwAthena::ChatHandler::~ChatHandler |
( |
| ) |
|
|
virtual |
◆ battleTalk()
void TmwAthena::ChatHandler::battleTalk |
( |
const std::string & |
text | ) |
const |
|
virtual |
◆ channelMessage()
void TmwAthena::ChatHandler::channelMessage |
( |
const std::string & |
channel, |
|
|
const std::string & |
text |
|
) |
| const |
|
virtual |
◆ createChatRoom()
void TmwAthena::ChatHandler::createChatRoom |
( |
const std::string & |
title, |
|
|
const std::string & |
password, |
|
|
const int |
limit, |
|
|
const bool |
isPublic |
|
) |
| const |
|
virtual |
◆ ignore()
void TmwAthena::ChatHandler::ignore |
( |
const std::string & |
nick | ) |
const |
|
virtual |
◆ ignoreAll()
void TmwAthena::ChatHandler::ignoreAll |
( |
| ) |
const |
|
virtual |
◆ joinChannel()
void TmwAthena::ChatHandler::joinChannel |
( |
const std::string & |
channel | ) |
const |
|
virtual |
◆ joinChat()
void TmwAthena::ChatHandler::joinChat |
( |
const ChatObject *const |
chat, |
|
|
const std::string & |
password |
|
) |
| const |
|
virtual |
◆ kickFromChatRoom()
void TmwAthena::ChatHandler::kickFromChatRoom |
( |
const std::string & |
nick | ) |
const |
|
virtual |
◆ leaveChatRoom()
void TmwAthena::ChatHandler::leaveChatRoom |
( |
| ) |
const |
|
virtual |
◆ partChannel()
void TmwAthena::ChatHandler::partChannel |
( |
const std::string & |
channel | ) |
const |
|
virtual |
◆ privateMessage()
void TmwAthena::ChatHandler::privateMessage |
( |
const std::string & |
recipient, |
|
|
const std::string & |
text |
|
) |
| const |
|
virtual |
◆ processRaw()
void TmwAthena::ChatHandler::processRaw |
( |
MessageOut & |
outMsg, |
|
|
const std::string & |
line |
|
) |
| |
|
staticprotected |
◆ requestIgnoreList()
void TmwAthena::ChatHandler::requestIgnoreList |
( |
| ) |
const |
|
virtual |
◆ sendRaw()
void TmwAthena::ChatHandler::sendRaw |
( |
const std::string & |
args | ) |
const |
|
virtual |
Implements Net::ChatHandler.
Definition at line 114 of file chathandler.cpp.
116 std::string line = args;
118 MessageOut *outMsg =
nullptr;
123 size_t pos = line.find(
' ');
124 if (pos != std::string::npos)
126 str = line.substr(0, pos);
128 outMsg =
new MessageOut(
id);
129 outMsg->writeInt16(
id,
"packet id");
130 line = line.substr(pos + 1);
131 pos = line.find(
' ');
136 outMsg =
new MessageOut(
id);
137 outMsg->writeInt16(
id,
"packet id");
142 while (pos != std::string::npos)
144 str = line.substr(0, pos);
146 line = line.substr(pos + 1);
147 pos = line.find(
' ');
static void processRaw(MessageOut &outMsg, const std::string &line)
References CAST_S16, parseNumber(), processRaw(), and Net::MessageOut::writeInt16().
◆ setChatRoomOptions()
void TmwAthena::ChatHandler::setChatRoomOptions |
( |
const int |
limit, |
|
|
const bool |
isPublic, |
|
|
const std::string & |
password, |
|
|
const std::string & |
title |
|
) |
| const |
|
virtual |
◆ setChatRoomOwner()
void TmwAthena::ChatHandler::setChatRoomOwner |
( |
const std::string & |
nick | ) |
const |
|
virtual |
◆ talk()
void TmwAthena::ChatHandler::talk |
( |
const std::string & |
text | ) |
const |
|
virtual |
Implements Net::ChatHandler.
Definition at line 56 of file chathandler.cpp.
65 outMsg.writeInt16(
CAST_S16(text.length() + 4 + 1),
"len");
66 outMsg.writeString(text,
CAST_S32(text.length() + 1),
"message");
75 outMsg.writeInt16(
CAST_S16(mes.length() + 4 + 1),
"len");
76 outMsg.writeString(mes,
CAST_S32(mes.length() + 1),
"message");
const std::string & getName() const
LocalPlayer * localPlayer
unsigned int tmwServerVersion
References CAST_S16, CAST_S32, createOutPacket, Being::getName(), localPlayer, and tmwServerVersion.
Referenced by channelMessage(), and talkPet().
◆ talkPet()
void TmwAthena::ChatHandler::talkPet |
( |
const std::string & |
text | ) |
const |
|
virtual |
◆ talkRaw()
void TmwAthena::ChatHandler::talkRaw |
( |
const std::string & |
text | ) |
const |
|
virtual |
◆ unIgnore()
void TmwAthena::ChatHandler::unIgnore |
( |
const std::string & |
nick | ) |
const |
|
virtual |
◆ unIgnoreAll()
void TmwAthena::ChatHandler::unIgnoreAll |
( |
| ) |
const |
|
virtual |
◆ who()
void TmwAthena::ChatHandler::who |
( |
| ) |
const |
|
virtual |
The documentation for this class was generated from the following files: