summaryrefslogtreecommitdiffstats
path: root/mbbsd/stuff.c
diff options
context:
space:
mode:
authorvictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-09-20 20:57:23 +0800
committervictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-09-20 20:57:23 +0800
commit81c98e60178549e9933961219d370252e91198cb (patch)
tree1b8d399ee196b1d1cdbd152ab261c0e598d20fc0 /mbbsd/stuff.c
parentc909e6f54001e88ab3017d9e5ac49d60da6b00cd (diff)
downloadpttbbs-81c98e60178549e9933961219d370252e91198cb.tar
pttbbs-81c98e60178549e9933961219d370252e91198cb.tar.gz
pttbbs-81c98e60178549e9933961219d370252e91198cb.tar.bz2
pttbbs-81c98e60178549e9933961219d370252e91198cb.tar.lz
pttbbs-81c98e60178549e9933961219d370252e91198cb.tar.xz
pttbbs-81c98e60178549e9933961219d370252e91198cb.tar.zst
pttbbs-81c98e60178549e9933961219d370252e91198cb.zip
fix bug: when deleting an user, the aloha record won't be deleted.
add file: file.c, move some useful subroutine out of friend.c git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2205 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/stuff.c')
-rw-r--r--mbbsd/stuff.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/mbbsd/stuff.c b/mbbsd/stuff.c
index 2f41f536..4002f39e 100644
--- a/mbbsd/stuff.c
+++ b/mbbsd/stuff.c
@@ -300,21 +300,7 @@ dashd(char *fname)
int
belong(char *filelist, char *key)
{
- FILE *fp;
- int rc = 0;
-
- if ((fp = fopen(filelist, "r"))) {
- char buf[STRLEN], *ptr;
-
- while (fgets(buf, STRLEN, fp)) {
- if ((ptr = strtok(buf, str_space)) && !strcasecmp(ptr, key)) {
- rc = 1;
- break;
- }
- }
- fclose(fp);
- }
- return rc;
+ return file_exist_record(filelist, key);
}
unsigned int