Mercurial > ~mikael > mcabber > hg
comparison mcabber/src/jabglue.c @ 1379:74b7621537d7
MUC: Store room settings (print_status, auto_whois) in private storage
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Thu, 29 Nov 2007 20:54:38 +0100 |
parents | 61fc9eddf763 |
children | 605f9e1f9f76 |
comparison
equal
deleted
inserted
replaced
1378:61fc9eddf763 | 1379:74b7621537d7 |
---|---|
1403 } | 1403 } |
1404 } | 1404 } |
1405 return sl_bookmarks; | 1405 return sl_bookmarks; |
1406 } | 1406 } |
1407 | 1407 |
1408 // jb_set_storage_bookmark(roomid, name, nick, passwd, autojoin) | 1408 // jb_set_storage_bookmark(roomid, name, nick, passwd, autojoin, |
1409 // printstatus, autowhois) | |
1409 // Update the private storage bookmarks: add a conference room. | 1410 // Update the private storage bookmarks: add a conference room. |
1410 // If name is nil, we remove the bookmark. | 1411 // If name is nil, we remove the bookmark. |
1411 void jb_set_storage_bookmark(const char *roomid, const char *name, | 1412 void jb_set_storage_bookmark(const char *roomid, const char *name, |
1412 const char *nick, const char *passwd, int autojoin) | 1413 const char *nick, const char *passwd, |
1414 int autojoin, enum room_printstatus pstatus, | |
1415 enum room_autowhois awhois) | |
1413 { | 1416 { |
1414 xmlnode x; | 1417 xmlnode x; |
1415 bool changed = FALSE; | 1418 bool changed = FALSE; |
1416 | 1419 |
1417 if (!roomid) | 1420 if (!roomid) |
1454 xmlnode_put_attrib(x, "autojoin", autojoin ? "1" : "0"); | 1457 xmlnode_put_attrib(x, "autojoin", autojoin ? "1" : "0"); |
1455 if (nick) | 1458 if (nick) |
1456 xmlnode_insert_cdata(xmlnode_insert_tag(x, "nick"), nick, -1); | 1459 xmlnode_insert_cdata(xmlnode_insert_tag(x, "nick"), nick, -1); |
1457 if (passwd) | 1460 if (passwd) |
1458 xmlnode_insert_cdata(xmlnode_insert_tag(x, "password"), passwd, -1); | 1461 xmlnode_insert_cdata(xmlnode_insert_tag(x, "password"), passwd, -1); |
1462 if (pstatus) | |
1463 xmlnode_insert_cdata(xmlnode_insert_tag(x, "print_status"), | |
1464 strprintstatus[pstatus], -1); | |
1465 if (awhois) | |
1466 xmlnode_put_attrib(x, "autowhois", (awhois == autowhois_on ? "1" : "0")); | |
1459 changed = TRUE; | 1467 changed = TRUE; |
1460 scr_LogPrint(LPRINT_LOGNORM, "Updating bookmarks..."); | 1468 scr_LogPrint(LPRINT_LOGNORM, "Updating bookmarks..."); |
1461 } | 1469 } |
1462 | 1470 |
1463 if (!changed) | 1471 if (!changed) |