65 const std::string &str,
66 const std::string &def)
97 if (
guild->getServerGuild())
109 if (
guild->getServerGuild())
211 std::string &recvnick,
212 std::string &message)
214 if (args.substr(0, 1) ==
"\"")
216 const size_t pos = args.find(
'"', 1);
217 if (pos != std::string::npos)
219 recvnick = args.substr(1, pos - 1);
220 if (pos + 2 < args.length())
221 message = args.substr(pos + 2, args.length());
226 const size_t pos = args.find(
' ');
227 if (pos != std::string::npos)
229 recvnick = args.substr(0, pos);
230 if (pos + 1 < args.length())
231 message = args.substr(pos + 1, args.length());
235 recvnick = std::string(args);
242 if (message.length() > 0)
245 std::string tempNick = recvnick;
250 if (tempNick == playerName || args.empty())
260 std::string recvnick;
276 if (event.tab !=
nullptr)
280 _(
"Cannot send empty whisper or channel message!"),
301 std::string(
"/w \"").append(event.args).append(
"\" "),
309 std::string recvnick;
322 const std::string &args =
event.args;
332 if (event.tab !=
nullptr)
335 event.tab->chatLog(
strprintf(
_(
"Cannot create a whisper tab "
336 "\"%s\"! It probably already exists."),
360 if (event.args.empty())
382 if (event.args.empty())
398 if (!event.args.empty())
405 if (event.tab !=
nullptr)
408 event.tab->chatLog(
_(
"Please specify a name."),
422 const std::string args =
event.args;
426 if (
guild !=
nullptr)
429 if (
guild->getServerGuild())
441 if (event.tab !=
nullptr)
444 event.tab->chatLog(
_(
"Please specify a name."),
469 if (event.args.empty())
471 if ((
chatWindow !=
nullptr) && (event.tab !=
nullptr))
475 _(
"Return toggles chat.") :
_(
"Message closes chat."),
486 if (event.tab !=
nullptr)
489 event.tab->chatLog(
_(
"Return now toggles chat."),
498 if (event.tab !=
nullptr)
501 event.tab->chatLog(
_(
"Message now closes chat."),
510 if (event.tab !=
nullptr)
525 if (!event.args.empty())
532 if (event.tab !=
nullptr)
535 event.tab->chatLog(
_(
"Please specify a name."),
546 if (!event.args.empty())
551 if (
guild !=
nullptr)
553 if (
guild->getServerGuild())
569 if (event.tab !=
nullptr)
572 event.tab->chatLog(
_(
"Please specify a name."),
662 str =
_(
"no hat equipped.");
669 info.getName().c_str());
692 const std::string args =
event.args;
703 if (args.size() > 60)
704 str2 = args.substr(60);
706 if (
guild !=
nullptr)
724 ChatTab *
const tab =
event.tab;
728 std::string srcStr =
event.args;
748 strprintf(
_(
"No translation found for string: %s"),
765 const std::string args =
event.args;
771 const int sz =
CAST_S32(pars.size());
775 int keyValue = atoi(pars[0].c_str());
798 const std::string args =
event.args;
804 const int sz =
CAST_S32(pars.size());
808 const int x = atoi(pars[0].c_str());
809 const int y = atoi(pars[1].c_str());
812 const int key = atoi(pars[2].c_str());
813 if (key < key1 || key > key2)
826 const std::string args =
event.args;
830 const size_t sz = args.size();
831 for (
size_t f = 0; f < sz; f ++)
#define impHandler0(name)
Net::CharServerHandler * charServerHandler
Net::ChatHandler * chatHandler
std::string textToMe(const std::string &str)
Net::ClanHandler * clanHandler
const Guild * getGuild(const std::string &guildName) const
int getSpriteID(const int slot) const
const std::string & getName() const
ChatTabTypeT getType() const
void chatLog(std::string line, ChatMsgTypeT own, const IgnoreRecord ignoreRecord, const TryRemoveColors tryRemoveColors)
void chatInput(const std::string &msg)
void scroll(const int amount) const
bool getReturnTogglesChat() const
void localChatInput(const std::string &msg) const
void copyToClipboard(const int x, const int y) const
static void clearTab(ChatTab *const tab)
void setReturnTogglesChat(const bool toggles)
void addInputText(const std::string &text, const bool space)
ChatTab * addChatTab(const std::string &name, const bool switchTo, const bool join)
void selectTabByType(const ChatTabTypeT &type)
bool getBoolValue(const std::string &key) const
void chat(const std::string &msg)
static void kick(const std::string &msg)
static void invite(const std::string &msg)
virtual unsigned int hatSprite() const =0
virtual void talk(const std::string &text) const =0
virtual void privateMessage(const std::string &recipient, const std::string &text) const =0
virtual void chat(const std::string &text) const =0
virtual void create(const std::string &name) const =0
virtual void chat(const std::string &text) const =0
virtual void invite(const std::string &name) const =0
virtual void changeNotice(const int guildId, const std::string &msg1, const std::string &msg2) const =0
virtual void kick(const GuildMember *const member, const std::string &reason) const =0
virtual void invite(const std::string &name) const =0
virtual void create(const std::string &name) const =0
virtual void chat(const std::string &text) const =0
virtual void kick(const Being *const player) const =0
bool haveStr(const std::string &str) const
const std::string getStr(const std::string &str)
bool isWindowVisible() const
Net::GuildHandler * guildHandler
GuildManager * guildManager
const bool IgnoreRecord_false
LocalPlayer * localPlayer
bool closeAllChatTabs(InputEvent &event)
bool me(InputEvent &event)
bool clearChat(InputEvent &event)
bool chatLangTab(InputEvent &event)
bool sendMouseKey(InputEvent &event)
bool sendChars(InputEvent &event)
bool chatGuildTab(InputEvent &event)
bool query(InputEvent &event)
bool closeChatTab(InputEvent &event)
static void outString(ChatTab *const tab, const std::string &str, const std::string &def)
bool guild(InputEvent &event)
bool scrollChatDown(InputEvent &event)
bool guildNotice(InputEvent &event)
bool chatTradeTab(InputEvent &event)
bool msg(InputEvent &event)
bool kickGuild(InputEvent &event)
bool ignoreAllWhispers(InputEvent &event)
bool sendGuiKey(InputEvent &event)
bool createGuild(InputEvent &event)
bool scrollChatUp(InputEvent &event)
bool chatGmTab(InputEvent &event)
bool chatClipboard(InputEvent &event)
bool translate(InputEvent &event)
bool chatDebugTab(InputEvent &event)
bool party(InputEvent &event)
bool msg2(InputEvent &event)
bool kickParty(InputEvent &event)
bool chatPartyTab(InputEvent &event)
bool prevChatTab(InputEvent &event)
bool createParty(InputEvent &event)
bool toggleChat(InputEvent &event)
bool nextChatTab(InputEvent &event)
bool msgText(InputEvent &event)
bool chatBattleTab(InputEvent &event)
bool hat(InputEvent &event)
bool chatGeneralTab(InputEvent &event)
bool toggle(InputEvent &event)
static bool splitWhisper(const std::string &args, std::string &recvnick, std::string &message)
bool clearChatTab(InputEvent &event)
bool addText(InputEvent &event)
bool info(InputEvent &event)
std::string trim(std::string const &str)
std::string toLower(std::string const &s)
const ItemInfo & get(const int id)
ServerTypeT getNetworkType()
Net::PartyHandler * partyHandler
bool splitParameters(StringVect &tokens, std::string text, const std::string &separator, const char quote)
PoDict * reverseDictionary
const int DEFAULT_CHAT_WINDOW_SCROLL
bool parse2Int(const std::string &args, int &x, int &y)
std::string strprintf(const char *const format,...)
signed char parseBoolean(const std::string &value)
std::vector< std::string > StringVect
const bool TryRemoveColors_true