summaryrefslogtreecommitdiff
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
parent5c79b920eefb219f0dd4491b709af4f116d3a988 (diff)
downloadmana-2a8a230c7768b945f8c53fda15f3e8b184e7da80.tar.gz
mana-2a8a230c7768b945f8c53fda15f3e8b184e7da80.tar.bz2
mana-2a8a230c7768b945f8c53fda15f3e8b184e7da80.tar.xz
mana-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>
-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();