summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/chat.cpp16
-rw-r--r--src/gui/gui.cpp1
2 files changed, 7 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);
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index fe8cae78..dda171e0 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -170,6 +170,7 @@ Gui::~Gui()
mMouseCursors->decRef();
delete mGuiFont;
+ delete boldFont;
delete viewport;
delete getTop();