summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-12-08 21:50:36 +0300
committerAndrei Karas <akaras@inbox.ru>2011-12-08 21:50:36 +0300
commit4a4d6bd39b88933f5db4b632b28e1444062ad25a (patch)
tree1035ec196f0c1c09c4db8ac519357148c747fa09 /src/gui/widgets
parent3e7208efe20dfdb5578718c2762ee196f73f8168 (diff)
downloadmv-4a4d6bd39b88933f5db4b632b28e1444062ad25a.tar.gz
mv-4a4d6bd39b88933f5db4b632b28e1444062ad25a.tar.bz2
mv-4a4d6bd39b88933f5db4b632b28e1444062ad25a.tar.xz
mv-4a4d6bd39b88933f5db4b632b28e1444062ad25a.zip
Add variables for any chat text/commands.
<PLAYER> - target or nearest player nick. <MONSTER> - target or nearest monster name. <PEOPLE> - comma separated list of visible players (except self). <PARTY> - all party members (except self). Example usage: type in chat: hello <PEOPLE>.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/chattab.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/widgets/chattab.cpp b/src/gui/widgets/chattab.cpp
index 72af1b0b8..c2db20574 100644
--- a/src/gui/widgets/chattab.cpp
+++ b/src/gui/widgets/chattab.cpp
@@ -349,6 +349,9 @@ void ChatTab::chatInput(const std::string &message)
start = msg.find('[', start + 1);
}
+ if (commandHandler)
+ commandHandler->replaceVars(msg);
+
// Prepare ordinary message
if (msg[0] != '/')
handleInput(msg);