diff options
author | scw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-07-10 14:05:54 +0800 |
---|---|---|
committer | scw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2004-07-10 14:05:54 +0800 |
commit | 931c629495f328fcd0a2b6aabf8c80db23707963 (patch) | |
tree | 5279c8e0eb818e2faf46ed316ca0ab490c4dd5c8 /mbbsd/talk.c | |
parent | c8d6d8089bba6d9b2b1ee713074b6e318dddf27f (diff) | |
download | pttbbs-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/talk.c')
-rw-r--r-- | mbbsd/talk.c | 24 |
1 files changed, 8 insertions, 16 deletions
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 |