69 outMsg.writeInt16(
CAST_S16(mes.length() + 4),
"len");
70 outMsg.writeString(mes,
CAST_S32(mes.length()),
"message");
75 outMsg.writeInt16(
CAST_S16(mes.length() + 4 + 1),
"len");
76 outMsg.writeString(mes,
CAST_S32(mes.length() + 1),
"message");
83 outMsg.writeInt16(
CAST_S16(mes.length() + 4),
"len");
84 outMsg.writeString(mes,
CAST_S32(mes.length()),
"message");
88 const std::string &
restrict text)
const
93 outMsg.writeInt16(
CAST_S16(text.length() + 28),
"len");
94 outMsg.writeString(recipient, 24,
"recipient nick");
95 outMsg.writeString(text,
CAST_S32(text.length()),
"message");
99 outMsg.writeInt16(
CAST_S16(text.length() + 28 + 1),
"len");
100 outMsg.writeString(recipient, 24,
"recipient nick");
101 outMsg.writeString(text,
CAST_S32(text.length()),
"message");
102 outMsg.writeInt8(0,
"null char");
108 const std::string &
restrict text)
const
120 std::string line = args;
127 size_t pos = line.find(
' ');
128 if (pos != std::string::npos)
130 str = line.substr(0, pos);
135 line = line.substr(pos + 1);
136 pos = line.find(
' ');
147 while (pos != std::string::npos)
149 str = line.substr(0, pos);
151 line = line.substr(pos + 1);
152 pos = line.find(
' ');
166 switch (tolower(line[0]))
170 outMsg.writeInt8(
CAST_U8(i),
"raw");
175 outMsg.writeInt16(
CAST_S16(i),
"raw");
180 outMsg.writeInt32(
CAST_S32(i),
"raw");
191 outMsg.writeInt8(0,
"flag");
197 outMsg.writeInt8(1,
"flag");
204 outMsg.writeString(nick, 24,
"nick");
205 outMsg.writeInt8(0,
"flag");
211 outMsg.writeString(nick, 24,
"nick");
212 outMsg.writeInt8(1,
"flag");
221 const std::string &password,
223 const bool isPublic)
const
228 outMsg.writeInt16(
CAST_S16(limit),
"limit");
229 outMsg.writeInt8(
CAST_S8(isPublic ? 1 : 0),
"public");
230 outMsg.writeString(password, 8,
"password");
231 outMsg.writeString(title, 36,
"title");
246 outMsg.writeInt16(
CAST_S16(mes.length() + 4),
"len");
247 outMsg.writeString(mes,
CAST_S32(mes.length()),
"message");
252 outMsg.writeInt16(
CAST_S16(mes.length() + 4 + 1),
"len");
253 outMsg.writeString(mes,
CAST_S32(mes.length() + 1),
"message");
258 const std::string &password)
const
264 outMsg.writeInt32(chat->
chatId,
"chat id");
265 outMsg.writeString(password, 8,
"password");
273 outMsg.writeString(channel, 24,
"channel name");
286 outMsg.writeString(channel, 24,
"channel name");
294 std::string
msg = text;
295 if (
msg.size() > 500)
297 const size_t sz =
msg.size();
300 outMsg.writeInt16(
CAST_S16(sz + 4 + 1),
"len");
302 outMsg.writeInt8(0,
"zero byte");
312 const std::string &password,
313 const std::string &title)
const
316 const int sz =
CAST_S32(title.size());
317 outMsg.writeInt16(
CAST_S16(15 + sz),
"len");
318 outMsg.writeInt16(
CAST_S16(limit),
"limit");
319 outMsg.writeInt8(
CAST_S8(isPublic ? 1 : 0),
"type");
320 outMsg.writeString(password, 8,
"password");
321 outMsg.writeString(title, sz,
"title");
327 outMsg.writeInt32(0,
"role (unused)");
328 outMsg.writeString(nick, 24,
"nick");
334 outMsg.writeString(nick, 24,
"nick");
Net::ChatHandler * chatHandler
const std::string & getName() const
void sendRaw(const std::string &args) const
void privateMessage(const std::string &recipient, const std::string &text) const
void setChatRoomOwner(const std::string &nick) const
void unIgnore(const std::string &nick) const
void requestIgnoreList() const
void ignore(const std::string &nick) const
void talk(const std::string &text) const
void setChatRoomOptions(const int limit, const bool isPublic, const std::string &password, const std::string &title) const
void leaveChatRoom() const
void battleTalk(const std::string &text) const
void talkPet(const std::string &text) const
void joinChannel(const std::string &channel) const
static void processRaw(MessageOut &outMsg, const std::string &line)
void partChannel(const std::string &channel) const
void talkRaw(const std::string &text) const
void kickFromChatRoom(const std::string &nick) const
void channelMessage(const std::string &channel, const std::string &text) const
void joinChat(const ChatObject *const chat, const std::string &password) const
void createChatRoom(const std::string &title, const std::string &password, const int limit, const bool isPublic) const
void writeInt16(const int16_t value, const char *const str)
virtual bool haveJoinChannel() const =0
LocalPlayer * localPlayer
#define createOutPacket(name)
bool msg(InputEvent &event)
WhisperQueue mSentWhispers
Net::ServerFeatures * serverFeatures
uint32_t parseNumber(const std::string &str)