aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitlbee.c2
-rw-r--r--protocols/jabber/conference.c4
-rw-r--r--protocols/jabber/iq.c5
-rw-r--r--protocols/jabber/jabber.c2
-rw-r--r--protocols/nogaim.c8
5 files changed, 14 insertions, 7 deletions
diff --git a/bitlbee.c b/bitlbee.c
index c4a2da1e..cbccd9ea 100644
--- a/bitlbee.c
+++ b/bitlbee.c
@@ -69,6 +69,7 @@ int bitlbee_daemon_init()
#ifdef IPV6
memset( &listen_addr6, 0, sizeof( listen_addr6 ) );
+ memset( &listen_addr, 0, sizeof( listen_addr ) );
listen_addr6.sin6_family = AF_INET6;
listen_addr6.sin6_port = htons( global.conf->port );
if( ( i = inet_pton( AF_INET6, ipv6_wrap( global.conf->iface ), &listen_addr6.sin6_addr ) ) != 1 )
@@ -76,7 +77,6 @@ int bitlbee_daemon_init()
/* Forget about IPv6 in this function. */
use_ipv6 = 0;
#endif
- memset( &listen_addr, 0, sizeof( listen_addr ) );
listen_addr.sin_family = AF_INET;
listen_addr.sin_port = htons( global.conf->port );
if( strcmp( global.conf->iface, "::" ) == 0 )
diff --git a/protocols/jabber/conference.c b/protocols/jabber/conference.c
index 09a63cbc..1b392655 100644
--- a/protocols/jabber/conference.c
+++ b/protocols/jabber/conference.c
@@ -166,11 +166,13 @@ void jabber_chat_pkt_presence( struct im_connection *ic, struct jabber_buddy *bu
imcb_chat_add_buddy( chat, bud->ext_jid );
if( s ) *s = '/';
}
- else if( type ) /* This only gets called if type is NULL or "unavailable" */
+ else if( type ) /* type can only be NULL or "unavailable" in this function */
{
s = strchr( bud->ext_jid, '/' );
if( s ) *s = 0;
imcb_chat_remove_buddy( chat, bud->ext_jid, NULL );
+ if( bud != jc->me && bud->flags & JBFLAG_IS_ANONYMOUS )
+ imcb_remove_buddy( ic, bud->ext_jid, NULL );
if( s ) *s = '/';
if( bud == jc->me )
diff --git a/protocols/jabber/iq.c b/protocols/jabber/iq.c
index 0050fb5b..e5c5dde2 100644
--- a/protocols/jabber/iq.c
+++ b/protocols/jabber/iq.c
@@ -377,11 +377,8 @@ static xt_status jabber_parse_roster( struct im_connection *ic, struct xt_node *
}
else if( strcmp( sub, "remove" ) == 0 )
{
- /* Don't have any API call for this yet! So let's
- just try to handle this as well as we can. */
jabber_buddy_remove_bare( ic, jid );
- imcb_buddy_status( ic, jid, 0, NULL, NULL );
- /* FIXME! */
+ imcb_remove_buddy( ic, jid, NULL );
}
}
diff --git a/protocols/jabber/jabber.c b/protocols/jabber/jabber.c
index b70af944..ad28c93c 100644
--- a/protocols/jabber/jabber.c
+++ b/protocols/jabber/jabber.c
@@ -333,7 +333,7 @@ static void jabber_remove_buddy( struct im_connection *ic, char *who, char *grou
if( g_strcasecmp( who, JABBER_XMLCONSOLE_HANDLE ) == 0 )
{
jd->flags &= ~JFLAG_XMLCONSOLE;
- /* FIXME imcb_remove_buddy( ic, JABBER_XMLCONSOLE_HANDLE, NULL ); */
+ imcb_remove_buddy( ic, JABBER_XMLCONSOLE_HANDLE, NULL );
return;
}
diff --git a/protocols/nogaim.c b/protocols/nogaim.c
index a1a97dc3..4f04993c 100644
--- a/protocols/nogaim.c
+++ b/protocols/nogaim.c
@@ -441,6 +441,14 @@ void imcb_rename_buddy( struct im_connection *ic, char *handle, char *realname )
}
}
+void imcb_remove_buddy( struct im_connection *ic, char *handle, char *group )
+{
+ user_t *u;
+
+ if( ( u = user_findhandle( ic, handle ) ) )
+ user_del( ic->irc, u->nick );
+}
+
/* Mainly meant for ICQ (and now also for Jabber conferences) to allow IM
modules to suggest a nickname for a handle. */
void imcb_buddy_nick_hint( struct im_connection *ic, char *handle, char *nick )