summaryrefslogtreecommitdiff
path: root/src/commands.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-23 21:48:59 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-23 21:48:59 +0300
commit475aa157df7400ce40ef9a5cc4cb441291d45df9 (patch)
tree6990e349c853115820caaf1f34e96c35a5186c8d /src/commands.cpp
parent2efe6bad2044f12d842466e149f512aba9b7fc86 (diff)
downloadplus-475aa157df7400ce40ef9a5cc4cb441291d45df9.tar.gz
plus-475aa157df7400ce40ef9a5cc4cb441291d45df9.tar.bz2
plus-475aa157df7400ce40ef9a5cc4cb441291d45df9.tar.xz
plus-475aa157df7400ce40ef9a5cc4cb441291d45df9.zip
Move chat command /whisper into actions.
Diffstat (limited to 'src/commands.cpp')
-rw-r--r--src/commands.cpp54
1 files changed, 0 insertions, 54 deletions
diff --git a/src/commands.cpp b/src/commands.cpp
index 270a781ab..c80c2cf3f 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -251,60 +251,6 @@ static void outStringNormal(ChatTab *const tab,
}
}
-impHandler(msg)
-{
- std::string recvnick;
- std::string msg;
-
- if (event.args.substr(0, 1) == "\"")
- {
- const size_t pos = event.args.find('"', 1);
- if (pos != std::string::npos)
- {
- recvnick = event.args.substr(1, pos - 1);
- if (pos + 2 < event.args.length())
- msg = event.args.substr(pos + 2, event.args.length());
- }
- }
- else
- {
- const size_t pos = event.args.find(" ");
- if (pos != std::string::npos)
- {
- recvnick = event.args.substr(0, pos);
- if (pos + 1 < event.args.length())
- msg = event.args.substr(pos + 1, event.args.length());
- }
- else
- {
- recvnick = std::string(event.args);
- msg.clear();
- }
- }
-
- trim(msg);
-
- if (msg.length() > 0)
- {
- std::string playerName = localPlayer->getName();
- std::string tempNick = recvnick;
-
- toLower(playerName);
- toLower(tempNick);
-
- if (tempNick.compare(playerName) == 0 || event.args.empty())
- return true;
-
- chatWindow->addWhisper(recvnick, msg, ChatMsgType::BY_PLAYER);
- }
- else
- {
- // TRANSLATORS: whisper send
- event.tab->chatLog(_("Cannot send empty whispers!"), ChatMsgType::BY_SERVER);
- }
- return true;
-}
-
impHandler(query)
{
if (chatWindow)