From: Markus Armbruster Date: Sun, 8 Feb 2009 12:20:57 +0000 (+0100) Subject: Inline gamedown() into only user may_play_now() and simplify X-Git-Tag: v4.3.20~33 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=b404216dbe0d740f95b8ed685dc3d68871f869a1 Inline gamedown() into only user may_play_now() and simplify --- diff --git a/src/lib/player/empdis.c b/src/lib/player/empdis.c index 685fc7a5a..eabb5be68 100644 --- a/src/lib/player/empdis.c +++ b/src/lib/player/empdis.c @@ -177,24 +177,6 @@ disable_coms(void) free(tmp); } -/* - * returns true if down - */ -static int -gamedown(int suppress_deity_message) -{ - if (!game_play_disabled()) - return 0; - if (player->god) { - if (!suppress_deity_message) - pr("The game is down\n"); - return 0; - } - show_first_tel(downfil); - pr("\nThe game is down\n"); - return 1; -} - static int seconds_since_midnight(time_t time) { @@ -262,8 +244,15 @@ may_play_now(struct natstr *natp, time_t now, return 0; } - if (gamedown(suppress_deity_message)) - return 0; + if (game_play_disabled()) { + if (natp->nat_stat != STAT_GOD) { + show_first_tel(downfil); + pr("\nThe game is down\n"); + return 0; + } + if (!suppress_deity_message) + pr("The game is down\n"); + } if ((natp->nat_stat != STAT_GOD && natp->nat_stat != STAT_VIS) && natp->nat_timeused > m_m_p_d * 60) {