diff options
author | James Booth <boothj5@gmail.com> | 2013-01-20 23:30:15 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2013-01-20 23:30:15 +0000 |
commit | 97a497c355a4a80be1dc6e31c41dc587c6dda629 (patch) | |
tree | 68fca905a671162cd3c46b8fe52ad4157a0ba386 /src/windows.c | |
parent | 5c04adde2b3e38ce41f81b3994b1f3ec74026df0 (diff) | |
download | profani-tty-97a497c355a4a80be1dc6e31c41dc587c6dda629.tar.gz |
Updated /info command for chat and private chat
Diffstat (limited to 'src/windows.c')
-rw-r--r-- | src/windows.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/windows.c b/src/windows.c index 46bac6ea..06fab840 100644 --- a/src/windows.c +++ b/src/windows.c @@ -1175,6 +1175,32 @@ cons_show_info(const char * const contact) } void +win_show_info(void) +{ + PContact pcontact = contact_list_get_contact(win_current_get_recipient()); + + if (pcontact != NULL) { + _win_show_info(current->win, pcontact); + } else { + win_current_show("No such contact \"%s\" in roster.", win_current_get_recipient()); + } +} + +void +win_private_show_info(void) +{ + Jid *jid = jid_create(win_current_get_recipient()); + + PContact pcontact = muc_get_participant(jid->barejid, jid->resourcepart); + + if (pcontact != NULL) { + _win_show_info(current->win, pcontact); + } else { + win_current_show("No such participant \"%s\" in room.", jid->resourcepart); + } +} + +void cons_show_status(const char * const contact) { PContact pcontact = contact_list_get_contact(contact); |