Mercurial > hg
comparison mcabber/src/commands.c @ 1020:60c94b697f61
Show in /info when the contact has an annotation
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Wed, 15 Nov 2006 22:36:35 +0100 |
parents | 9d5f6e0ea7b3 |
children | 97f862e44d5d |
comparison
equal
deleted
inserted
replaced
1019:9d5f6e0ea7b3 | 1020:60c94b697f61 |
---|---|
1288 scr_LogPrint(LPRINT_NORMAL, "Type: %s", | 1288 scr_LogPrint(LPRINT_NORMAL, "Type: %s", |
1289 type == ROSTER_TYPE_GROUP ? "group" : | 1289 type == ROSTER_TYPE_GROUP ? "group" : |
1290 (type == ROSTER_TYPE_SPECIAL ? "special" : "unknown")); | 1290 (type == ROSTER_TYPE_SPECIAL ? "special" : "unknown")); |
1291 } | 1291 } |
1292 g_free(buffer); | 1292 g_free(buffer); |
1293 | |
1294 // Tell the user if this item has an annotation. | |
1295 if (type == ROSTER_TYPE_USER || | |
1296 type == ROSTER_TYPE_ROOM || | |
1297 type == ROSTER_TYPE_AGENT) { | |
1298 struct annotation *note = jb_get_storage_rosternotes(jid); | |
1299 if (note) { | |
1300 // We do not display the note, we just tell the user. | |
1301 g_free(note->text); | |
1302 g_free(note); | |
1303 scr_WriteIncomingMessage(jid, "(This item has an annotation)", 0, | |
1304 HBB_PREFIX_INFO); | |
1305 } | |
1306 } | |
1293 } | 1307 } |
1294 | 1308 |
1295 // room_names() is a variation of do_info(), for chatrooms only | 1309 // room_names() is a variation of do_info(), for chatrooms only |
1296 static void room_names(gpointer bud, char *arg) | 1310 static void room_names(gpointer bud, char *arg) |
1297 { | 1311 { |