comparison mcabber/src/jabglue.c @ 1244:f7b9a00c512d

Make room bookark more verbose, and remove duplicate bookmarks
author Mikael Berthe <mikael@lilotux.net>
date Mon, 18 Jun 2007 21:12:35 +0200
parents dcb99f0b5aaa
children 401639413340
comparison
equal deleted inserted replaced
1243:7d6b99b9f14d 1244:f7b9a00c512d
1339 if (!roomid) 1339 if (!roomid)
1340 return; 1340 return;
1341 1341
1342 // If we have no bookmarks, probably the server doesn't support them. 1342 // If we have no bookmarks, probably the server doesn't support them.
1343 if (!bookmarks) { 1343 if (!bookmarks) {
1344 scr_LogPrint(LPRINT_LOGNORM, 1344 scr_LogPrint(LPRINT_NORMAL,
1345 "Sorry, your server doesn't seem to support private storage."); 1345 "Sorry, your server doesn't seem to support private storage.");
1346 return; 1346 return;
1347 } 1347 }
1348 1348
1349 // Walk through the storage tags 1349 // Walk through the storage tags
1360 if (!strcmp(fjid, roomid)) { 1360 if (!strcmp(fjid, roomid)) {
1361 // We've found a bookmark for this room. Let's hide it and we'll 1361 // We've found a bookmark for this room. Let's hide it and we'll
1362 // create a new one. 1362 // create a new one.
1363 xmlnode_hide(x); 1363 xmlnode_hide(x);
1364 changed = TRUE; 1364 changed = TRUE;
1365 break; 1365 if (!name)
1366 scr_LogPrint(LPRINT_LOGNORM, "Deleting bookmark...");
1366 } 1367 }
1367 } 1368 }
1368 } 1369 }
1369 1370
1370 // Let's create a node/bookmark for this roomid, if the name is not NULL. 1371 // Let's create a node/bookmark for this roomid, if the name is not NULL.
1376 if (nick) 1377 if (nick)
1377 xmlnode_insert_cdata(xmlnode_insert_tag(x, "nick"), nick, -1); 1378 xmlnode_insert_cdata(xmlnode_insert_tag(x, "nick"), nick, -1);
1378 if (passwd) 1379 if (passwd)
1379 xmlnode_insert_cdata(xmlnode_insert_tag(x, "password"), passwd, -1); 1380 xmlnode_insert_cdata(xmlnode_insert_tag(x, "password"), passwd, -1);
1380 changed = TRUE; 1381 changed = TRUE;
1382 scr_LogPrint(LPRINT_LOGNORM, "Updating bookmarks...");
1381 } 1383 }
1382 1384
1383 if (!changed) 1385 if (!changed)
1384 return; 1386 return;
1385 1387
1449 return NULL; 1451 return NULL;
1450 1452
1451 // If we have no rosternotes, probably the server doesn't support them. 1453 // If we have no rosternotes, probably the server doesn't support them.
1452 if (!rosternotes) { 1454 if (!rosternotes) {
1453 if (!silent) 1455 if (!silent)
1454 scr_LogPrint(LPRINT_LOGNORM, "Sorry, " 1456 scr_LogPrint(LPRINT_NORMAL, "Sorry, "
1455 "your server doesn't seem to support private storage."); 1457 "your server doesn't seem to support private storage.");
1456 return NULL; 1458 return NULL;
1457 } 1459 }
1458 1460
1459 // Walk through the storage rosternotes tags 1461 // Walk through the storage rosternotes tags
1485 if (!barejid) 1487 if (!barejid)
1486 return; 1488 return;
1487 1489
1488 // If we have no rosternotes, probably the server doesn't support them. 1490 // If we have no rosternotes, probably the server doesn't support them.
1489 if (!rosternotes) { 1491 if (!rosternotes) {
1490 scr_LogPrint(LPRINT_LOGNORM, 1492 scr_LogPrint(LPRINT_NORMAL,
1491 "Sorry, your server doesn't seem to support private storage."); 1493 "Sorry, your server doesn't seem to support private storage.");
1492 return; 1494 return;
1493 } 1495 }
1494 1496
1495 // Walk through the storage tags 1497 // Walk through the storage tags