# HG changeset patch # User Nathan Walp # Date 1069737977 0 # Node ID 778624d3fced25eb4d775d87142416a789d5718b # Parent e293d0c42ccb8315753ada9829117f646f06bf2c [gaim-migrate @ 8253] if we create a MUC room, we need to set it up committer: Tailor Script diff -r e293d0c42ccb -r 778624d3fced src/protocols/jabber/presence.c --- a/src/protocols/jabber/presence.c Tue Nov 25 03:30:59 2003 +0000 +++ b/src/protocols/jabber/presence.c Tue Nov 25 05:26:17 2003 +0000 @@ -231,7 +231,25 @@ /* this is where we'd normally get the "op" status of the * user, but since we don't have a good way to show that yet * we'll ignore it */ + xmlnode *z; + muc = TRUE; + if((z = xmlnode_get_child(y, "status"))) { + const char *code = xmlnode_get_attrib(z, "code"); + if(code && !strcmp(code, "201")) { + /* we created the room. for now, we'll make it + * an instant room. XXX: allow fancy room creation */ + JabberIq *iq = jabber_iq_new_query(js, JABBER_IQ_SET, + "http://jabber.org/protocol/muc#owner"); + xmlnode *query = xmlnode_get_child(iq->node, "query"); + + xmlnode *x = xmlnode_new_child(query, "x"); + xmlnode_set_attrib(x, "xmlns", "jabber:x:data"); + xmlnode_set_attrib(x, "type", "submit"); + + jabber_iq_send(iq); + } + } } } }