summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-07-10 14:05:54 +0800
committerscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-07-10 14:05:54 +0800
commit931c629495f328fcd0a2b6aabf8c80db23707963 (patch)
tree5279c8e0eb818e2faf46ed316ca0ab490c4dd5c8 /mbbsd
parentc8d6d8089bba6d9b2b1ee713074b6e318dddf27f (diff)
downloadpttbbs-931c629495f328fcd0a2b6aabf8c80db23707963.tar
pttbbs-931c629495f328fcd0a2b6aabf8c80db23707963.tar.gz
pttbbs-931c629495f328fcd0a2b6aabf8c80db23707963.tar.bz2
pttbbs-931c629495f328fcd0a2b6aabf8c80db23707963.tar.lz
pttbbs-931c629495f328fcd0a2b6aabf8c80db23707963.tar.xz
pttbbs-931c629495f328fcd0a2b6aabf8c80db23707963.tar.zst
pttbbs-931c629495f328fcd0a2b6aabf8c80db23707963.zip
correcting mode strings.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2119 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/cache.c2
-rw-r--r--mbbsd/dark.c3
-rw-r--r--mbbsd/talk.c24
-rw-r--r--mbbsd/var.c8
4 files changed, 14 insertions, 23 deletions
diff --git a/mbbsd/cache.c b/mbbsd/cache.c
index efdab497..d7bba339 100644
--- a/mbbsd/cache.c
+++ b/mbbsd/cache.c
@@ -473,7 +473,7 @@ setutmpmode(unsigned int mode)
currutmp->mode = currstat = mode;
/* 追蹤使用者 */
if (HAS_PERM(PERM_LOGUSER)) {
- log_user("setutmpmode to %s(%d)", modestring(currutmp, 0), mode);
+ log_user("setutmpmode to %s(%d)\n", modestring(currutmp, 0), mode);
}
}
#endif
diff --git a/mbbsd/dark.c b/mbbsd/dark.c
index 03777a2e..caad835b 100644
--- a/mbbsd/dark.c
+++ b/mbbsd/dark.c
@@ -357,7 +357,8 @@ main_dark(int fd, userinfo_t * uin)
rcount = 16;
bcount = 16;
//initialize
- cur_eaty = 18, cur_eatx = 5;
+ cur_eaty = 18, cur_eatx = 5;
+ setutmpmode(DARK);
brd_prints();
if (currutmp->turn) {
brd_rand();
diff --git a/mbbsd/talk.c b/mbbsd/talk.c
index f7e89313..1bd98ce6 100644
--- a/mbbsd/talk.c
+++ b/mbbsd/talk.c
@@ -78,7 +78,7 @@ char *
modestring(userinfo_t * uentp, int simple)
{
static char modestr[40];
- char *notonline = "不在站上";
+ static char *const notonline = "不在站上";
register int mode = uentp->mode;
register char *word;
int fri_stat;
@@ -89,6 +89,7 @@ modestring(userinfo_t * uentp, int simple)
word = ModeTypeTable[mode % MAX_MODES];
} else
word = ModeTypeTable[mode];
+
fri_stat = friend_stat(currutmp, uentp);
if (!(HAS_PERM(PERM_SYSOP) || HAS_PERM(PERM_SEECLOAK)) &&
((uentp->invisible || (fri_stat & HRM)) &&
@@ -101,8 +102,9 @@ modestring(userinfo_t * uentp, int simple)
word = modestr;
} else if (!mode && *uentp->chatid == 1) {
if (!simple)
- snprintf(modestr, sizeof(modestr),
- "回應 %s", getuserid(uentp->destuid));
+ snprintf(modestr, sizeof(modestr), "回應 %s",
+ isvisible_uid(uentp->destuid) ?
+ getuserid(uentp->destuid) : "空氣");
else
snprintf(modestr, sizeof(modestr), "回應呼叫");
}
@@ -131,26 +133,16 @@ modestring(userinfo_t * uentp, int simple)
return word;
else if (uentp->in_chat && mode == CHATING)
snprintf(modestr, sizeof(modestr), "%s (%s)", word, uentp->chatid);
- else if (mode == TALK) {
+ else if (mode == TALK || mode == M_FIVE || mode == CHC || mode == GO
+ || mode == DARK) {
if (!isvisible_uid(uentp->destuid)) /* Leeym 對方(紫色)隱形 */
- snprintf(modestr, sizeof(modestr), "%s", "交談 空氣");
+ snprintf(modestr, sizeof(modestr), "%s 空氣", word);
/* Leeym * 大家自己發揮吧! */
else
snprintf(modestr, sizeof(modestr),
"%s %s", word, getuserid(uentp->destuid));
- } else if (mode == M_FIVE) {
- if (!isvisible_uid(uentp->destuid))
- snprintf(modestr, sizeof(modestr), "%s", "五子棋 空氣");
- else
- snprintf(modestr, sizeof(modestr), "%s %s", word, getuserid(uentp->destuid));
} else if (mode == CHESSWATCHING) {
snprintf(modestr, sizeof(modestr), "觀棋");
- } else if (mode == CHC) {
- if (isvisible_uid(uentp->destuid))
- snprintf(modestr, sizeof(modestr), "%s", "下象棋");
- else
- snprintf(modestr, sizeof(modestr),
- "下象棋 %s", getuserid(uentp->destuid));
} else if (mode != PAGE && mode != TQUERY)
return word;
else
diff --git a/mbbsd/var.c b/mbbsd/var.c
index a429545a..f7062848 100644
--- a/mbbsd/var.c
+++ b/mbbsd/var.c
@@ -259,10 +259,10 @@ char * const ModeTypeTable[MAX_MODES] = {
"火車查詢", /* RAIL_WAY */
"搜尋選單", /* SREG */
"下象棋", /* CHC */
- "下暗琪", /* DARK */
- "NBA大猜測" /* TMPJACK */
+ "下暗棋", /* DARK */
+ "NBA大猜測", /* TMPJACK */
"Ptt查榜系統", /* JCEE */
- "重編文章" /* REEDIT */
+ "重編文章", /* REEDIT */
"部落格", /* BLOGGING */
"看象棋", /* CHESSWATCHING */
"下圍棋", /* GO */
@@ -309,8 +309,6 @@ char * const ModeTypeTable[MAX_MODES] = {
"",
"",
"",
- "",
- "",
""
};