summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2013-01-06 22:34:19 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2013-01-06 22:34:19 +0800
commitb88f5bcf5f23f6c84a87a7f6907b61b8de09c578 (patch)
treed2d82bd5e041db4f6ce0e3c1fb3718c57ddfb860
parentd8614b8ad78686f83be130dabc86cc9231fb3994 (diff)
downloadpttbbs-b88f5bcf5f23f6c84a87a7f6907b61b8de09c578.tar
pttbbs-b88f5bcf5f23f6c84a87a7f6907b61b8de09c578.tar.gz
pttbbs-b88f5bcf5f23f6c84a87a7f6907b61b8de09c578.tar.bz2
pttbbs-b88f5bcf5f23f6c84a87a7f6907b61b8de09c578.tar.lz
pttbbs-b88f5bcf5f23f6c84a87a7f6907b61b8de09c578.tar.xz
pttbbs-b88f5bcf5f23f6c84a87a7f6907b61b8de09c578.tar.zst
pttbbs-b88f5bcf5f23f6c84a87a7f6907b61b8de09c578.zip
Allow angel song only on specific day.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5759 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/mbbsd/angel.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/pttbbs/mbbsd/angel.c b/pttbbs/mbbsd/angel.c
index edd2d25d..6612b909 100644
--- a/pttbbs/mbbsd/angel.c
+++ b/pttbbs/mbbsd/angel.c
@@ -355,6 +355,16 @@ angel_order_song(char *receiver, size_t sz_receiver) {
!(udata.userlevel & PERM_ANGEL))
return NULL;
+#ifdef ANGEL_ORDER_SONG_DAY
+ // check day
+ {
+ struct tm tm;
+ localtime4_r(&now, &tm);
+ if (tm.tm_mday != ANGEL_ORDER_SONG_DAY)
+ return NULL;
+ }
+#endif
+
angel_nick = angel_get_nick();
snprintf(prompt, sizeof(prompt), "要留言給你的%s小天使嗎? [y/N]: ",
angel_nick);