summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/friend.c12
-rw-r--r--mbbsd/mbbsd.c12
2 files changed, 16 insertions, 8 deletions
diff --git a/mbbsd/friend.c b/mbbsd/friend.c
index 179a0482..f9945253 100644
--- a/mbbsd/friend.c
+++ b/mbbsd/friend.c
@@ -340,8 +340,10 @@ friend_edit(int type)
dirty = 0;
while (1) {
stand_title(friend_list[type]);
+ /* TODO move (0, 40) just won't really work as it hints.
+ * The ANSI secapes will change x coordinate. */
move(0, 40);
- prints("(�W��W��:%d�ӤH)", friend_max[type]);
+ prints("(�W��W��: %d �H)", friend_max[type]);
count = 0;
CreateNameList();
@@ -364,8 +366,8 @@ friend_edit(int type)
}
getdata(1, 0, (count ?
"(A)�W�[(D)�R��(E)�ק�(P)�ޤJ(L)�ԲӦC�X"
- "(K)�R����ӦW��(W)����y(Q)�����H[Q]" :
- "(A)�W�[ (P)�ޤJ��L�W�� (Q)�����H[Q]"),
+ "(K)�R����ӦW��(W)����y(Q)����?[Q] " :
+ "(A)�W�[ (P)�ޤJ��L�W�� (Q)����?[Q] "),
uident, 3, LCECHO);
if (uident[0] == 'a') {
move(1, 0);
@@ -393,7 +395,7 @@ friend_edit(int type)
} else if (uident[0] == 'l' && count)
more(fpath, YEA);
else if (uident[0] == 'k' && count) {
- getdata(2, 0, "����W��N�|�Q�R��,�z�T�w�� (a/N)?", uident, 3,
+ getdata(2, 0, "�R������W��,�T�w�� (a/N)?", uident, 3,
LCECHO);
if (uident[0] == 'a')
unlink(fpath);
@@ -420,7 +422,7 @@ friend_edit(int type)
sscanf(line, "%" toSTR(IDLEN) "s", uident);
sethomefile(genbuf, uident,
type == FRIEND_ALOHA ? "aloha" : "postnotify");
- del_distinct(genbuf, cuser.userid);
+ del_distinct(genbuf, cuser.userid, 0);
}
fclose(fp);
}
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c
index 30ba77ac..cb783a6c 100644
--- a/mbbsd/mbbsd.c
+++ b/mbbsd/mbbsd.c
@@ -718,7 +718,7 @@ add_distinct(const char *fname, const char *line)
}
void
-del_distinct(const char *fname, const char *line)
+del_distinct(const char *fname, const char *line, int casesensitive)
{
FILE *fp;
int n = 0;
@@ -740,8 +740,14 @@ del_distinct(const char *fname, const char *line)
if (p[-1] == '\n' || p[-1] == '\r')
p[-1] = 0;
- if (!strcmp(buffer, line))
- break;
+ if(casesensitive)
+ {
+ if (!strcmp(buffer, line))
+ break;
+ } else {
+ if (!strcasecmp(buffer, line))
+ break;
+ }
sscanf(buffer + strlen(buffer) + 2, "%d", &n);
fprintf(fptmp, "%s%c#%d\n", buffer, 0, n);
}