summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2010-11-10 19:20:32 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2010-11-10 19:20:32 +0800
commitb40983dc7868fbf6ef91aa561c9a89fc74c5fd3a (patch)
tree1667688e72745ce0acd0be3110bfcc3010f8fb42
parent2734f57bd9dac7f1c886507664832cd302a77879 (diff)
downloadpttbbs-b40983dc7868fbf6ef91aa561c9a89fc74c5fd3a.tar
pttbbs-b40983dc7868fbf6ef91aa561c9a89fc74c5fd3a.tar.gz
pttbbs-b40983dc7868fbf6ef91aa561c9a89fc74c5fd3a.tar.bz2
pttbbs-b40983dc7868fbf6ef91aa561c9a89fc74c5fd3a.tar.lz
pttbbs-b40983dc7868fbf6ef91aa561c9a89fc74c5fd3a.tar.xz
pttbbs-b40983dc7868fbf6ef91aa561c9a89fc74c5fd3a.tar.zst
pttbbs-b40983dc7868fbf6ef91aa561c9a89fc74c5fd3a.zip
enable pager before sending message to others, except sysops
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5242 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/mbbsd/talk.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/pttbbs/mbbsd/talk.c b/pttbbs/mbbsd/talk.c
index dd863e2f..8aaa1a27 100644
--- a/pttbbs/mbbsd/talk.c
+++ b/pttbbs/mbbsd/talk.c
@@ -774,14 +774,16 @@ my_write(pid_t pid, const char *prompt, const char *id, int flag, userinfo_t * p
/* 一般水球 */
watermode = 0;
- /* should we alert if we're in disabled mode? */
- // TODO 改成會 temporary enable, 或是問 user 要不要開
switch(currutmp->pager)
{
case PAGER_DISABLE:
case PAGER_ANTIWB:
- move(1, 0); clrtoeol();
- outs(ANSI_COLOR(1;31) "你的呼叫器目前不接受別人丟水球,對方可能無法回話。" ANSI_RESET);
+ // users should not bother people
+ if (!HasUserPerm(PERM_SYSOP | PERM_ACCOUNTS | PERM_BOARD) &&
+ vans("您的呼叫器目前設定為關閉。要打開它嗎[Y/n]? ") == 'n')
+ return 0;
+ // enable pager
+ currutmp->pager = PAGER_ON;
break;
case PAGER_FRIENDONLY: