mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-08-01 02:56:21 +00:00
Add command to show single bookmark details
`/bookmark list` lists all bookmarks with its details. `/bookmark list <jid>` shows the details of a single bookmark. Implement https://github.com/profanity-im/profanity/issues/1558
This commit is contained in:
@@ -744,6 +744,34 @@ cons_show_bookmarks(const GList* list)
|
||||
cons_alert(NULL);
|
||||
}
|
||||
|
||||
void
|
||||
cons_show_bookmark(Bookmark* item)
|
||||
{
|
||||
cons_show("");
|
||||
if (!item) {
|
||||
cons_show("No such bookmark");
|
||||
} else {
|
||||
cons_show("Bookmark details:");
|
||||
cons_show("Room jid : %s", item->barejid);
|
||||
if (item->name) {
|
||||
cons_show("name : %s", item->name);
|
||||
}
|
||||
if (item->nick) {
|
||||
cons_show("nick : %s", item->nick);
|
||||
}
|
||||
if (item->password) {
|
||||
cons_show("password : %s", item->password);
|
||||
}
|
||||
if (item->autojoin) {
|
||||
cons_show("autojoin : ON");
|
||||
} else {
|
||||
cons_show("autojoin : OFF");
|
||||
}
|
||||
}
|
||||
|
||||
cons_alert(NULL);
|
||||
}
|
||||
|
||||
void
|
||||
cons_show_disco_info(const char* jid, GSList* identities, GSList* features)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user