summary refs log tree commit diff stats
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
parentad0067c162e2425a164854e4563a544d4a50d9f5 (diff)
update xchat to r1496
-rw-r--r--src/common/inbound.c4
-rw-r--r--src/common/servlist.c32
-rw-r--r--src/common/userlist.c11
-rw-r--r--src/common/userlist.h1
4 files changed, 17 insertions, 31 deletions
diff --git a/src/common/inbound.c b/src/common/inbound.c
index ec7dd9d0..41f5cff3 100644
--- a/src/common/inbound.c
+++ b/src/common/inbound.c
@@ -744,6 +744,7 @@ inbound_quit (server *serv, char *nick, char *ip, char *reason)
 {
 	GSList *list = sess_list;
 	session *sess;
+	struct User *user;
 	int was_on_front_session = FALSE;
 
 	while (list)
@@ -753,9 +754,10 @@ inbound_quit (server *serv, char *nick, char *ip, char *reason)
 		{
  			if (sess == current_sess)
  				was_on_front_session = TRUE;
-			if (userlist_remove (sess, nick))
+			if (user = userlist_find (sess, nick))
 			{
 				EMIT_SIGNAL (XP_TE_QUIT, sess, nick, reason, ip, NULL, 0);
+				userlist_remove_user (sess, user);
 			} else if (sess->type == SESS_DIALOG && !serv->p_cmp (sess->channel, nick))
 			{
 				EMIT_SIGNAL (XP_TE_QUIT, sess, nick, reason, ip, NULL, 0);
diff --git a/src/common/servlist.c b/src/common/servlist.c
index 20a156a8..29731b14 100644
--- a/src/common/servlist.c
+++ b/src/common/servlist.c
@@ -360,36 +360,14 @@ static const struct defaultserver def[] =
 	{0,			"irc.PTlink.net"},
 	{0,			"aaia.PTlink.net"},
 
-	{"PTNet, ISP's",	0},
+	{"PTNet.org",   0},
 	{0,			"irc.PTNet.org"},
-	{0,			"rccn.PTnet.org"},
-	{0,			"EUnet.PTnet.org"},
-	{0,			"madinfo.PTnet.org"},
-	{0,			"netc2.PTnet.org"},
-	{0,			"netc1.PTnet.org"},
-	{0,			"telepac1.ptnet.org"},
-	{0,			"esoterica.PTnet.org"},
-	{0,			"ip-hub.ptnet.org"},
-	{0,			"telepac1.ptnet.org"},
-	{0,			"nortenet.PTnet.org"},
-
-	{"PTNet, UNI",	0},
-	{0,			"irc.PTNet.org"},
-	{0,			"rccn.PTnet.org"},
+	{0,			"world.PTnet.org"},
+	{0,			"netvisao.PTnet.org"},
 	{0,			"uevora.PTnet.org"},
-	{0,			"umoderna.PTnet.org"},
-	{0,			"ist.PTnet.org"},
-	{0,			"aaum.PTnet.org"},
+	{0,			"vianetworks.PTnet.org"},
 	{0,			"uc.PTnet.org"},
-	{0,			"ualg.ptnet.org"},
-	{0,			"madinfo.PTnet.org"},
-/*	{0,			"isep.PTnet.org"},*/
-	{0,			"ua.PTnet.org"},
-	{0,			"ipg.PTnet.org"},
-	{0,			"isec.PTnet.org"},
-	{0,			"utad.PTnet.org"},
-	{0,			"iscte.PTnet.org"},
-	{0,			"ubi.PTnet.org"},
+	{0,			"nfsi.ptnet.org"},
 
 	{"QuakeNet",	0},
 	{0,			"irc.quakenet.org"},
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
diff --git a/src/common/userlist.h b/src/common/userlist.h
index 28831acd..91eb62c0 100644
--- a/src/common/userlist.h
+++ b/src/common/userlist.h
@@ -32,6 +32,7 @@ void userlist_clear (session *sess);
 void userlist_free (session *sess);
 void userlist_add (session *sess, char *name, char *hostname);
 int userlist_remove (session *sess, char *name);
+void userlist_remove_user (session *sess, struct User *user);
 int userlist_change (session *sess, char *oldname, char *newname);
 void userlist_update_mode (session *sess, char *name, char mode, char sign);
 GSList *userlist_flat_list (session *sess);