From e1f5cfb928ee7b034eb0044b1ef83d606ede0258 Mon Sep 17 00:00:00 2001 From: James Booth Date: Mon, 20 Oct 2014 20:58:49 +0100 Subject: [PATCH 01/17] Removed 0.4.5 todo --- TODO_045 | 3 --- src/command/command.c | 10 ++++++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/TODO_045 b/TODO_045 index 011e7164..e69de29b 100644 --- a/TODO_045 +++ b/TODO_045 @@ -1,3 +0,0 @@ -Test all freetext args -Make form editing commands less verbose -Check /help groupings (add new commands) diff --git a/src/command/command.c b/src/command/command.c index 5726b49f..0fba4ee8 100644 --- a/src/command/command.c +++ b/src/command/command.c @@ -359,6 +359,16 @@ static struct cmd_t command_defs[] = "The affiliation may be one of owner, admin, member, outcast or none.", NULL } } }, + { "/affiliations", + cmd_affiliation, parse_args, 0, 0, NULL, + { "/affiliation set|list [affiliation] [jid] [reason]", "Manage room affiliations.", + { "/affiliation set|list [affiliation] [jid] [reason]", + "--------------------------------------------------", + "set affiliation jid [reason]- Set the affiliation of user with jid, with an optional reason.", + "list [affiliation] - List all users with the specified affiliation, or all if none specified.", + "The affiliation may be one of owner, admin, member, outcast or none.", + NULL } } }, + { "/role", cmd_role, parse_args_with_freetext, 1, 4, NULL, { "/role set|list [role] [nick] [reason]", "Manage room roles.", From 140cf0cbb0896275d2a580e3a4eb975dc288d38e Mon Sep 17 00:00:00 2001 From: James Booth Date: Mon, 20 Oct 2014 21:01:27 +0100 Subject: [PATCH 02/17] Revert "Removed 0.4.5 todo" This reverts commit e1f5cfb928ee7b034eb0044b1ef83d606ede0258. --- TODO_045 | 3 +++ src/command/command.c | 10 ---------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/TODO_045 b/TODO_045 index e69de29b..011e7164 100644 --- a/TODO_045 +++ b/TODO_045 @@ -0,0 +1,3 @@ +Test all freetext args +Make form editing commands less verbose +Check /help groupings (add new commands) diff --git a/src/command/command.c b/src/command/command.c index 0fba4ee8..5726b49f 100644 --- a/src/command/command.c +++ b/src/command/command.c @@ -359,16 +359,6 @@ static struct cmd_t command_defs[] = "The affiliation may be one of owner, admin, member, outcast or none.", NULL } } }, - { "/affiliations", - cmd_affiliation, parse_args, 0, 0, NULL, - { "/affiliation set|list [affiliation] [jid] [reason]", "Manage room affiliations.", - { "/affiliation set|list [affiliation] [jid] [reason]", - "--------------------------------------------------", - "set affiliation jid [reason]- Set the affiliation of user with jid, with an optional reason.", - "list [affiliation] - List all users with the specified affiliation, or all if none specified.", - "The affiliation may be one of owner, admin, member, outcast or none.", - NULL } } }, - { "/role", cmd_role, parse_args_with_freetext, 1, 4, NULL, { "/role set|list [role] [nick] [reason]", "Manage room roles.", From e65b6b208c72edac79e8502823cec0697cfbb877 Mon Sep 17 00:00:00 2001 From: James Booth Date: Mon, 20 Oct 2014 21:02:58 +0100 Subject: [PATCH 03/17] Removed 0.4.5 todo --- TODO_045 | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 TODO_045 diff --git a/TODO_045 b/TODO_045 deleted file mode 100644 index 011e7164..00000000 --- a/TODO_045 +++ /dev/null @@ -1,3 +0,0 @@ -Test all freetext args -Make form editing commands less verbose -Check /help groupings (add new commands) From 6e232808bdee8d72ddf703709c5f3555a3646d6c Mon Sep 17 00:00:00 2001 From: James Booth Date: Tue, 21 Oct 2014 23:27:23 +0100 Subject: [PATCH 04/17] Added TODO_045 --- TODO_045 | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 TODO_045 diff --git a/TODO_045 b/TODO_045 new file mode 100644 index 00000000..bc4b9593 --- /dev/null +++ b/TODO_045 @@ -0,0 +1,34 @@ +Review room config/admin commands and output +Update /prefs +Update inline help +Update website help +Build with latest libstrophe +Test with valgrind using new commands + +Tag libstrophe release 0.8.7 + https://github.com/strophe/libstrophe/milestones/0.8.7 + +Build profanity archives for 0.4.5 + https://github.com/boothj5/profanity/milestones/0.4.5 + +Test on: + Cygwin + Ubuntu + Debian + Fedora + OpenSuse + OS X + +Notify (libstrophe + profanity): + Arch + Debian + Gentoo + Brew + +Announce: + Mailing list + Google+ + Twitter + Softpedia + Release website changes + From a10c7902604929666d942eaa6b8cf0eb5c9759e6 Mon Sep 17 00:00:00 2001 From: James Booth Date: Tue, 21 Oct 2014 23:32:12 +0100 Subject: [PATCH 05/17] Updated release TODO --- TODO_045 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/TODO_045 b/TODO_045 index bc4b9593..59e71ad9 100644 --- a/TODO_045 +++ b/TODO_045 @@ -1,10 +1,15 @@ Review room config/admin commands and output Update /prefs Update inline help -Update website help Build with latest libstrophe + +Tag 0.4.5.rc1 +Announce release candidate mailing list + Test with valgrind using new commands +Update website help + Tag libstrophe release 0.8.7 https://github.com/strophe/libstrophe/milestones/0.8.7 From a78891b8b3f9439d37bed8ac0e64e97f0cec7ec5 Mon Sep 17 00:00:00 2001 From: James Booth Date: Tue, 21 Oct 2014 23:56:24 +0100 Subject: [PATCH 06/17] Added patch from @pasis for big endian architectures --- src/tools/p_sha1.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/tools/p_sha1.c b/src/tools/p_sha1.c index 7c059c97..1936b89c 100644 --- a/src/tools/p_sha1.c +++ b/src/tools/p_sha1.c @@ -101,19 +101,14 @@ A million repetitions of "a" #include "p_sha1.h" +static uint32_t host_to_be(uint32_t i); void P_SHA1_Transform(uint32_t state[5], const uint8_t buffer[64]); #define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) /* blk0() and blk() perform the initial expand. */ /* I got the idea of expanding during the round function from SSLeay */ -/* FIXME: can we do this in an endian-proof way? */ -#ifdef WORDS_BIGENDIAN -#define blk0(i) block->l[i] -#else -#define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \ - |(rol(block->l[i],8)&0x00FF00FF)) -#endif +#define blk0(i) (block->l[i] = host_to_be(block->l[i])) #define blk(i) (block->l[i&15] = rol(block->l[(i+13)&15]^block->l[(i+8)&15] \ ^block->l[(i+2)&15]^block->l[i&15],1)) @@ -138,6 +133,15 @@ void SHAPrintContext(P_P_SHA1_CTX *context, char *msg){ } #endif /* VERBOSE */ +static uint32_t host_to_be(uint32_t i) +{ + static const union { + unsigned u; + unsigned char c; + } check = {1}; + return check.c ? (rol(i,24)&0xFF00FF00)|(rol(i,8)&0x00FF00FF) : i; +} + /* Hash a single 512-bit block. This is the core of the algorithm. */ void P_SHA1_Transform(uint32_t state[5], const uint8_t buffer[64]) { From 91883fd95d374cea3930f404e2ee3951acc76b4d Mon Sep 17 00:00:00 2001 From: James Booth Date: Wed, 22 Oct 2014 00:52:19 +0100 Subject: [PATCH 07/17] Git hook test --- TODO_045 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TODO_045 b/TODO_045 index 59e71ad9..7994927c 100644 --- a/TODO_045 +++ b/TODO_045 @@ -4,7 +4,7 @@ Update inline help Build with latest libstrophe Tag 0.4.5.rc1 -Announce release candidate mailing list +Announce release candidate at mailing list Test with valgrind using new commands From 552d88b931341b035548923b8e099bd25741064c Mon Sep 17 00:00:00 2001 From: James Booth Date: Thu, 23 Oct 2014 23:07:27 +0100 Subject: [PATCH 08/17] Added /account clear [account] server --- src/command/command.c | 1 + src/command/commands.c | 4 ++++ src/config/accounts.c | 10 ++++++++++ src/config/accounts.h | 1 + 4 files changed, 16 insertions(+) diff --git a/src/command/command.c b/src/command/command.c index 5726b49f..b8daa7eb 100644 --- a/src/command/command.c +++ b/src/command/command.c @@ -1194,6 +1194,7 @@ cmd_init(void) account_clear_ac = autocomplete_new(); autocomplete_add(account_clear_ac, "password"); + autocomplete_add(account_clear_ac, "server"); autocomplete_add(account_clear_ac, "otr"); close_ac = autocomplete_new(); diff --git a/src/command/commands.c b/src/command/commands.c index 40640485..eb361b3e 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -362,6 +362,10 @@ cmd_account(gchar **args, struct cmd_help_t help) accounts_clear_password(account_name); cons_show("Removed password for account %s", account_name); cons_show(""); + } else if (strcmp(property, "server") == 0) { + accounts_clear_server(account_name); + cons_show("Removed server for account %s", account_name); + cons_show(""); } else if (strcmp(property, "otr") == 0) { accounts_clear_otr(account_name); cons_show("OTR policy removed for account %s", account_name); diff --git a/src/config/accounts.c b/src/config/accounts.c index 0bea55b4..fffb45e1 100644 --- a/src/config/accounts.c +++ b/src/config/accounts.c @@ -440,6 +440,15 @@ _accounts_clear_password(const char * const account_name) } } +static void +_accounts_clear_server(const char * const account_name) +{ + if (accounts_account_exists(account_name)) { + g_key_file_remove_key(accounts, account_name, "server", NULL); + _save_accounts(); + } +} + static void _accounts_clear_otr(const char * const account_name) { @@ -862,6 +871,7 @@ accounts_init_module(void) accounts_set_priority_all = _accounts_set_priority_all; accounts_get_priority_for_presence_type = _accounts_get_priority_for_presence_type; accounts_clear_password = _accounts_clear_password; + accounts_clear_server = _accounts_clear_server; accounts_clear_otr = _accounts_clear_otr; accounts_add_otr_policy = _accounts_add_otr_policy; } diff --git a/src/config/accounts.h b/src/config/accounts.h index 299fdf0b..a16c0cfb 100644 --- a/src/config/accounts.h +++ b/src/config/accounts.h @@ -78,6 +78,7 @@ void (*accounts_set_priority_all)(const char * const account_name, const gint va gint (*accounts_get_priority_for_presence_type)(const char * const account_name, resource_presence_t presence_type); void (*accounts_clear_password)(const char * const account_name); +void (*accounts_clear_server)(const char * const account_name); void (*accounts_clear_otr)(const char * const account_name); void (*accounts_add_otr_policy)(const char * const account_name, const char * const contact_jid, const char * const policy); From 84765969e0cab6da881dfecc6dee7de7a038f80c Mon Sep 17 00:00:00 2001 From: James Booth Date: Thu, 23 Oct 2014 23:12:15 +0100 Subject: [PATCH 09/17] Added /account clear [account] port --- src/command/command.c | 1 + src/command/commands.c | 4 ++++ src/config/accounts.c | 10 ++++++++++ src/config/accounts.h | 1 + 4 files changed, 16 insertions(+) diff --git a/src/command/command.c b/src/command/command.c index b8daa7eb..b6fd572c 100644 --- a/src/command/command.c +++ b/src/command/command.c @@ -1195,6 +1195,7 @@ cmd_init(void) account_clear_ac = autocomplete_new(); autocomplete_add(account_clear_ac, "password"); autocomplete_add(account_clear_ac, "server"); + autocomplete_add(account_clear_ac, "port"); autocomplete_add(account_clear_ac, "otr"); close_ac = autocomplete_new(); diff --git a/src/command/commands.c b/src/command/commands.c index eb361b3e..fa0a423e 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -366,6 +366,10 @@ cmd_account(gchar **args, struct cmd_help_t help) accounts_clear_server(account_name); cons_show("Removed server for account %s", account_name); cons_show(""); + } else if (strcmp(property, "port") == 0) { + accounts_clear_port(account_name); + cons_show("Removed port for account %s", account_name); + cons_show(""); } else if (strcmp(property, "otr") == 0) { accounts_clear_otr(account_name); cons_show("OTR policy removed for account %s", account_name); diff --git a/src/config/accounts.c b/src/config/accounts.c index fffb45e1..00cfba18 100644 --- a/src/config/accounts.c +++ b/src/config/accounts.c @@ -449,6 +449,15 @@ _accounts_clear_server(const char * const account_name) } } +static void +_accounts_clear_port(const char * const account_name) +{ + if (accounts_account_exists(account_name)) { + g_key_file_remove_key(accounts, account_name, "port", NULL); + _save_accounts(); + } +} + static void _accounts_clear_otr(const char * const account_name) { @@ -872,6 +881,7 @@ accounts_init_module(void) accounts_get_priority_for_presence_type = _accounts_get_priority_for_presence_type; accounts_clear_password = _accounts_clear_password; accounts_clear_server = _accounts_clear_server; + accounts_clear_port = _accounts_clear_port; accounts_clear_otr = _accounts_clear_otr; accounts_add_otr_policy = _accounts_add_otr_policy; } diff --git a/src/config/accounts.h b/src/config/accounts.h index a16c0cfb..97c125eb 100644 --- a/src/config/accounts.h +++ b/src/config/accounts.h @@ -79,6 +79,7 @@ gint (*accounts_get_priority_for_presence_type)(const char * const account_name, resource_presence_t presence_type); void (*accounts_clear_password)(const char * const account_name); void (*accounts_clear_server)(const char * const account_name); +void (*accounts_clear_port)(const char * const account_name); void (*accounts_clear_otr)(const char * const account_name); void (*accounts_add_otr_policy)(const char * const account_name, const char * const contact_jid, const char * const policy); From c014bb34b3d9e839306c29b68dcbe7ed194aea9e Mon Sep 17 00:00:00 2001 From: James Booth Date: Thu, 23 Oct 2014 23:33:12 +0100 Subject: [PATCH 10/17] Renamed room destroy function --- TODO_045 | 1 + src/command/commands.c | 2 +- src/xmpp/iq.c | 4 ++-- src/xmpp/xmpp.h | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/TODO_045 b/TODO_045 index 7994927c..ecfb5ea9 100644 --- a/TODO_045 +++ b/TODO_045 @@ -1,4 +1,5 @@ Review room config/admin commands and output + /room destroy should show message to owner, and to participants Update /prefs Update inline help Build with latest libstrophe diff --git a/src/command/commands.c b/src/command/commands.c index fa0a423e..670bc1a5 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -2383,7 +2383,7 @@ cmd_room(gchar **args, struct cmd_help_t help) } if (g_strcmp0(args[0], "destroy") == 0) { - iq_destroy_instant_room(room); + iq_destroy_room(room); return TRUE; } diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c index b8530b7c..a33f2291 100644 --- a/src/xmpp/iq.c +++ b/src/xmpp/iq.c @@ -234,7 +234,7 @@ _iq_confirm_instant_room(const char * const room_jid) } static void -_iq_destroy_instant_room(const char * const room_jid) +_iq_destroy_room(const char * const room_jid) { xmpp_conn_t * const conn = connection_get_conn(); xmpp_ctx_t * const ctx = connection_get_ctx(); @@ -1241,7 +1241,7 @@ iq_init_module(void) iq_send_software_version = _iq_send_software_version; iq_set_autoping = _iq_set_autoping; iq_confirm_instant_room = _iq_confirm_instant_room; - iq_destroy_instant_room = _iq_destroy_instant_room; + iq_destroy_room = _iq_destroy_room; iq_send_ping = _iq_send_ping; iq_request_room_config_form = _iq_request_room_config_form; iq_room_config_cancel = _iq_room_config_cancel; diff --git a/src/xmpp/xmpp.h b/src/xmpp/xmpp.h index 1d391cbc..15f0a7a5 100644 --- a/src/xmpp/xmpp.h +++ b/src/xmpp/xmpp.h @@ -185,7 +185,7 @@ void (*iq_disco_info_request)(gchar *jid); void (*iq_disco_items_request)(gchar *jid); void (*iq_set_autoping)(int seconds); void (*iq_confirm_instant_room)(const char * const room_jid); -void (*iq_destroy_instant_room)(const char * const room_jid); +void (*iq_destroy_room)(const char * const room_jid); void (*iq_request_room_config_form)(const char * const room_jid); void (*iq_submit_room_config)(const char * const room, DataForm *form); void (*iq_room_config_cancel)(const char * const room_jid); From 60e3f91cf6325aed0612d06b33de32542aad3dde Mon Sep 17 00:00:00 2001 From: James Booth Date: Thu, 23 Oct 2014 23:56:31 +0100 Subject: [PATCH 11/17] Removed console message when joining locked rooms --- TODO_045 | 1 - src/ui/core.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/TODO_045 b/TODO_045 index ecfb5ea9..7994927c 100644 --- a/TODO_045 +++ b/TODO_045 @@ -1,5 +1,4 @@ Review room config/admin commands and output - /room destroy should show message to owner, and to participants Update /prefs Update inline help Build with latest libstrophe diff --git a/src/ui/core.c b/src/ui/core.c index c6971aca..0335fdde 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -1841,8 +1841,6 @@ _ui_room_requires_config(const char * const room_jid) } else { status_bar_new(num); } - - cons_show("Room created, locked: %s (%d)", room_jid, ui_index); } } From fa834d003cb1c6fc45a61dd0d601e8824e17f364 Mon Sep 17 00:00:00 2001 From: James Booth Date: Thu, 23 Oct 2014 23:58:25 +0100 Subject: [PATCH 12/17] Added locked messages when joining rooms --- src/ui/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/core.c b/src/ui/core.c index 0335fdde..06ef4762 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -1824,7 +1824,7 @@ _ui_room_requires_config(const char * const room_jid) win_save_print(window, '-', NULL, 0, 0, "", ""); win_save_vprint(window, '!', NULL, 0, COLOUR_ROOMINFO, "", - "Room requires configuration."); + "Room locked, requires configuration."); win_save_vprint(window, '!', NULL, 0, COLOUR_ROOMINFO, "", "Use '/room accept' to accept the defaults"); win_save_vprint(window, '!', NULL, 0, COLOUR_ROOMINFO, "", From 0b61c759697af1593af13daa461dcec35617686b Mon Sep 17 00:00:00 2001 From: James Booth Date: Fri, 24 Oct 2014 00:00:37 +0100 Subject: [PATCH 13/17] Removed room unlocked console message --- src/command/commands.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/command/commands.c b/src/command/commands.c index 670bc1a5..d7ee7854 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -2377,7 +2377,6 @@ cmd_room(gchar **args, struct cmd_help_t help) iq_confirm_instant_room(room); muc_set_requires_config(room, FALSE); win_save_print(window, '!', NULL, 0, COLOUR_ROOMINFO, "", "Room unlocked."); - cons_show("Room unlocked: %s (%d)", room, ui_index); return TRUE; } } From 5fc35bd6a64e17db7d6ee4cfcc1077469ead62f4 Mon Sep 17 00:00:00 2001 From: James Booth Date: Fri, 24 Oct 2014 00:21:00 +0100 Subject: [PATCH 14/17] Changed room help colour, added whitespace after invalid field setting --- src/command/commands.c | 14 ++++++++++++++ src/ui/core.c | 9 +++++---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/command/commands.c b/src/command/commands.c index d7ee7854..0dc26fff 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -1835,6 +1835,7 @@ cmd_form_field(char *tag, gchar **args) } else { ui_current_print_line("Invalid command, usage:"); ui_show_form_field_help(current, form, tag); + ui_current_print_line(""); } break; @@ -1845,6 +1846,7 @@ cmd_form_field(char *tag, gchar **args) if (value == NULL) { ui_current_print_line("Invalid command, usage:"); ui_show_form_field_help(current, form, tag); + ui_current_print_line(""); } else { form_set_value(form, tag, value); ui_current_print_line("Field updated..."); @@ -1856,6 +1858,7 @@ cmd_form_field(char *tag, gchar **args) if ((value == NULL) || !form_field_contains_option(form, tag, value)) { ui_current_print_line("Invalid command, usage:"); ui_show_form_field_help(current, form, tag); + ui_current_print_line(""); } else { form_set_value(form, tag, value); ui_current_print_line("Field updated..."); @@ -1871,11 +1874,13 @@ cmd_form_field(char *tag, gchar **args) if ((g_strcmp0(cmd, "add") != 0) && (g_strcmp0(cmd, "remove"))) { ui_current_print_line("Invalid command, usage:"); ui_show_form_field_help(current, form, tag); + ui_current_print_line(""); break; } if (value == NULL) { ui_current_print_line("Invalid command, usage:"); ui_show_form_field_help(current, form, tag); + ui_current_print_line(""); break; } if (g_strcmp0(cmd, "add") == 0) { @@ -1888,11 +1893,13 @@ cmd_form_field(char *tag, gchar **args) if (!g_str_has_prefix(value, "val")) { ui_current_print_line("Invalid command, usage:"); ui_show_form_field_help(current, form, tag); + ui_current_print_line(""); break; } if (strlen(value) < 4) { ui_current_print_line("Invalid command, usage:"); ui_show_form_field_help(current, form, tag); + ui_current_print_line(""); break; } @@ -1900,6 +1907,7 @@ cmd_form_field(char *tag, gchar **args) if ((index < 1) || (index > form_get_value_count(form, tag))) { ui_current_print_line("Invalid command, usage:"); ui_show_form_field_help(current, form, tag); + ui_current_print_line(""); break; } @@ -1920,11 +1928,13 @@ cmd_form_field(char *tag, gchar **args) if ((g_strcmp0(cmd, "add") != 0) && (g_strcmp0(cmd, "remove"))) { ui_current_print_line("Invalid command, usage:"); ui_show_form_field_help(current, form, tag); + ui_current_print_line(""); break; } if (value == NULL) { ui_current_print_line("Invalid command, usage:"); ui_show_form_field_help(current, form, tag); + ui_current_print_line(""); break; } if (g_strcmp0(args[0], "add") == 0) { @@ -1940,6 +1950,7 @@ cmd_form_field(char *tag, gchar **args) } else { ui_current_print_line("Invalid command, usage:"); ui_show_form_field_help(current, form, tag); + ui_current_print_line(""); } break; } @@ -1956,6 +1967,7 @@ cmd_form_field(char *tag, gchar **args) } else { ui_current_print_line("Invalid command, usage:"); ui_show_form_field_help(current, form, tag); + ui_current_print_line(""); } } break; @@ -1967,11 +1979,13 @@ cmd_form_field(char *tag, gchar **args) if ((g_strcmp0(cmd, "add") != 0) && (g_strcmp0(cmd, "remove"))) { ui_current_print_line("Invalid command, usage:"); ui_show_form_field_help(current, form, tag); + ui_current_print_line(""); break; } if (value == NULL) { ui_current_print_line("Invalid command, usage:"); ui_show_form_field_help(current, form, tag); + ui_current_print_line(""); break; } if (g_strcmp0(args[0], "add") == 0) { diff --git a/src/ui/core.c b/src/ui/core.c index 06ef4762..f50ad982 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -2556,7 +2556,8 @@ static void _ui_show_form(ProfWin *window, const char * const room, DataForm *form) { if (form->title != NULL) { - win_save_print(window, '-', NULL, 0, 0, "", form->title); + win_save_print(window, '-', NULL, NO_EOL, 0, "", "Form title: "); + win_save_print(window, '-', NULL, NO_DATE, 0, "", form->title); } else { win_save_vprint(window, '-', NULL, 0, 0, "", "Configuration for room %s.", room); } @@ -2607,9 +2608,9 @@ _ui_handle_room_configuration(const char * const room, DataForm *form) ui_show_form(window, room, form); win_save_print(window, '-', NULL, 0, 0, "", ""); - win_save_print(window, '-', NULL, 0, COLOUR_ROOMINFO, "", "Use '/form submit' to save changes."); - win_save_print(window, '-', NULL, 0, COLOUR_ROOMINFO, "", "Use '/form cancel' to cancel changes."); - win_save_print(window, '-', NULL, 0, COLOUR_ROOMINFO, "", "See '/form help' for more information."); + win_save_print(window, '-', NULL, 0, 0, "", "Use '/form submit' to save changes."); + win_save_print(window, '-', NULL, 0, 0, "", "Use '/form cancel' to cancel changes."); + win_save_print(window, '-', NULL, 0, 0, "", "See '/form help' for more information."); win_save_print(window, '-', NULL, 0, 0, "", ""); } From bc563851aa75e30b4437aec640ae18cd3832312b Mon Sep 17 00:00:00 2001 From: James Booth Date: Fri, 24 Oct 2014 19:10:29 +0100 Subject: [PATCH 15/17] Updated privileges help --- TODO_045 | 1 - src/command/command.c | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/TODO_045 b/TODO_045 index 7994927c..4e663269 100644 --- a/TODO_045 +++ b/TODO_045 @@ -1,4 +1,3 @@ -Review room config/admin commands and output Update /prefs Update inline help Build with latest libstrophe diff --git a/src/command/command.c b/src/command/command.c index b6fd572c..44387e16 100644 --- a/src/command/command.c +++ b/src/command/command.c @@ -551,10 +551,7 @@ static struct cmd_t command_defs[] = { "/privileges on|off", "Show occupant privileges in chat rooms.", { "/privileges on|off", "---------------------------", - "If enabled:", - "The room roster will be broken down my role.", - "An occupants role and affiliation will be shown when they join a room.", - "Changes to occupant privileges will be shown in the chat room.", + "If enabled the room roster will be broken down my role, and role information will be showin in the room.", NULL } } }, { "/beep", From 25b673a4225ca97d7999de554a87a6a71793af4a Mon Sep 17 00:00:00 2001 From: James Booth Date: Fri, 24 Oct 2014 19:14:38 +0100 Subject: [PATCH 16/17] Updated /form help --- src/command/command.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/command/command.c b/src/command/command.c index 44387e16..62bf8dfb 100644 --- a/src/command/command.c +++ b/src/command/command.c @@ -381,9 +381,9 @@ static struct cmd_t command_defs[] = { "/form", cmd_form, parse_args, 1, 2, NULL, - { "/form show|submit|cancel|help", "Form handling.", - { "/form show|submit|cancel|help", - "-----------------------------", + { "/form show|submit|cancel|help [tag]", "Form handling.", + { "/form show|submit|cancel|help [tag]", + "-----------------------------------", "show - Show the current form.", "submit - Submit the current form.", "cancel - Cancel changes to the current form.", From fea8945953056012926285ecd7205b69e2a520e6 Mon Sep 17 00:00:00 2001 From: James Booth Date: Fri, 24 Oct 2014 19:23:37 +0100 Subject: [PATCH 17/17] Updated /info help --- TODO_045 | 1 - src/command/command.c | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/TODO_045 b/TODO_045 index 4e663269..8e4a794e 100644 --- a/TODO_045 +++ b/TODO_045 @@ -1,4 +1,3 @@ -Update /prefs Update inline help Build with latest libstrophe diff --git a/src/command/command.c b/src/command/command.c index 62bf8dfb..178e90b1 100644 --- a/src/command/command.c +++ b/src/command/command.c @@ -207,11 +207,14 @@ static struct cmd_t command_defs[] = { "/info", cmd_info, parse_args, 0, 1, NULL, - { "/info [contact|nick]", "Show basic information about a contact, or room member.", + { "/info [contact|nick]", "Show basic information about a contact, room, or room member.", { "/info [contact|nick]", "--------------------", - "Show information including current subscription status and summary information for each connected resource.", + "Show basic information about a contact, room, or room member.", + "If in the console, a contact must be specified.", "If in a chat window the parameter is not required, the current recipient will be used.", + "If in a chat room, providing no arguments will display information about the room.", + "If in a chat room, supplying a nick will show information about the occupant.", "", "Example : /info mybuddy@chat.server.org", "Example : /info kai",