aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/jabber/message.c
diff options
context:
space:
mode:
authorulim <a.sporto+bee@gmail.com>2008-08-04 16:45:24 +0200
committerulim <a.sporto+bee@gmail.com>2008-08-04 16:45:24 +0200
commit8661caad555f4306cf36ee37979a7637b05d5cd4 (patch)
tree7e4a7c3d6a700610dd31d109508b07caa3253902 /protocols/jabber/message.c
parent4ac647dbcef152bebde7209f7c9cbbf8a5e0fc37 (diff)
parent718e05f842c1af043eb4efded8b0afe429377f70 (diff)
merged in upstream r410.
Only conflict was the correction of jabber normalization which I had already done.
Diffstat (limited to 'protocols/jabber/message.c')
-rw-r--r--protocols/jabber/message.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/protocols/jabber/message.c b/protocols/jabber/message.c
index fab62a91..6cb67d42 100644
--- a/protocols/jabber/message.c
+++ b/protocols/jabber/message.c
@@ -48,6 +48,23 @@ xt_status jabber_pkt_message( struct xt_node *node, gpointer data )
else /* "chat", "normal", "headline", no-type or whatever. Should all be pretty similar. */
{
GString *fullmsg = g_string_new( "" );
+
+ for( c = node->children; ( c = xt_find_node( c, "x" ) ); c = c->next )
+ {
+ char *ns = xt_find_attr( c, "xmlns" ), *room;
+ struct xt_node *inv, *reason;
+
+ if( strcmp( ns, XMLNS_MUC_USER ) == 0 &&
+ ( inv = xt_find_node( c->children, "invite" ) ) )
+ {
+ room = from;
+ from = xt_find_attr( inv, "from" ) ? : from;
+
+ g_string_append_printf( fullmsg, "<< \002BitlBee\002 - Invitation to chatroom %s >>\n", room );
+ if( ( reason = xt_find_node( inv->children, "reason" ) ) && reason->text_len > 0 )
+ g_string_append( fullmsg, reason->text );
+ }
+ }
if( ( s = strchr( from, '/' ) ) )
{