summary refs log tree commit diff stats
path: root/src/common/userlist.c
diff options
context:
space:
mode:
authorberkeviktor@aol.com <berkeviktor@aol.com>2011-05-30 20:27:08 +0200
committerberkeviktor@aol.com <berkeviktor@aol.com>2011-05-30 20:27:08 +0200
commitff41e953ccd3e8783c9653b0bb901d290bbd1a78 (patch)
tree60bc595e66f32f38625fb0c3edbe25ee49751639 /src/common/userlist.c
parentad0067c162e2425a164854e4563a544d4a50d9f5 (diff)
update xchat to r1496
Diffstat (limited to 'src/common/userlist.c')
-rw-r--r--src/common/userlist.c11
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