diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-10-30 21:32:28 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-10-30 21:32:28 +0300 |
commit | cefd145c44d73dd7c1d8739cba404418ccb74602 (patch) | |
tree | d54c9be187be569cb499771071188e710a6c9fef /src/localplayer.cpp | |
parent | b2a0d0719989384171061edff8d720a9ab33467f (diff) | |
download | manaverse-cefd145c44d73dd7c1d8739cba404418ccb74602.tar.gz manaverse-cefd145c44d73dd7c1d8739cba404418ccb74602.tar.bz2 manaverse-cefd145c44d73dd7c1d8739cba404418ccb74602.tar.xz manaverse-cefd145c44d73dd7c1d8739cba404418ccb74602.zip |
Add pseudo away chat command.
Command: /pseudoaway [test]
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r-- | src/localplayer.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 7fc1d8c7d..16409d16c 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -113,6 +113,7 @@ LocalPlayer::LocalPlayer(int id, int subtype): mAwayDialog(0), mAfkTime(0), mAwayMode(false), + mPseudoAwayMode(false), mShowNavigePath(false), mDrawPath(false), mActivityTime(0), @@ -357,7 +358,7 @@ void LocalPlayer::logic() if (mTradebot && shopWindow && !shopWindow->isShopEmpty()) smile += FLAG_SHOP; - if (mAwayMode) + if (mAwayMode || mPseudoAwayMode) smile += FLAG_AWAY; if (mInactive) @@ -3202,6 +3203,13 @@ void LocalPlayer::setAway(const std::string &message) changeAwayMode(); } +void LocalPlayer::setPseudoAway(const std::string &message) +{ + if (!message.empty()) + config.setValue("afkMessage", message); + mPseudoAwayMode = !mPseudoAwayMode; +} + void LocalPlayer::afkRespond(ChatTab *tab, const std::string &nick) { if (mAwayMode) |