1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

Tidied new command output, ordered features

This commit is contained in:
James Booth 2013-02-17 16:50:44 +00:00
parent 1a913b7d9b
commit 5a107459be
2 changed files with 12 additions and 11 deletions

View File

@ -1211,7 +1211,7 @@ cons_show_caps(const char * const contact, Resource *resource)
// show identity // show identity
if ((caps->category != NULL) || (caps->type != NULL) || (caps->name != NULL)) { if ((caps->category != NULL) || (caps->type != NULL) || (caps->name != NULL)) {
_win_show_time(win, '-'); _win_show_time(win, '-');
wprintw(win, " Identity: "); wprintw(win, "Identity: ");
if (caps->name != NULL) { if (caps->name != NULL) {
wprintw(win, "%s", caps->name); wprintw(win, "%s", caps->name);
if ((caps->category != NULL) || (caps->type != NULL)) { if ((caps->category != NULL) || (caps->type != NULL)) {
@ -1231,7 +1231,7 @@ cons_show_caps(const char * const contact, Resource *resource)
} }
if (caps->software != NULL) { if (caps->software != NULL) {
_win_show_time(win, '-'); _win_show_time(win, '-');
wprintw(win, " Software: %s", caps->software); wprintw(win, "Software: %s", caps->software);
} }
if (caps->software_version != NULL) { if (caps->software_version != NULL) {
wprintw(win, ", %s", caps->software_version); wprintw(win, ", %s", caps->software_version);
@ -1241,7 +1241,7 @@ cons_show_caps(const char * const contact, Resource *resource)
} }
if (caps->os != NULL) { if (caps->os != NULL) {
_win_show_time(win, '-'); _win_show_time(win, '-');
wprintw(win, " OS: %s", caps->os); wprintw(win, "OS: %s", caps->os);
} }
if (caps->os_version != NULL) { if (caps->os_version != NULL) {
wprintw(win, ", %s", caps->os_version); wprintw(win, ", %s", caps->os_version);
@ -1252,7 +1252,7 @@ cons_show_caps(const char * const contact, Resource *resource)
if (caps->features != NULL) { if (caps->features != NULL) {
_win_show_time(win, '-'); _win_show_time(win, '-');
wprintw(win, " Features:\n"); wprintw(win, "Features:\n");
GSList *feature = caps->features; GSList *feature = caps->features;
while (feature != NULL) { while (feature != NULL) {
_win_show_time(win, '-'); _win_show_time(win, '-');
@ -1283,13 +1283,13 @@ cons_show_software_version(const char * const jid, const char * const presence,
wprintw(console->win, ":\n"); wprintw(console->win, ":\n");
} }
if (name != NULL) { if (name != NULL) {
cons_show(" Name : %s", name); cons_show("Name : %s", name);
} }
if (version != NULL) { if (version != NULL) {
cons_show(" Version : %s", version); cons_show("Version : %s", version);
} }
if (os != NULL) { if (os != NULL) {
cons_show(" OS : %s", os); cons_show("OS : %s", os);
} }
} }

View File

@ -267,11 +267,12 @@ caps_create_query_response_stanza(xmpp_ctx_t * const ctx)
xmpp_stanza_set_attribute(feature_ping, STANZA_ATTR_VAR, STANZA_NS_PING); xmpp_stanza_set_attribute(feature_ping, STANZA_ATTR_VAR, STANZA_NS_PING);
xmpp_stanza_add_child(query, identity); xmpp_stanza_add_child(query, identity);
xmpp_stanza_add_child(query, feature_muc);
xmpp_stanza_add_child(query, feature_discoinfo);
xmpp_stanza_add_child(query, feature_caps); xmpp_stanza_add_child(query, feature_caps);
xmpp_stanza_add_child(query, feature_version);
xmpp_stanza_add_child(query, feature_chatstates); xmpp_stanza_add_child(query, feature_chatstates);
xmpp_stanza_add_child(query, feature_discoinfo);
xmpp_stanza_add_child(query, feature_muc);
xmpp_stanza_add_child(query, feature_version);
xmpp_stanza_add_child(query, feature_ping); xmpp_stanza_add_child(query, feature_ping);
xmpp_stanza_release(identity); xmpp_stanza_release(identity);