void ui_status_room(const char * const contact) { PContact pcontact = muc_get_participant(ui_current_recipient(), contact); ProfWin *current = wins_get_current(); if (pcontact != NULL) { win_show_contact(current, pcontact); } else { ui_current_print_line("No such participant \"%s\" in room.", contact); } }
void ui_status(void) { char *recipient = ui_current_recipient(); PContact pcontact = roster_get_contact(recipient); ProfWin *current = wins_get_current(); if (pcontact != NULL) { win_show_contact(current, pcontact); } else { ui_current_print_line("Error getting contact info."); } }
void ui_status_private(void) { Jid *jid = jid_create(ui_current_recipient()); PContact pcontact = muc_get_participant(jid->barejid, jid->resourcepart); ProfWin *current = wins_get_current(); if (pcontact != NULL) { win_show_contact(current, pcontact); } else { ui_current_print_line("Error getting contact info."); } jid_destroy(jid); }
void ui_invalid_command_usage(const char *const cmd, void (*setting_func)(void)) { GString *msg = g_string_new(""); g_string_printf(msg, "Invalid usage, see '/help %s' for details.", &cmd[1]); if (setting_func) { cons_show(""); (*setting_func)(); cons_show(msg->str); } else { cons_show(""); cons_show(msg->str); ProfWin *current = wins_get_current(); if (current->type == WIN_CHAT) { ui_current_print_line(msg->str); } } g_string_free(msg, TRUE); }