diff options
author | Philipp Sehmisch <mana@crushnet.org> | 2010-08-29 14:54:14 +0200 |
---|---|---|
committer | Freeyorp <Freeyorp101@hotmail.com> | 2010-08-30 02:12:54 +1200 |
commit | 64432a11e3135d82c37c65b6c8560312091453cd (patch) | |
tree | 41dee6e861ab321357e8e36ae32cae7e03ad1dfc /src/game-server/character.hpp | |
parent | 7fc50c2d31e1d289e9d2a950271c6d399fe0896a (diff) | |
download | manaserv-64432a11e3135d82c37c65b6c8560312091453cd.tar.gz manaserv-64432a11e3135d82c37c65b6c8560312091453cd.tar.bz2 manaserv-64432a11e3135d82c37c65b6c8560312091453cd.tar.xz manaserv-64432a11e3135d82c37c65b6c8560312091453cd.zip |
Added @mute chat command.
The @mute command stops another character from talking in the
public chat for a specified amount of seconds. It doesn't survive
a reconnect of the client, but I don't think that this is necessary
because a mute by a GM is usually intended as a slap on the wrist
with more severe consequences to follow (like @ban).
Diffstat (limited to 'src/game-server/character.hpp')
-rw-r--r-- | src/game-server/character.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/game-server/character.hpp b/src/game-server/character.hpp index 5581fc7a..45612567 100644 --- a/src/game-server/character.hpp +++ b/src/game-server/character.hpp @@ -393,6 +393,13 @@ class Character : public Being virtual unsigned char getWalkMask() const { return 0x82; } // blocked by walls and monsters ( bin 1000 0010) + /** Makes it impossible to chat for a while */ + void mute(int seconds) + { setTimerHard(T_C_MUTE, seconds * 10); } + + bool isMuted() const + { return isTimerRunning(T_C_MUTE); } + protected: /** * Gets the way the actor blocks pathfinding for other objects |