diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-13 14:31:38 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-13 14:31:38 +0800 |
commit | 7aa3580fa65b08c9032e8628c00c081ca1d1c9c3 (patch) | |
tree | 1b19e42e3fbd123cd15b98e033708397af28b84a /mbbsd | |
parent | cd394a56028c2e701545b79138077c78e21a0aed (diff) | |
download | pttbbs-7aa3580fa65b08c9032e8628c00c081ca1d1c9c3.tar pttbbs-7aa3580fa65b08c9032e8628c00c081ca1d1c9c3.tar.gz pttbbs-7aa3580fa65b08c9032e8628c00c081ca1d1c9c3.tar.bz2 pttbbs-7aa3580fa65b08c9032e8628c00c081ca1d1c9c3.tar.lz pttbbs-7aa3580fa65b08c9032e8628c00c081ca1d1c9c3.tar.xz pttbbs-7aa3580fa65b08c9032e8628c00c081ca1d1c9c3.tar.zst pttbbs-7aa3580fa65b08c9032e8628c00c081ca1d1c9c3.zip |
- add 'del' in admin x_file
- add ASSESS confitional compile blocks
Reported by watch@ptt/PttCurrent
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4154 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/admin.c | 25 | ||||
-rw-r--r-- | mbbsd/user.c | 3 |
2 files changed, 22 insertions, 6 deletions
diff --git a/mbbsd/admin.c b/mbbsd/admin.c index c813b0e3..500d1c1e 100644 --- a/mbbsd/admin.c +++ b/mbbsd/admin.c @@ -790,14 +790,16 @@ x_file(void) while (*v == ' ') v++; if (strlen(fn) > 30) strcpy(fn+30-2, ".."); - prints(" %3d. " - ANSI_COLOR(1;32) "%-36.36s " + prints(" %3d. %s" + "%-36.36s " ANSI_COLOR(0;1) "%-30.30s" ANSI_RESET "\n", - i+1, v, fn); + i+1, + dashf(fn) ? ANSI_COLOR(1;32) : ANSI_COLOR(1;30;40), + v, fn); } vfooter(" �s��t���ɮ� ", - " �Ы���V��μƦr���� (Enter/��)�s��\t(q/��)���X"); + " (jk/����/0-9)���� (Enter/��)�s�� (d)�R�� \t(q/��)���X"); cursor_show(1+sel-page*rows, 0); switch((i = vkey())) { @@ -816,13 +818,24 @@ x_file(void) case 'j': case KEY_DOWN: if (sel < centries-1) sel++; break; + case 'd': + strlcpy(buf, entries[sel], sizeof(buf)); + v = strchr(buf, ' '); *v++ = 0; + i = getans("�T�w�n�R�� %s �ܡH (y/N) ", v); + if (i == 'y') + unlink(buf); + vmsgf("�t���ɮ�[%s]: %s", buf, !dashf(buf) ? + "�R�����\\ " : "���R��"); + break; + case '\n': case '\r': case KEY_RIGHT: strlcpy(buf, entries[sel], sizeof(buf)); - v = strchr(buf, ' '); - *v++ = 0; + v = strchr(buf, ' '); *v++ = 0; i = vedit(buf, NA, NULL); vmsgf("�t���ɮ�[%s]: %s", buf, (i == -1) ? "������" : "��s����"); + break; + default: if (i >= '0' && i <= '9') { diff --git a/mbbsd/user.c b/mbbsd/user.c index b81143af..72e175a4 100644 --- a/mbbsd/user.c +++ b/mbbsd/user.c @@ -769,6 +769,7 @@ uinfo_query(userec_t *u, int adminmode, int unum) if (getdata_str(y++, 0, "�峹�ƥءG", buf, 10, DOECHO, genbuf)) if ((tmp = atoi(buf)) >= 0) x.numposts = tmp; +#ifdef ASSESS snprintf(genbuf, sizeof(genbuf), "%d", u->goodpost); if (getdata_str(y++, 0, "�u�}�峹��:", buf, 10, DOECHO, genbuf)) if ((tmp = atoi(buf)) >= 0) @@ -777,6 +778,8 @@ uinfo_query(userec_t *u, int adminmode, int unum) if (getdata_str(y++, 0, "�c�H�峹��:", buf, 10, DOECHO, genbuf)) if ((tmp = atoi(buf)) >= 0) x.badpost = tmp; +#endif // ASSESS + snprintf(genbuf, sizeof(genbuf), "%d", u->vl_count); if (getdata_str(y++, 0, "�H�k�O���G", buf, 10, DOECHO, genbuf)) if ((tmp = atoi(buf)) >= 0) |