1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Added command definition macros

This commit is contained in:
James Booth 2015-07-26 19:39:12 +01:00
parent bd32f4dc47
commit 6986a02ff3

View File

@ -104,117 +104,100 @@ static char * _receipts_autocomplete(ProfWin *window, const char * const input);
GHashTable *commands = NULL; GHashTable *commands = NULL;
#define CMD_SYN(...) { { __VA_ARGS__, NULL },
#define CMD_DESC(desc) desc,
#define CMD_NOARGS() { { NULL, NULL } },
#define CMD_ARGS(...) { __VA_ARGS__, { NULL, NULL } },
#define CMD_NOEXAMPLES() { NULL } }
#define CMD_EXAMPLES(...) { __VA_ARGS__, NULL } }
#define END_ARGS { NULL, NULL } #define END_ARGS { NULL, NULL }
/* /*
* Command list * Command list
*/ */
static struct cmd_t command_defs[] = static struct cmd_t command_defs[] =
{ {
// NEW STYLE
{ "/help", { "/help",
cmd_help, parse_args, 0, 1, NULL, cmd_help, parse_args, 0, 1, NULL,
{ CMD_SYN(
{ "/help [<area>|<command>]")
"/help [<area>|<command>]", CMD_DESC(
NULL "Help on using Profanity. Passing no arguments list help areas.")
}, CMD_ARGS(
"Help on using Profanity. Passing no arguments list help areas.",
{
{ "<area>", "Summary help for commands in a certain area of functionality." }, { "<area>", "Summary help for commands in a certain area of functionality." },
{ "<command>", "Full help for a specific command, for example '/help connect'." }, { "<command>", "Full help for a specific command, for example '/help connect'." })
END_ARGS }, CMD_EXAMPLES(
{
"/help commands", "/help commands",
"/help presence", "/help presence",
"/help who", "/help who")
NULL } }
}, },
{ "/about", { "/about",
cmd_about, parse_args, 0, 0, NULL, cmd_about, parse_args, 0, 0, NULL,
{ CMD_SYN(
{ "/about")
"/about", CMD_DESC(
NULL "Show version and license information.")
}, CMD_NOARGS()
"Show version and license information.", CMD_NOEXAMPLES()
{
END_ARGS },
{
NULL } }
}, },
{ "/connect", { "/connect",
cmd_connect, parse_args, 0, 5, NULL, cmd_connect, parse_args, 0, 5, NULL,
{ CMD_SYN(
{
"/connect [<account>]", "/connect [<account>]",
"/connect <account> [server <server>] [port <port>]", "/connect <account> [server <server>] [port <port>]")
NULL CMD_DESC(
},
"Login to a chat service. " "Login to a chat service. "
"If no account is specified, the default is used if one is configured. " "If no account is specified, the default is used if one is configured. "
"A local account is created with the JID as it's name if it doesn't already exist.", "A local account is created with the JID as it's name if it doesn't already exist.")
{ CMD_ARGS(
{ "<account>", "The local account you wish to connect with, or a JID if connecting for the first time." }, { "<account>", "The local account you wish to connect with, or a JID if connecting for the first time." },
{ "server <server>", "Supply a server if it is different to the domain part of your JID." }, { "server <server>", "Supply a server if it is different to the domain part of your JID." },
{ "port <port>", "The port to use if different to the default (5222, or 5223 for SSL)." }, { "port <port>", "The port to use if different to the default (5222, or 5223 for SSL)." })
END_ARGS }, CMD_EXAMPLES(
{
"/connect", "/connect",
"/connect myuser@gmail.com", "/connect myuser@gmail.com",
"/connect myuser@mycompany.com server talk.google.com", "/connect myuser@mycompany.com server talk.google.com",
"/connect bob@someplace port 5678", "/connect bob@someplace port 5678",
"/connect me@chatty server chatty.com port 5443", "/connect me@chatty server chatty.com port 5443")
NULL } }
}, },
{ "/disconnect", { "/disconnect",
cmd_disconnect, parse_args, 0, 0, NULL, cmd_disconnect, parse_args, 0, 0, NULL,
{ CMD_SYN(
{ "/disconnect")
"/disconnect", CMD_DESC(
NULL "Disconnect from the current chat service.")
}, CMD_NOARGS()
"Disconnect from the current chat service.", CMD_NOEXAMPLES()
{
END_ARGS },
{
NULL } }
}, },
{ "/msg", { "/msg",
cmd_msg, parse_args_with_freetext, 1, 2, NULL, cmd_msg, parse_args_with_freetext, 1, 2, NULL,
{ CMD_SYN(
{
"/msg <contact> [<message>]", "/msg <contact> [<message>]",
"/msg <nick> [<message>]", "/msg <nick> [<message>]")
NULL CMD_DESC(
},
"Send a one to one chat message, or a private message to a chat room occupant. " "Send a one to one chat message, or a private message to a chat room occupant. "
"If the message is omitted, a new chat window will be opened without sending a message. " "If the message is omitted, a new chat window will be opened without sending a message. "
"Use quotes if the nickname includes spaces.", "Use quotes if the nickname includes spaces.")
{ CMD_ARGS(
{ "<contact>", "Open chat window with contact, by JID or nickname." }, { "<contact>", "Open chat window with contact, by JID or nickname." },
{ "<contact> [<message>]", "Send message to contact, by JID or nickname." }, { "<contact> [<message>]", "Send message to contact, by JID or nickname." },
{ "<nick>", "Open private chat window with chat room occupant." }, { "<nick>", "Open private chat window with chat room occupant." },
{ "<nick> [<message>]", "Send a private message to a chat room occupant." }, { "<nick> [<message>]", "Send a private message to a chat room occupant." })
END_ARGS }, CMD_EXAMPLES(
{
"/msg myfriend@server.com Hey, here's a message!", "/msg myfriend@server.com Hey, here's a message!",
"/msg otherfriend@server.com", "/msg otherfriend@server.com",
"/msg Bob Here is a private message", "/msg Bob Here is a private message",
"/msg \"My Friend\" Hi, how are you?", "/msg \"My Friend\" Hi, how are you?")
NULL } }
}, },
{ "/roster", { "/roster",
cmd_roster, parse_args_with_freetext, 0, 3, NULL, cmd_roster, parse_args_with_freetext, 0, 3, NULL,
{ CMD_SYN(
{
"/roster", "/roster",
"/roster online", "/roster online",
"/roster show [offline|resource|empty]", "/roster show [offline|resource|empty]",
@ -225,12 +208,11 @@ static struct cmd_t command_defs[] =
"/roster remove <jid>", "/roster remove <jid>",
"/roster remove_all contacts", "/roster remove_all contacts",
"/roster nick <jid> <nick>", "/roster nick <jid> <nick>",
"/roster clearnick <jid>", "/roster clearnick <jid>")
NULL CMD_DESC(
},
"Manage your roster, and roster display settings. " "Manage your roster, and roster display settings. "
"Passing no arguments lists all contacts in your roster.", "Passing no arguments lists all contacts in your roster.")
{ CMD_ARGS(
{ "online", "Show all online contacts in your roster." }, { "online", "Show all online contacts in your roster." },
{ "show", "Show the roster panel." }, { "show", "Show the roster panel." },
{ "show offline", "Show offline contacts in the roster panel." }, { "show offline", "Show offline contacts in the roster panel." },
@ -249,396 +231,314 @@ static struct cmd_t command_defs[] =
{ "remove <jid>", "Removes an item from the roster." }, { "remove <jid>", "Removes an item from the roster." },
{ "remove_all contacts", "Remove all items from roster." }, { "remove_all contacts", "Remove all items from roster." },
{ "nick <jid> <nick>", "Change a contacts nickname." }, { "nick <jid> <nick>", "Change a contacts nickname." },
{ "clearnick <jid>", "Removes the current nickname." }, { "clearnick <jid>", "Removes the current nickname." })
END_ARGS }, CMD_EXAMPLES(
{
"/roster", "/roster",
"/roster add someone@contacts.org", "/roster add someone@contacts.org",
"/roster add someone@contacts.org Buddy", "/roster add someone@contacts.org Buddy",
"/roster remove someone@contacts.org", "/roster remove someone@contacts.org",
"/roster nick myfriend@chat.org My Friend", "/roster nick myfriend@chat.org My Friend",
"/roster clearnick kai@server.com", "/roster clearnick kai@server.com",
"/roster size 15", "/roster size 15")
NULL } }
}, },
{ "/group", { "/group",
cmd_group, parse_args_with_freetext, 0, 3, NULL, cmd_group, parse_args_with_freetext, 0, 3, NULL,
{ CMD_SYN(
{
"/group", "/group",
"/group show <group>", "/group show <group>",
"/group remove <group> <contact>", "/group remove <group> <contact>")
NULL CMD_DESC(
},
"View, add to, and remove from roster groups. " "View, add to, and remove from roster groups. "
"Passing no argument will list all roster groups.", "Passing no argument will list all roster groups.")
{ CMD_ARGS(
{ "show <group>", "List all roster items a group." }, { "show <group>", "List all roster items a group." },
{ "add <group> <contact>", "Add a contact to a group." }, { "add <group> <contact>", "Add a contact to a group." },
{ "remove <group> <contact>", "Remove a contact from a group." }, { "remove <group> <contact>", "Remove a contact from a group." })
END_ARGS }, CMD_EXAMPLES(
{
"/group", "/group",
"/group show friends", "/group show friends",
"/group add friends newfriend@server.org", "/group add friends newfriend@server.org",
"/group add family Brother", "/group add family Brother",
"/group remove colleagues boss@work.com", "/group remove colleagues boss@work.com")
NULL } }
}, },
{ "/info", { "/info",
cmd_info, parse_args, 0, 1, NULL, cmd_info, parse_args, 0, 1, NULL,
{ CMD_SYN(
{
"/info", "/info",
"/info <contact>|<nick>", "/info <contact>|<nick>")
NULL CMD_DESC(
},
"Show information about a contact, room, or room member. " "Show information about a contact, room, or room member. "
"Passing no argument in a chat window will use the current recipient. " "Passing no argument in a chat window will use the current recipient. "
"Passing no argument in a chat room will display information about the room.", "Passing no argument in a chat room will display information about the room.")
{ CMD_ARGS(
{ "<contact>", "The contact you wish to view information about." }, { "<contact>", "The contact you wish to view information about." },
{ "<nick>", "When in a chat room, the occupant you wish to view information about." }, { "<nick>", "When in a chat room, the occupant you wish to view information about." })
END_ARGS }, CMD_EXAMPLES(
{
"/info mybuddy@chat.server.org", "/info mybuddy@chat.server.org",
"/info kai", "/info kai")
NULL } }
}, },
{ "/caps", { "/caps",
cmd_caps, parse_args, 0, 1, NULL, cmd_caps, parse_args, 0, 1, NULL,
{ CMD_SYN(
{
"/caps", "/caps",
"/caps <fulljid>|<nick>", "/caps <fulljid>|<nick>")
NULL CMD_DESC(
},
"Find out a contacts, or room members client software capabilities. " "Find out a contacts, or room members client software capabilities. "
"If in private chat initiated from a chat room, no parameter is required.", "If in private chat initiated from a chat room, no parameter is required.")
{ CMD_ARGS(
{ "<fulljid>", "If in the console or a chat window, the full JID for which you wish to see capabilities." }, { "<fulljid>", "If in the console or a chat window, the full JID for which you wish to see capabilities." },
{ "<nick>", "If in a chat room, nickname for which you wish to see capabilities." }, { "<nick>", "If in a chat room, nickname for which you wish to see capabilities." })
END_ARGS }, CMD_EXAMPLES(
{
"/caps mybuddy@chat.server.org/laptop", "/caps mybuddy@chat.server.org/laptop",
"/caps mybuddy@chat.server.org/phone", "/caps mybuddy@chat.server.org/phone",
"/caps bruce", "/caps bruce")
NULL } }
}, },
{ "/software", { "/software",
cmd_software, parse_args, 0, 1, NULL, cmd_software, parse_args, 0, 1, NULL,
{ CMD_SYN(
{
"/software", "/software",
"/software <fulljid>|<nick>", "/software <fulljid>|<nick>")
NULL CMD_DESC(
},
"Find out a contact, or room members software version information. " "Find out a contact, or room members software version information. "
"If in private chat initiated from a chat room, no parameter is required. " "If in private chat initiated from a chat room, no parameter is required. "
"If the contact's software does not support software version requests, nothing will be displayed.", "If the contact's software does not support software version requests, nothing will be displayed.")
{ CMD_ARGS(
{ "<fulljid>", "If in the console or a chat window, the full JID for which you wish to see software information." }, { "<fulljid>", "If in the console or a chat window, the full JID for which you wish to see software information." },
{ "<nick>", "If in a chat room, nickname for which you wish to see software information." }, { "<nick>", "If in a chat room, nickname for which you wish to see software information." })
END_ARGS }, CMD_EXAMPLES(
{
"/software mybuddy@chat.server.org/laptop", "/software mybuddy@chat.server.org/laptop",
"/software mybuddy@chat.server.org/phone", "/software mybuddy@chat.server.org/phone",
"/software bruce", "/software bruce")
NULL } }
}, },
{ "/status", { "/status",
cmd_status, parse_args, 0, 1, NULL, cmd_status, parse_args, 0, 1, NULL,
{ CMD_SYN(
{
"/status", "/status",
"/status <contact>|<nick>", "/status <contact>|<nick>")
NULL CMD_DESC(
},
"Find out a contact, or room members presence information. " "Find out a contact, or room members presence information. "
"If in a chat window the parameter is not required, the current recipient will be used.", "If in a chat window the parameter is not required, the current recipient will be used.")
{ CMD_ARGS(
{ "<contact>", "The contact who's presence you which to see." }, { "<contact>", "The contact who's presence you which to see." },
{ "<nick>", "If in a chat room, the occupant who's presence you wish to see." }, { "<nick>", "If in a chat room, the occupant who's presence you wish to see." })
END_ARGS }, CMD_EXAMPLES(
{
"/status buddy@server.com", "/status buddy@server.com",
"/status jon", "/status jon")
NULL } }
}, },
{ "/resource", { "/resource",
cmd_resource, parse_args, 1, 2, &cons_resource_setting, cmd_resource, parse_args, 1, 2, &cons_resource_setting,
{ CMD_SYN(
{
"/resource set <resource>", "/resource set <resource>",
"/resource off", "/resource off",
"/resource title on|off", "/resource title on|off",
"/resource message on|off", "/resource message on|off")
NULL CMD_DESC(
}, "Override chat session resource, and manage resource display settings.")
"Override chat session resource, and manage resource display settings.", CMD_ARGS(
{
{ "set <resource>", "Set the resource to which messages will be sent." }, { "set <resource>", "Set the resource to which messages will be sent." },
{ "off", "Let the server choose which resource to route messages to." }, { "off", "Let the server choose which resource to route messages to." },
{ "title on|off", "Show or hide the current resource in the titlebar." }, { "title on|off", "Show or hide the current resource in the titlebar." },
{ "message on|off", "Show or hide the resource when showing an incoming message." }, { "message on|off", "Show or hide the resource when showing an incoming message." })
END_ARGS }, CMD_NOEXAMPLES()
{
NULL } }
}, },
{ "/join", { "/join",
cmd_join, parse_args, 0, 5, NULL, cmd_join, parse_args, 0, 5, NULL,
{ CMD_SYN(
{
"/join", "/join",
"/join <room> [nick <nick>] [password <password>]", "/join <room> [nick <nick>] [password <password>]")
NULL CMD_DESC(
},
"Join a chat room at the conference server. " "Join a chat room at the conference server. "
"If no room is supplied, a generated name will be used with the format private-chat-[UUID]. " "If no room is supplied, a generated name will be used with the format private-chat-[UUID]. "
"If the domain part is not included in the room name, the account preference 'muc.service' will be used. " "If the domain part is not included in the room name, the account preference 'muc.service' will be used. "
"If no nickname is specified the account preference 'muc.nick' will be used which by default is the localpart of your JID. " "If no nickname is specified the account preference 'muc.nick' will be used which by default is the localpart of your JID. "
"If the room doesn't exist, and the server allows it, a new one will be created.", "If the room doesn't exist, and the server allows it, a new one will be created.")
{ CMD_ARGS(
{ "<room>", "The chat room to join." }, { "<room>", "The chat room to join." },
{ "nick <nick>", "Nickname to use in the room." }, { "nick <nick>", "Nickname to use in the room." },
{ "password <password>", "Password if the room requires one." }, { "password <password>", "Password if the room requires one." })
END_ARGS }, CMD_EXAMPLES(
{
"/join", "/join",
"/join jdev@conference.jabber.org", "/join jdev@conference.jabber.org",
"/join jdev@conference.jabber.org nick mynick", "/join jdev@conference.jabber.org nick mynick",
"/join private@conference.jabber.org nick mynick password mypassword", "/join private@conference.jabber.org nick mynick password mypassword",
"/join jdev", "/join jdev")
NULL } }
}, },
{ "/leave", { "/leave",
cmd_leave, parse_args, 0, 0, NULL, cmd_leave, parse_args, 0, 0, NULL,
{ CMD_SYN(
{ "/leave")
"/leave", CMD_DESC(
NULL "Leave the current chat room.")
}, CMD_NOARGS()
"Leave the current chat room.", CMD_NOEXAMPLES()
{
END_ARGS },
{
NULL } }
}, },
{ "/invite", { "/invite",
cmd_invite, parse_args_with_freetext, 1, 2, NULL, cmd_invite, parse_args_with_freetext, 1, 2, NULL,
{ CMD_SYN(
{ "/invite <contact> [<message>]")
"/invite <contact> [<message>]", CMD_DESC(
NULL "Send an invite to a contact for the current chat room.")
}, CMD_ARGS(
"Send an invite to a contact for the current chat room.",
{
{ "<contact>", "The contact you wish to invite." }, { "<contact>", "The contact you wish to invite." },
{ "<message>", "An optional message to send with the invite." }, { "<message>", "An optional message to send with the invite." })
END_ARGS }, CMD_NOEXAMPLES()
{
NULL } }
}, },
{ "/invites", { "/invites",
cmd_invites, parse_args_with_freetext, 0, 0, NULL, cmd_invites, parse_args_with_freetext, 0, 0, NULL,
{ CMD_SYN(
{ "/invites")
"/invites", CMD_DESC(
NULL "Show all rooms that you have been invited to, and not accepted or declined.")
}, CMD_NOARGS()
"Show all rooms that you have been invited to, and not accepted or declined.", CMD_NOEXAMPLES()
{
END_ARGS },
{
NULL } }
}, },
{ "/decline", { "/decline",
cmd_decline, parse_args_with_freetext, 1, 1, NULL, cmd_decline, parse_args_with_freetext, 1, 1, NULL,
{ CMD_SYN(
{ "/decline <room>")
"/decline <room>", CMD_DESC(
NULL "Decline a chat room invitation.")
}, CMD_ARGS(
"Decline a chat room invitation.", { "<room>", "The room for the invite you wish to decline." })
{ CMD_NOEXAMPLES()
{ "<room>", "The room for the invite you wish to decline." },
END_ARGS },
{
NULL } }
}, },
{ "/room", { "/room",
cmd_room, parse_args, 1, 1, NULL, cmd_room, parse_args, 1, 1, NULL,
{ CMD_SYN(
{ "/room accept|destroy|config")
"/room accept|destroy|config", CMD_DESC(
NULL "Chat room configuration.")
}, CMD_ARGS(
"Chat room configuration.",
{
{ "accept", "Accept default room configuration." }, { "accept", "Accept default room configuration." },
{ "destroy", "Reject default room configuration, and destroy the room." }, { "destroy", "Reject default room configuration, and destroy the room." },
{ "config", "Edit room configuration." }, { "config", "Edit room configuration." })
END_ARGS }, CMD_NOEXAMPLES()
{
NULL } }
}, },
{ "/kick", { "/kick",
cmd_kick, parse_args_with_freetext, 1, 2, NULL, cmd_kick, parse_args_with_freetext, 1, 2, NULL,
{ CMD_SYN(
{ "/kick <nick> [<reason>]")
"/kick <nick> [<reason>]", CMD_DESC(
NULL "Kick occupant from chat room.")
}, CMD_ARGS(
"Kick occupant from chat room.",
{
{ "<nick>", "Nickname of the occupant to kick from the room." }, { "<nick>", "Nickname of the occupant to kick from the room." },
{ "<reason>", "Optional reason for kicking the occupant." }, { "<reason>", "Optional reason for kicking the occupant." })
END_ARGS }, CMD_NOEXAMPLES()
{
NULL } }
}, },
{ "/ban", { "/ban",
cmd_ban, parse_args_with_freetext, 1, 2, NULL, cmd_ban, parse_args_with_freetext, 1, 2, NULL,
{ CMD_SYN(
{ "/ban <jid> [<reason>]")
"/ban <jid> [<reason>]", CMD_DESC(
NULL "Ban user from chat room.")
}, CMD_ARGS(
"Ban user from chat room.",
{
{ "<jid>", "Bare JID of the user to ban from the room." }, { "<jid>", "Bare JID of the user to ban from the room." },
{ "<reason>", "Optional reason for banning the user." }, { "<reason>", "Optional reason for banning the user." })
END_ARGS }, CMD_NOEXAMPLES()
{
NULL } }
}, },
{ "/subject", { "/subject",
cmd_subject, parse_args_with_freetext, 0, 2, NULL, cmd_subject, parse_args_with_freetext, 0, 2, NULL,
{ CMD_SYN(
{
"/subject set <subject>", "/subject set <subject>",
"/subject clear", "/subject clear")
NULL CMD_DESC(
}, "Set or clear room subject.")
"Set or clear room subject.", CMD_ARGS(
{
{ "set <subject>", "Set the room subject." }, { "set <subject>", "Set the room subject." },
{ "clear", "Clear the room subject." }, { "clear", "Clear the room subject." })
END_ARGS }, CMD_NOEXAMPLES()
{
NULL } }
}, },
{ "/affiliation", { "/affiliation",
cmd_affiliation, parse_args_with_freetext, 1, 4, NULL, cmd_affiliation, parse_args_with_freetext, 1, 4, NULL,
{ CMD_SYN(
{
"/affiliation set <affiliation> <jid> [<reason>]", "/affiliation set <affiliation> <jid> [<reason>]",
"/list [<affiliation>]", "/list [<affiliation>]")
NULL CMD_DESC(
},
"Manage room affiliations. " "Manage room affiliations. "
"Affiliation may be one of owner, admin, member, outcast or none.", "Affiliation may be one of owner, admin, member, outcast or none.")
{ CMD_ARGS(
{ "set <affiliation> <jid> [<reason>]", "Set the affiliation of user with jid, with an optional 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." }, { "list [<affiliation>]", "List all users with the specified affiliation, or all if none specified." })
END_ARGS }, CMD_NOEXAMPLES()
{
NULL } }
}, },
{ "/role", { "/role",
cmd_role, parse_args_with_freetext, 1, 4, NULL, cmd_role, parse_args_with_freetext, 1, 4, NULL,
{ CMD_SYN(
{
"/role set <role> <nick> [<reason>]", "/role set <role> <nick> [<reason>]",
"/list [<role>]", "/list [<role>]")
NULL CMD_DESC(
},
"Manage room roles. " "Manage room roles. "
"Role may be one of moderator, participant, visitor or none.", "Role may be one of moderator, participant, visitor or none.")
{ CMD_ARGS(
{ "set <role> <nick> [<reason>]", "Set the role of occupant with nick, with an optional reason." }, { "set <role> <nick> [<reason>]", "Set the role of occupant with nick, with an optional reason." },
{ "list [<role>]", "List all occupants with the specified role, or all if none specified." }, { "list [<role>]", "List all occupants with the specified role, or all if none specified." })
END_ARGS }, CMD_NOEXAMPLES()
{
NULL } }
}, },
{ "/occupants", { "/occupants",
cmd_occupants, parse_args, 1, 3, cons_occupants_setting, cmd_occupants, parse_args, 1, 3, cons_occupants_setting,
{ CMD_SYN(
{
"/occupants show|hide [jid]", "/occupants show|hide [jid]",
"/occupants default show|hide [jid]", "/occupants default show|hide [jid]",
"/occupants size [<percent>]", "/occupants size [<percent>]")
NULL CMD_DESC(
}, "Show or hide room occupants, and occupants panel display settings.")
"Show or hide room occupants, and occupants panel display settings.", CMD_ARGS(
{
{ "show", "Show the occupants panel in current room." }, { "show", "Show the occupants panel in current room." },
{ "hide", "Hide the occupants panel in current room." }, { "hide", "Hide the occupants panel in current room." },
{ "show jid", "Show jid in the occupants panel in current room." }, { "show jid", "Show jid in the occupants panel in current room." },
{ "hide jid", "Hide jid in the occupants panel in current room." }, { "hide jid", "Hide jid in the occupants panel in current room." },
{ "default show|hide", "Whether occupants are shown by default in new rooms." }, { "default show|hide", "Whether occupants are shown by default in new rooms." },
{ "default show|hide jid", "Whether occupants jids are shown by default in new rooms." }, { "default show|hide jid", "Whether occupants jids are shown by default in new rooms." },
{ "size <percent>", "Percentage of the screen taken by the occupants list in rooms (1-99)." }, { "size <percent>", "Percentage of the screen taken by the occupants list in rooms (1-99)." })
END_ARGS }, CMD_NOEXAMPLES()
{
NULL } }
}, },
{ "/form", { "/form",
cmd_form, parse_args, 1, 2, NULL, cmd_form, parse_args, 1, 2, NULL,
{ CMD_SYN(
{
"/form show", "/form show",
"/form submit", "/form submit",
"/form cancel", "/form cancel",
"/form help [<tag>]", "/form help [<tag>]")
NULL CMD_DESC(
}, "Form configuration.")
"Form configuration.", CMD_ARGS(
{
{ "show", "Show the current form." }, { "show", "Show the current form." },
{ "submit", "Submit the current form." }, { "submit", "Submit the current form." },
{ "cancel", "Cancel changes to the current form." }, { "cancel", "Cancel changes to the current form." },
{ "help [<tag>]", "Display help for form, or a specific field." }, { "help [<tag>]", "Display help for form, or a specific field." })
END_ARGS }, CMD_NOEXAMPLES()
{
NULL } }
}, },
{ "/rooms", { "/rooms",
cmd_rooms, parse_args, 0, 1, NULL, cmd_rooms, parse_args, 0, 1, NULL,
{ CMD_SYN(
{ "/rooms [<service>]")
"/rooms [<service>]", CMD_DESC(
NULL
},
"List the chat rooms available at the specified conference service. " "List the chat rooms available at the specified conference service. "
"If no argument is supplied, the account preference 'muc.service' is used, 'conference.<domain-part>' by default.", "If no argument is supplied, the account preference 'muc.service' is used, 'conference.<domain-part>' by default.")
{ CMD_ARGS(
{ "<service>", "The conference service to query." }, { "<service>", "The conference service to query." })
END_ARGS }, CMD_EXAMPLES(
{ "/rooms conference.jabber.org")
"/rooms conference.jabber.org",
NULL } }
}, },
{ "/bookmark", { "/bookmark",