summaryrefslogtreecommitdiff
path: root/src/actions/chat.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-12 18:40:43 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-12 18:40:43 +0300
commitcc06df44833d5e39b32065bb7892e787f6a1f54c (patch)
tree51073ec246786f4bab68113f83c63f2d6def581d /src/actions/chat.cpp
parentabce183c65e7f6966d3778f4da6d627ea9cdf619 (diff)
downloadmanaverse-cc06df44833d5e39b32065bb7892e787f6a1f54c.tar.gz
manaverse-cc06df44833d5e39b32065bb7892e787f6a1f54c.tar.bz2
manaverse-cc06df44833d5e39b32065bb7892e787f6a1f54c.tar.xz
manaverse-cc06df44833d5e39b32065bb7892e787f6a1f54c.zip
Add chat command to show "/w NICK" message or open whisper tab (depend on settings)
New chat command: /whispertext NICK Aliases: /wt NICK /msgtext NICK
Diffstat (limited to 'src/actions/chat.cpp')
-rw-r--r--src/actions/chat.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/actions/chat.cpp b/src/actions/chat.cpp
index 2c7d84f91..59b69b911 100644
--- a/src/actions/chat.cpp
+++ b/src/actions/chat.cpp
@@ -20,6 +20,7 @@
#include "actions/chat.h"
+#include "configuration.h"
#include "guildmanager.h"
#include "actions/actiondef.h"
@@ -244,6 +245,22 @@ impHandler(msg)
return true;
}
+impHandler(msgText)
+{
+ if (!chatWindow)
+ return false;
+
+ if (config.getBoolValue("whispertab"))
+ {
+ chatWindow->localChatInput("/q " + event.args);
+ }
+ else
+ {
+ chatWindow->addInputText(std::string("/w \"").append(
+ event.args).append("\" "));
+ }
+}
+
impHandler(msg2)
{
std::string recvnick;