summaryrefslogtreecommitdiffstats
path: root/mbbsd/cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/cache.c')
-rw-r--r--mbbsd/cache.c25
1 files changed, 3 insertions, 22 deletions
diff --git a/mbbsd/cache.c b/mbbsd/cache.c
index f4996ffb..fee5d950 100644
--- a/mbbsd/cache.c
+++ b/mbbsd/cache.c
@@ -219,35 +219,16 @@ void
setuserid(int num, char *userid)
{
if (num > 0 && num <= MAX_USERS) {
+/* Ptt: it may cause problems
if (num > SHM->number)
SHM->number = num;
else
- remove_from_uhash(num - 1);
+*/
+ remove_from_uhash(num - 1);
add_to_uhash(num - 1, userid);
}
}
-/* 0 ==> 找過期帳號 */
-/* 1 ==> 建立新帳號 */
-/* should do it by searching "" in the hash */
-int
-searchnewuser(int mode)
-{
- register int i, num;
-
- num = SHM->number;
- i = 0;
-
- /* 為什麼這邊不用 hash table 去找而要用 linear search? */
- while (i < num) {
- if (!SHM->userid[i++][0])
- return i;
- }
- if (mode && (num < MAX_USERS))
- return num + 1;
- return 0;
-}
-
#ifndef _BBS_UTIL_C_
char *
u_namearray(char buf[][IDLEN + 1], int *pnum, char *tag)