update xchat to r1496

This commit is contained in:
berkeviktor@aol.com 2011-05-30 20:27:08 +02:00
parent ad0067c162
commit ff41e953cc
4 changed files with 17 additions and 31 deletions

View File

@ -744,6 +744,7 @@ inbound_quit (server *serv, char *nick, char *ip, char *reason)
{ {
GSList *list = sess_list; GSList *list = sess_list;
session *sess; session *sess;
struct User *user;
int was_on_front_session = FALSE; int was_on_front_session = FALSE;
while (list) while (list)
@ -753,9 +754,10 @@ inbound_quit (server *serv, char *nick, char *ip, char *reason)
{ {
if (sess == current_sess) if (sess == current_sess)
was_on_front_session = TRUE; 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); 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)) } else if (sess->type == SESS_DIALOG && !serv->p_cmp (sess->channel, nick))
{ {
EMIT_SIGNAL (XP_TE_QUIT, sess, nick, reason, ip, NULL, 0); EMIT_SIGNAL (XP_TE_QUIT, sess, nick, reason, ip, NULL, 0);

View File

@ -360,36 +360,14 @@ static const struct defaultserver def[] =
{0, "irc.PTlink.net"}, {0, "irc.PTlink.net"},
{0, "aaia.PTlink.net"}, {0, "aaia.PTlink.net"},
{"PTNet, ISP's", 0}, {"PTNet.org", 0},
{0, "irc.PTNet.org"}, {0, "irc.PTNet.org"},
{0, "rccn.PTnet.org"}, {0, "world.PTnet.org"},
{0, "EUnet.PTnet.org"}, {0, "netvisao.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, "uevora.PTnet.org"}, {0, "uevora.PTnet.org"},
{0, "umoderna.PTnet.org"}, {0, "vianetworks.PTnet.org"},
{0, "ist.PTnet.org"},
{0, "aaum.PTnet.org"},
{0, "uc.PTnet.org"}, {0, "uc.PTnet.org"},
{0, "ualg.ptnet.org"}, {0, "nfsi.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"},
{"QuakeNet", 0}, {"QuakeNet", 0},
{0, "irc.quakenet.org"}, {0, "irc.quakenet.org"},

View File

@ -326,12 +326,19 @@ int
userlist_remove (struct session *sess, char *name) userlist_remove (struct session *sess, char *name)
{ {
struct User *user; struct User *user;
int pos;
user = userlist_find (sess, name); user = userlist_find (sess, name);
if (!user) if (!user)
return FALSE; return FALSE;
userlist_remove_user (sess, user);
return TRUE;
}
void
userlist_remove_user (struct session *sess, struct User *user)
{
int pos;
if (user->voice) if (user->voice)
sess->voices--; sess->voices--;
if (user->op) if (user->op)
@ -348,8 +355,6 @@ userlist_remove (struct session *sess, char *name)
tree_remove (sess->usertree, user, &pos); tree_remove (sess->usertree, user, &pos);
tree_remove (sess->usertree_alpha, user, &pos); tree_remove (sess->usertree_alpha, user, &pos);
free_user (user, NULL); free_user (user, NULL);
return TRUE;
} }
void void

View File

@ -32,6 +32,7 @@ void userlist_clear (session *sess);
void userlist_free (session *sess); void userlist_free (session *sess);
void userlist_add (session *sess, char *name, char *hostname); void userlist_add (session *sess, char *name, char *hostname);
int userlist_remove (session *sess, char *name); 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); int userlist_change (session *sess, char *oldname, char *newname);
void userlist_update_mode (session *sess, char *name, char mode, char sign); void userlist_update_mode (session *sess, char *name, char mode, char sign);
GSList *userlist_flat_list (session *sess); GSList *userlist_flat_list (session *sess);