diff options
author | Fate <fate-tmw@googlemail.com> | 2008-12-06 19:50:49 -0700 |
---|---|---|
committer | Fate <fate-tmw@googlemail.com> | 2008-12-06 19:50:49 -0700 |
commit | 617fb41e21710856c1451058481e5df3756fb355 (patch) | |
tree | 3fe4e342fb4a6d335b03661a4aafd510c62a1dc7 /src/gui/chat.cpp | |
parent | 369e540d6cb78874c4951b66b1668468168f496b (diff) | |
download | mana-617fb41e21710856c1451058481e5df3756fb355.tar.gz mana-617fb41e21710856c1451058481e5df3756fb355.tar.bz2 mana-617fb41e21710856c1451058481e5df3756fb355.tar.xz mana-617fb41e21710856c1451058481e5df3756fb355.zip |
Fixes to the /w command
Diffstat (limited to 'src/gui/chat.cpp')
-rw-r--r-- | src/gui/chat.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp index 5817adbd..a96c2eda 100644 --- a/src/gui/chat.cpp +++ b/src/gui/chat.cpp @@ -250,7 +250,7 @@ void ChatWindow::whisper(const std::string &nick, std::string msg, int prefixlen) { std::string recvnick = ""; - msg.erase(0, prefixlen + 1); + msg.erase(0, prefixlen); if (msg.substr(0,1) == "\"") { @@ -496,6 +496,7 @@ void ChatWindow::help(const std::string &msg1, const std::string &msg2) chatLog("/where: Display map name", BY_SERVER); chatLog("/whisper <nick> <message>: Sends a private <message>" " to <nick>", BY_SERVER); + chatLog("/w <nick> <message>: Short form for /whisper", BY_SERVER); chatLog("/who: Display number of online users", BY_SERVER); chatLog("For more information, type /help <command>", BY_SERVER); return; @@ -531,9 +532,10 @@ void ChatWindow::help(const std::string &msg1, const std::string &msg2) BY_SERVER); return; } - if (msg1 == "whisper") + if (msg1 == "whisper" || msg1 == "w") { chatLog("Command: /whisper <nick> <msg>", BY_SERVER); + chatLog("Command: /w <nick> <msg>", BY_SERVER); chatLog("This command sends the message <msg> to <nick.", BY_SERVER); chatLog("If the <nick> has spaces in it, enclose it in " "double quotes (\").", BY_SERVER); |