summaryrefslogtreecommitdiff
path: root/src/localplayer.h
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2010-12-28 22:04:41 +0100
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2010-12-28 22:24:44 +0100
commit780bcbc2ea75603f2eef7369a6f7b5ddfc5888b5 (patch)
tree9fe66ca3a9b3c65d3da9490411c4a621dc9046e2 /src/localplayer.h
parent6385f680fd3e42bd9137f9184e702dd36d20322f (diff)
downloadmana-780bcbc2ea75603f2eef7369a6f7b5ddfc5888b5.tar.gz
mana-780bcbc2ea75603f2eef7369a6f7b5ddfc5888b5.tar.bz2
mana-780bcbc2ea75603f2eef7369a6f7b5ddfc5888b5.tar.xz
mana-780bcbc2ea75603f2eef7369a6f7b5ddfc5888b5.zip
Revert "Remove the AFK response system"
This reverts commit 3d6a2d9c80a969c3613f567dd7029e75ef59b5cb. I've by that readded the AFK system on master. Please, remove it when we've got a proper replacement.
Diffstat (limited to 'src/localplayer.h')
-rw-r--r--src/localplayer.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/localplayer.h b/src/localplayer.h
index 334a2598..a5328182 100644
--- a/src/localplayer.h
+++ b/src/localplayer.h
@@ -38,6 +38,12 @@ class Item;
class Map;
class OkDialog;
+class AwayListener : public gcn::ActionListener
+{
+ public:
+ void action(const gcn::ActionEvent &event);
+};
+
/**
* The local player character.
*/
@@ -178,6 +184,15 @@ class LocalPlayer : public Being
bool isPathSetByMouse() const
{ return mPathSetByMouse; }
+ void changeAwayMode();
+
+ bool getAwayMode()
+ { return mAwayMode; }
+
+ void setAway(const std::string &message);
+
+ void afkRespond(ChatTab *tab, const std::string &nick);
+
void addMessageToQueue(const std::string &message,
int color = UserPalette::EXP_INFO);
@@ -227,6 +242,11 @@ class LocalPlayer : public Being
int mMessageTime;
bool mShowIp;
+
+ AwayListener *mAwayListener;
+ OkDialog *mAwayDialog;
+ int mAfkTime;
+ bool mAwayMode;
};
extern LocalPlayer *player_node;