summaryrefslogtreecommitdiffstats
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
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
-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;
/* �l�ܨϥΪ� */
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 = "���b���W";
+ static char *const notonline = "���b���W";
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), "�^���I�s");
}
@@ -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 * �j�a�ۤv�o���a�I */
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", "���l�� ��");
- 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", "�U�H��");
- else
- snprintf(modestr, sizeof(modestr),
- "�U�H�� %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] = {
"�����d��", /* RAIL_WAY */
"�j�M���", /* SREG */
"�U�H��", /* CHC */
- "�U�t�X", /* DARK */
- "NBA�j�q��" /* TMPJACK */
+ "�U�t��", /* DARK */
+ "NBA�j�q��", /* TMPJACK */
"��tt�d�]�t��", /* JCEE */
- "���s�峹" /* REEDIT */
+ "���s�峹", /* REEDIT */
"������", /* BLOGGING */
"�ݶH��", /* CHESSWATCHING */
"�U���", /* GO */
@@ -309,8 +309,6 @@ char * const ModeTypeTable[MAX_MODES] = {
"",
"",
"",
- "",
- "",
""
};