Mercurial > hg
diff mcabber/src/jabglue.c @ 449:e08b0c2d0e54
Add "/room unlock"
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 25 Sep 2005 23:45:34 +0200 |
parents | 03bb57383cea |
children | 1d8f5b3a5f2b |
line wrap: on
line diff
--- a/mcabber/src/jabglue.c Sun Sep 25 01:04:48 2005 +0200 +++ b/mcabber/src/jabglue.c Sun Sep 25 23:45:34 2005 +0200 @@ -489,6 +489,28 @@ jb_reset_keepalive(); } +// Unlock a MUC room +// room syntax: "room@server" +void jb_room_unlock(const char *room) +{ + xmlnode x, y, z; + + if (!online) return; + if (!room) return; + + x = jutil_iqnew(JPACKET__SET, "http://jabber.org/protocol/muc#owner"); + xmlnode_put_attrib(x, "id", "unlock1"); // XXX + xmlnode_put_attrib(x, "to", room); + y = xmlnode_get_tag(x, "query"); + z = xmlnode_insert_tag(y, "x"); + xmlnode_put_attrib(z, "xmlns", "jabber:x:data"); + xmlnode_put_attrib(z, "type", "submit"); + + jab_send(jc, x); + xmlnode_free(x); + jb_reset_keepalive(); +} + void postlogin() { //int i;