From 617fb41e21710856c1451058481e5df3756fb355 Mon Sep 17 00:00:00 2001 From: Fate Date: Sat, 6 Dec 2008 19:50:49 -0700 Subject: Fixes to the /w command --- src/gui/chat.cpp | 6 ++++-- 1 file 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 : Sends a private " " to ", BY_SERVER); + chatLog("/w : Short form for /whisper", BY_SERVER); chatLog("/who: Display number of online users", BY_SERVER); chatLog("For more information, type /help ", 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 ", BY_SERVER); + chatLog("Command: /w ", BY_SERVER); chatLog("This command sends the message to has spaces in it, enclose it in " "double quotes (\").", BY_SERVER); -- cgit v1.2.3-70-g09d2