From b736883ac4a1ff5ad9ad92b2676360de545747f8 Mon Sep 17 00:00:00 2001 From: James Booth Date: Fri, 24 Jul 2015 21:20:55 +0100 Subject: [PATCH] Added roster to new help format --- src/command/command.c | 96 ++++++++++++++++++++++++------------------- 1 file changed, 54 insertions(+), 42 deletions(-) diff --git a/src/command/command.c b/src/command/command.c index 7671fa0c..ef785089 100644 --- a/src/command/command.c +++ b/src/command/command.c @@ -198,10 +198,10 @@ static struct cmd_t command_defs[] = "If the message is omitted, a new chat window will be opened without sending a message. " "Use quotes if the nickname includes spaces.", { - { "", "Open chat window with contact, by JID or nickname." }, + { "", "Open chat window with contact, by JID or nickname." }, { " []", "Send message to contact, by JID or nickname." }, - { "", "Open private chat window with chat room occupant." }, - { " []", "Send a private message to a chat room occupant." }, + { "", "Open private chat window with chat room occupant." }, + { " []", "Send a private message to a chat room occupant." }, END_ARGS }, { "/msg myfriend@server.com Hey, here's a message!", @@ -211,48 +211,60 @@ static struct cmd_t command_defs[] = NULL } } }, - // OLD STYLE - - - { "/roster", cmd_roster, parse_args_with_freetext, 0, 3, NULL, - { "/roster [command] [args..]", "Manage your roster.", - { "/roster [command] [args..]", - "--------------------------", - "Manage your roster, and roster display settings.", - "", - "command - online|show|hide|by|size|add|remove|remove_all|nick|clearnick", - "", - "online : Show all online contacts in your roster.", - "show : Show the roster panel.", - "show offline : Show offline contacts in the roster panel.", - "show resource : Show contact's connected resources in the roster panel.", - "show empty : When grouping by presence, show empty presence groups", - "hide : Hide the roster panel.", - "hide offline : Hide offline contacts in the roster panel.", - "hide resource : Hide contact's connected resources in the roster panel.", - "hide empty : When grouping by presence, hide empty presence groups", - "by group : Group contacts in the roster panel by roster group.", - "by presence : Group contacts in the roster panel by presence.", - "by none : No grouping in the roster panel.", - "size : Percentage of the screen taken up by the roster (1-99).", - "add jid [nick] : Add a new item to the roster.", - "remove jid : Removes an item from the roster.", - "remove_all contacts : Remove all items from roster.", - "nick jid nick : Change a contacts nickname.", - "clearnick jid : Removes the current nickname.", - "", + { NULL, NULL, { NULL }, + { + "/roster", + "/roster online", + "/roster show [offline|resource|empty]", + "/roster hide [offline|resource|empty]", + "/roster by group|presence|none", + "/roster size ", + "/roster add []", + "/roster remove ", + "/roster remove_all contacts", + "/roster nick ", + "/roster clearnick ", + NULL + }, + "Manage your roster, and roster display settings. " "Passing no arguments lists all contacts in your roster.", - "", - "Example: /roster (show your roster)", - "Example: /roster add someone@contacts.org (add the contact)", - "Example: /roster add someone@contacts.org Buddy (add the contact with nickname 'Buddy')", - "Example: /roster remove someone@contacts.org (remove the contact)", - "Example: /roster nick myfriend@chat.org My Friend", - "Example: /roster clearnick kai@server.com (clears nickname)", - NULL, - NULL, NULL, NULL, NULL } } }, + { + { "online", "Show all online contacts in your roster." }, + { "show", "Show the roster panel." }, + { "show offline", "Show offline contacts in the roster panel." }, + { "show resource", "Show contact's connected resources in the roster panel." }, + { "show empty", "When grouping by presence, show empty presence groups." }, + { "show empty", "When grouping by presence, show empty presence groups." }, + { "hide", "Hide the roster panel." }, + { "hide offline", "Hide offline contacts in the roster panel." }, + { "hide resource", "Hide contact's connected resources in the roster panel." }, + { "hide empty", "When grouping by presence, hide empty presence groups." }, + { "by group", "Group contacts in the roster panel by roster group." }, + { "by presence", "Group contacts in the roster panel by presence." }, + { "by none", "No grouping in the roster panel." }, + { "size ", "Percentage of the screen taken up by the roster (1-99)." }, + { "add []", "Add a new item to the roster." }, + { "remove ", "Removes an item from the roster." }, + { "remove_all contacts", "Remove all items from roster." }, + { "nick ", "Change a contacts nickname." }, + { "clearnick ", "Removes the current nickname." }, + END_ARGS }, + { + "/roster", + "/roster add someone@contacts.org", + "/roster add someone@contacts.org Buddy", + "/roster remove someone@contacts.org", + "/roster nick myfriend@chat.org My Friend", + "/roster clearnick kai@server.com", + "/roster size 15", + NULL } } + }, + + + // OLD STYLE + { "/group", cmd_group, parse_args_with_freetext, 0, 3, NULL,