diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-06-14 03:18:03 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-06-14 03:18:03 +0800 |
commit | 4ed884327ce255643722f1f3d9940352994023a1 (patch) | |
tree | 872dfe95e9b57f79159daf083ae871ec5f8827d3 | |
parent | d02b7d633c8163853edaff587d701a32bfb59455 (diff) | |
download | pttbbs-4ed884327ce255643722f1f3d9940352994023a1.tar pttbbs-4ed884327ce255643722f1f3d9940352994023a1.tar.gz pttbbs-4ed884327ce255643722f1f3d9940352994023a1.tar.bz2 pttbbs-4ed884327ce255643722f1f3d9940352994023a1.tar.lz pttbbs-4ed884327ce255643722f1f3d9940352994023a1.tar.xz pttbbs-4ed884327ce255643722f1f3d9940352994023a1.tar.zst pttbbs-4ed884327ce255643722f1f3d9940352994023a1.zip |
* add welcome screen update into regular check list
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4602 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | daemon/logind/logind.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/daemon/logind/logind.c b/daemon/logind/logind.c index 2dedb71a..2bc63d61 100644 --- a/daemon/logind/logind.c +++ b/daemon/logind/logind.c @@ -65,6 +65,7 @@ // global variables int g_tunnel; // tunnel for service daemon int g_reload_data = 1; // request to reload data +time4_t g_welcome_mtime; // server status int g_overload = 0; @@ -619,6 +620,7 @@ reload_data() fprintf(stderr, LOG_PREFIX "start reloading data.\r\n"); g_reload_data = 0; + g_welcome_mtime = dasht(FN_WELCOME); load_text_screen_file(FN_WELCOME, &welcome_screen); load_text_screen_file(FN_GOODBYE, &goodbye_screen); load_text_screen_file(FN_BAN, &ban_screen); @@ -826,6 +828,15 @@ regular_check() g_banned = 1; load_text_screen_file(FN_BAN, &ban_screen); } + + // check welcome screen + if (g_verbose) + fprintf(stderr, LOG_PREFIX "check welcome screen.\r\n"); + if (dasht(FN_WELCOME) != g_welcome_mtime) + { + g_reload_data = 1; + fprintf(stderr, LOG_PREFIX "modified. must update welcome screen ...\r\n"); + } } static int |