summaryrefslogtreecommitdiff
path: root/src/gui/chat.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-01-24 19:37:31 -0700
committerIra Rice <irarice@gmail.com>2009-01-24 19:37:31 -0700
commit2a8a230c7768b945f8c53fda15f3e8b184e7da80 (patch)
tree26746c579ea7b622f009cc487e119879b4853e51 /src/gui/chat.cpp
parent5c79b920eefb219f0dd4491b709af4f116d3a988 (diff)
downloadmana-client-2a8a230c7768b945f8c53fda15f3e8b184e7da80.tar.gz
mana-client-2a8a230c7768b945f8c53fda15f3e8b184e7da80.tar.bz2
mana-client-2a8a230c7768b945f8c53fda15f3e8b184e7da80.tar.xz
mana-client-2a8a230c7768b945f8c53fda15f3e8b184e7da80.zip
Changed GM status updating to check whether asserting is allowed or not,
as well as adding in a missing delete. Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/chat.cpp')
-rw-r--r--src/gui/chat.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp
index 031b6811..d1069d13 100644
--- a/src/gui/chat.cpp
+++ b/src/gui/chat.cpp
@@ -137,7 +137,7 @@ void ChatWindow::chatLog(std::string line, int own, bool ignoreRecord)
else
{
// Fix the owner of welcome message.
- if (line.substr(0, 7) == _("Welcome"))
+ if (line.substr(0, 7) == "Welcome")
{
own = BY_SERVER;
}
@@ -192,6 +192,11 @@ void ChatWindow::chatLog(std::string line, int own, bool ignoreRecord)
break;
}
+ if (tmp.nick == ": " && tmp.text.substr(0, 17) == "Visible GM status")
+ {
+ player_node->setGM();
+ }
+
// Get the current system time
time_t t;
time(&t);
@@ -391,15 +396,6 @@ void ChatWindow::chatSend(const std::string &nick, std::string msg)
// Prepare ordinary message
if (msg.substr(0, 1) != "/")
{
- // The server never tells you about your own GM status, so work around
- // this for now by intercepting it here. NOTE: This assumes that the
- // assert works, when it's not guaranteed to.
-
- std::size_t space = msg.find(" ");
- const std::string command = msg.substr(1, space);
- if (msg.at(0) == '@' && command == "assert")
- player_node->setGM();
-
msg = nick + " : " + msg;
MessageOut outMsg(mNetwork);