summary refs log tree commit diff stats
path: root/src/common
diff options
context:
space:
mode:
authorberkeviktor@aol.com <berkeviktor@aol.com>2011-05-30 20:29:33 +0200
committerberkeviktor@aol.com <berkeviktor@aol.com>2011-05-30 20:29:33 +0200
commitbfb61201168844e8432b328332b431d8dbca2a2a (patch)
tree63a3b5106073a6884b49d8f20937a6b211349b29 /src/common
parent8c7d6502b99cfcfa034be2a9295eb7657f38dea1 (diff)
parentff41e953ccd3e8783c9653b0bb901d290bbd1a78 (diff)
Merge with default
Diffstat (limited to 'src/common')
-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 5cd888c9..3485dfd4 100644
--- a/src/common/inbound.c
+++ b/src/common/inbound.c
@@ -743,6 +743,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)
@@ -752,9 +753,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 0f8f8048..1ca63201 100644
--- a/src/common/servlist.c
+++ b/src/common/servlist.c
@@ -359,36 +359,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);