diff options
-rw-r--r-- | mbbsd/friend.c | 7 | ||||
-rw-r--r-- | mbbsd/mbbsd.c | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/mbbsd/friend.c b/mbbsd/friend.c index 23d5f85f..39ef2148 100644 --- a/mbbsd/friend.c +++ b/mbbsd/friend.c @@ -257,6 +257,7 @@ friend_editdesc(char *uident, int type) } } +/* type == 0 : load all */ void friend_load(int type) { @@ -266,7 +267,7 @@ friend_load(int type) int friendcount, rejectedcount; char genbuf[200]; - if (type & FRIEND_OVERRIDE) { + if (!type || type & FRIEND_OVERRIDE) { memset(myfriends, 0, sizeof(myfriends)); friendcount = 0; setuserfile(genbuf, fn_overrides); @@ -282,7 +283,7 @@ friend_load(int type) memcpy(currutmp->friend, myfriends, sizeof(myfriends)); } - if (type & FRIEND_EJECT) { + if (!type || type & FRIEND_REJECT) { memset(myrejects, 0, sizeof(myrejects)); rejectedcount = 0; setuserfile(genbuf, fn_reject); @@ -456,7 +457,7 @@ friend_edit(int type) fclose(fp); } } - friend_load(); + friend_load(0); } } diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index 660bdb80..69b84742 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -753,7 +753,7 @@ setup_utmp(int mode) if (!(cuser.numlogins % 20) && cuser.userlevel & PERM_BM) check_BM(); /* Ptt 自動取下離職板主權力 */ #ifndef _BBS_UTIL_C_ - friend_load(FRIEND_OVERRIDE | FRIEND_EJECT); + friend_load(0); nice(3); #endif } |