summaryrefslogtreecommitdiffstats
path: root/mbbsd/user.c
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-05-07 01:34:37 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-05-07 01:34:37 +0800
commitdeda4170ae183cf058150f5e9c73c31e0c9b33de (patch)
tree99cf4f86cbdeadd32cfa1cd222bd22ff3b11b516 /mbbsd/user.c
parent349546bad375aaeae458ed989c691a1fe00b1c39 (diff)
downloadpttbbs-deda4170ae183cf058150f5e9c73c31e0c9b33de.tar
pttbbs-deda4170ae183cf058150f5e9c73c31e0c9b33de.tar.gz
pttbbs-deda4170ae183cf058150f5e9c73c31e0c9b33de.tar.bz2
pttbbs-deda4170ae183cf058150f5e9c73c31e0c9b33de.tar.lz
pttbbs-deda4170ae183cf058150f5e9c73c31e0c9b33de.tar.xz
pttbbs-deda4170ae183cf058150f5e9c73c31e0c9b33de.tar.zst
pttbbs-deda4170ae183cf058150f5e9c73c31e0c9b33de.zip
corrected typos
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2717 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/user.c')
-rw-r--r--mbbsd/user.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/mbbsd/user.c b/mbbsd/user.c
index e67d4c68..b8fc5d77 100644
--- a/mbbsd/user.c
+++ b/mbbsd/user.c
@@ -200,11 +200,12 @@ void
kick_all(char *user)
{
userinfo_t *ui;
- int num = searchuser(user, NULL);
- while(!(ui = (userinfo_t *) search_ulist(num)))
+ int num = searchuser(user, NULL), i=1;
+ while((ui = (userinfo_t *) search_ulistn(num, i))>0)
{
- if(ui == currutmp) continue;
- kill(ui->pid, SIGHUP);
+ if(ui == currutmp) i++;
+ if ((ui->pid <= 0 || kill(ui->pid, SIGHUP) == -1))
+ purge_utmp(ui);
log_usies("KICK ALL", user);
}
}