comparison src/protocols/jabber/chat.c @ 7895:ddd80ffd3815

[gaim-migrate @ 8555] wanted to get this committed before I went home committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Fri, 19 Dec 2003 08:33:03 +0000
parents 0555e59dfba9
children e87e7d9d0132
comparison
equal deleted inserted replaced
7894:8a9f0754f0be 7895:ddd80ffd3815
22 #include "debug.h" 22 #include "debug.h"
23 #include "multi.h" /* for proto_chat_entry */ 23 #include "multi.h" /* for proto_chat_entry */
24 #include "notify.h" 24 #include "notify.h"
25 25
26 #include "chat.h" 26 #include "chat.h"
27 #include "iq.h"
27 #include "message.h" 28 #include "message.h"
28 #include "presence.h" 29 #include "presence.h"
29 30
30 GList *jabber_chat_info(GaimConnection *gc) 31 GList *jabber_chat_info(GaimConnection *gc)
31 { 32 {
262 if(!chat) 263 if(!chat)
263 return NULL; 264 return NULL;
264 265
265 return g_strdup_printf("%s@%s/%s", chat->room, chat->server, who); 266 return g_strdup_printf("%s@%s/%s", chat->room, chat->server, who);
266 } 267 }
268
269 void jabber_chat_start_room_configure(JabberChat *chat) {
270 if(!chat)
271 return;
272
273 /* XXX: implement me! */
274
275 /* XXX: for now... */
276 jabber_chat_create_instant_room(chat);
277 }
278
279 void jabber_chat_create_instant_room(JabberChat *chat) {
280 JabberIq *iq;
281 xmlnode *query, *x;
282 char *room_jid;
283
284 if(!chat)
285 return;
286
287 iq = jabber_iq_new_query(chat->js, JABBER_IQ_SET,
288 "http://jabber.org/protocol/muc#owner");
289 query = xmlnode_get_child(iq->node, "query");
290 x = xmlnode_new_child(query, "x");
291 room_jid = g_strdup_printf("%s@%s", chat->room, chat->server);
292
293 xmlnode_set_attrib(iq->node, "to", room_jid);
294 xmlnode_set_attrib(x, "xmlns", "jabber:x:data");
295 xmlnode_set_attrib(x, "type", "submit");
296
297 jabber_iq_send(iq);
298
299 g_free(room_jid);
300 }