diff options
author | berkeviktor@aol.com <berkeviktor@aol.com> | 2011-05-30 20:29:33 +0200 |
---|---|---|
committer | berkeviktor@aol.com <berkeviktor@aol.com> | 2011-05-30 20:29:33 +0200 |
commit | bfb61201168844e8432b328332b431d8dbca2a2a (patch) | |
tree | 63a3b5106073a6884b49d8f20937a6b211349b29 /src/common/userlist.c | |
parent | 8c7d6502b99cfcfa034be2a9295eb7657f38dea1 (diff) | |
parent | ff41e953ccd3e8783c9653b0bb901d290bbd1a78 (diff) |
Merge with default
Diffstat (limited to 'src/common/userlist.c')
-rw-r--r-- | src/common/userlist.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/common/userlist.c b/src/common/userlist.c index 18ac4bed..a18485b1 100644 --- a/src/common/userlist.c +++ b/src/common/userlist.c @@ -326,12 +326,19 @@ int userlist_remove (struct session *sess, char *name) { struct User *user; - int pos; user = userlist_find (sess, name); if (!user) return FALSE; + userlist_remove_user (sess, user); + return TRUE; +} + +void +userlist_remove_user (struct session *sess, struct User *user) +{ + int pos; if (user->voice) sess->voices--; if (user->op) @@ -348,8 +355,6 @@ userlist_remove (struct session *sess, char *name) tree_remove (sess->usertree, user, &pos); tree_remove (sess->usertree_alpha, user, &pos); free_user (user, NULL); - - return TRUE; } void |