diff options
Diffstat (limited to 'src/game/client/components/motd.cpp')
| -rw-r--r-- | src/game/client/components/motd.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/game/client/components/motd.cpp b/src/game/client/components/motd.cpp index 3b8f2243..0d1eacba 100644 --- a/src/game/client/components/motd.cpp +++ b/src/game/client/components/motd.cpp @@ -6,11 +6,6 @@ #include <game/client/gameclient.hpp> #include "motd.hpp" - -void MOTD::on_reset() -{ - clear(); -} void MOTD::clear() { @@ -22,6 +17,12 @@ bool MOTD::is_active() return time_get() < server_motd_time; } +void MOTD::on_statechange(int new_state, int old_state) +{ + if(old_state == CLIENTSTATE_ONLINE || old_state == CLIENTSTATE_OFFLINE) + clear(); +} + void MOTD::on_render() { if(!is_active()) |