summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gui/chat.cpp5
-rw-r--r--src/localplayer.cpp3
2 files changed, 7 insertions, 1 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp
index d4818504..3c569ded 100644
--- a/src/gui/chat.cpp
+++ b/src/gui/chat.cpp
@@ -84,6 +84,11 @@ Window(""), mNetwork(network), mTmpVisible(false)
mReturnToggles = config.getValue("ReturnToggles", "0") == "1";
mRecorder = new Recorder(this);
mParty = new Party(this, mNetwork);
+
+ // If the player had @assert on in the last session, ask the server to
+ // run the @assert command for the player again. Convenience for GMs.
+ if (config.getValue(player_node->getName() + "GMassert", 0))
+ chatSend(player_node->getName(), "@assert");
}
ChatWindow::~ChatWindow()
diff --git a/src/localplayer.cpp b/src/localplayer.cpp
index fb568d20..c6ce6fc5 100644
--- a/src/localplayer.cpp
+++ b/src/localplayer.cpp
@@ -173,7 +173,8 @@ void LocalPlayer::logic()
void LocalPlayer::setGM()
{
mIsGM = !mIsGM;
- setName(getName());
+ setName(getName());
+ config.setValue(getName() + "GMassert", mIsGM);
}
void LocalPlayer::setName(const std::string &name)