diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2006-09-24 21:25:06 +0200 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2006-09-24 21:25:06 +0200 |
commit | 8e5e2e9a0ef549c94afc8041dc7d99358f51c9bd (patch) | |
tree | 66345fc8d13a8b9403dd09f3dc42b44618336ce6 /protocols/jabber/presence.c | |
parent | cfbb3a6e5e11a8d2d162d80958d6ce997104e9d3 (diff) |
Handling of incoming authorization requests, manual block/allow. (Doesn't
seem to be completely like how it works on other IM networks.)
Diffstat (limited to 'protocols/jabber/presence.c')
-rw-r--r-- | protocols/jabber/presence.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/protocols/jabber/presence.c b/protocols/jabber/presence.c index fa9c1248..1b8008b8 100644 --- a/protocols/jabber/presence.c +++ b/protocols/jabber/presence.c @@ -41,6 +41,21 @@ xt_status jabber_pkt_presence( struct xt_node *node, gpointer data ) serv_got_update( gc, from, 1, 0, 0, 0, 0, 0 ); else if( strcmp( type, "unavailable" ) == 0 ) serv_got_update( gc, from, 0, 0, 0, 0, 0, 0 ); + else if( strcmp( type, "subscribe" ) == 0 ) + jabber_buddy_ask( gc, from ); + else if( strcmp( type, "subscribed" ) == 0 ) + serv_got_crap( gc, "%s just accepted your authorization request", from ); + else if( strcmp( type, "unsubscribe" ) == 0 || strcmp( type, "unsubscribed" ) == 0 ) + { + /* Do nothing here. Plenty of control freaks or over-curious + souls get excited when they can see who still has them in + their buddy list and who finally removed them. Somehow I + got the impression that those are the people who get + removed from many buddy lists for "some" reason... + + If you're one of those people, this is your chance to write + your first line of code in C... */ + } else { printf( "Received PRES from %s:\n", from ); |