mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Removed old command help
This commit is contained in:
parent
36ebf0fc17
commit
34537e2fb1
@ -116,7 +116,7 @@ static struct cmd_t command_defs[] =
|
||||
// NEW STYLE
|
||||
{ "/help",
|
||||
cmd_help, parse_args, 0, 1, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/help [<area>|<command>]",
|
||||
NULL
|
||||
@ -135,7 +135,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/about",
|
||||
cmd_about, parse_args, 0, 0, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/about",
|
||||
NULL
|
||||
@ -149,7 +149,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/connect",
|
||||
cmd_connect, parse_args, 0, 5, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/connect [<account>]",
|
||||
"/connect <account> [server <server>] [port <port>]",
|
||||
@ -174,7 +174,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/disconnect",
|
||||
cmd_disconnect, parse_args, 0, 0, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/disconnect",
|
||||
NULL
|
||||
@ -188,7 +188,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/msg",
|
||||
cmd_msg, parse_args_with_freetext, 1, 2, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/msg <contact> [<message>]",
|
||||
"/msg <nick> [<message>]",
|
||||
@ -213,7 +213,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/roster",
|
||||
cmd_roster, parse_args_with_freetext, 0, 3, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/roster",
|
||||
"/roster online",
|
||||
@ -264,7 +264,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/group",
|
||||
cmd_group, parse_args_with_freetext, 0, 3, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/group",
|
||||
"/group show <group>",
|
||||
@ -289,7 +289,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/info",
|
||||
cmd_info, parse_args, 0, 1, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/info",
|
||||
"/info <contact>|<nick>",
|
||||
@ -310,7 +310,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/caps",
|
||||
cmd_caps, parse_args, 0, 1, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/caps",
|
||||
"/caps <fulljid>|<nick>",
|
||||
@ -331,7 +331,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/software",
|
||||
cmd_software, parse_args, 0, 1, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/software",
|
||||
"/software <fulljid>|<nick>",
|
||||
@ -353,7 +353,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/status",
|
||||
cmd_status, parse_args, 0, 1, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/status",
|
||||
"/status <contact>|<nick>",
|
||||
@ -373,7 +373,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/resource",
|
||||
cmd_resource, parse_args, 1, 2, &cons_resource_setting,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/resource set <resource>",
|
||||
"/resource off",
|
||||
@ -394,7 +394,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/join",
|
||||
cmd_join, parse_args, 0, 5, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/join",
|
||||
"/join <room> [nick <nick>] [password <password>]",
|
||||
@ -421,7 +421,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/leave",
|
||||
cmd_leave, parse_args, 0, 0, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/leave",
|
||||
NULL
|
||||
@ -435,7 +435,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/invite",
|
||||
cmd_invite, parse_args_with_freetext, 1, 2, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/invite <contact> [<message>]",
|
||||
NULL
|
||||
@ -451,7 +451,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/invites",
|
||||
cmd_invites, parse_args_with_freetext, 0, 0, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/invites",
|
||||
NULL
|
||||
@ -465,7 +465,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/decline",
|
||||
cmd_decline, parse_args_with_freetext, 1, 1, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/decline <room>",
|
||||
NULL
|
||||
@ -480,7 +480,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/room",
|
||||
cmd_room, parse_args, 1, 1, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/room accept|destroy|config",
|
||||
NULL
|
||||
@ -497,7 +497,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/kick",
|
||||
cmd_kick, parse_args_with_freetext, 1, 2, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/kick <nick> [<reason>]",
|
||||
NULL
|
||||
@ -513,7 +513,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/ban",
|
||||
cmd_ban, parse_args_with_freetext, 1, 2, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/ban <jid> [<reason>]",
|
||||
NULL
|
||||
@ -529,7 +529,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/subject",
|
||||
cmd_subject, parse_args_with_freetext, 0, 2, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/subject set <subject>",
|
||||
"/subject clear",
|
||||
@ -546,7 +546,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/affiliation",
|
||||
cmd_affiliation, parse_args_with_freetext, 1, 4, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/affiliation set <affiliation> <jid> [<reason>]",
|
||||
"/list [<affiliation>]",
|
||||
@ -564,7 +564,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/role",
|
||||
cmd_role, parse_args_with_freetext, 1, 4, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/role set <role> <nick> [<reason>]",
|
||||
"/list [<role>]",
|
||||
@ -582,7 +582,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/occupants",
|
||||
cmd_occupants, parse_args, 1, 3, cons_occupants_setting,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/occupants show|hide [jid]",
|
||||
"/occupants default show|hide [jid]",
|
||||
@ -605,7 +605,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/form",
|
||||
cmd_form, parse_args, 1, 2, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/form show",
|
||||
"/form submit",
|
||||
@ -626,7 +626,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/rooms",
|
||||
cmd_rooms, parse_args, 0, 1, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/rooms [<service>]",
|
||||
NULL
|
||||
@ -643,7 +643,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/bookmark",
|
||||
cmd_bookmark, parse_args, 0, 8, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/bookmark",
|
||||
"/bookmark list",
|
||||
@ -671,7 +671,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/disco",
|
||||
cmd_disco, parse_args, 1, 2, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/disco info [<jid>]",
|
||||
"/disco items [<jid>]",
|
||||
@ -693,7 +693,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/nick",
|
||||
cmd_nick, parse_args_with_freetext, 1, 1, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/nick <nickname>",
|
||||
NULL
|
||||
@ -708,7 +708,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/win",
|
||||
cmd_win, parse_args, 1, 1, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/win <num>",
|
||||
NULL
|
||||
@ -723,7 +723,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/wins",
|
||||
cmd_wins, parse_args, 0, 3, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/wins tidy",
|
||||
"/wins prune",
|
||||
@ -743,7 +743,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/sub",
|
||||
cmd_sub, parse_args, 1, 2, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/sub request [<jid>]",
|
||||
"/sub allow [<jid>]",
|
||||
@ -773,7 +773,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/tiny",
|
||||
cmd_tiny, parse_args, 1, 1, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/tiny <url>",
|
||||
NULL
|
||||
@ -789,7 +789,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/who",
|
||||
cmd_who, parse_args, 0, 2, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/who",
|
||||
"/who online|offline|away|dnd|xa|chat|available|unavailable|any [<group>]",
|
||||
@ -820,7 +820,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/close",
|
||||
cmd_close, parse_args, 0, 1, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/close [<num>]",
|
||||
"/close all|read",
|
||||
@ -839,7 +839,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/clear",
|
||||
cmd_clear, parse_args, 0, 0, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/clear",
|
||||
NULL
|
||||
@ -853,7 +853,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/quit",
|
||||
cmd_quit, parse_args, 0, 0, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/quit",
|
||||
NULL
|
||||
@ -867,7 +867,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/privileges",
|
||||
cmd_privileges, parse_args, 1, 1, &cons_privileges_setting,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/privileges on|off",
|
||||
NULL
|
||||
@ -882,7 +882,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/beep",
|
||||
cmd_beep, parse_args, 1, 1, &cons_beep_setting,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/beep on|off",
|
||||
NULL
|
||||
@ -899,7 +899,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/encwarn",
|
||||
cmd_encwarn, parse_args, 1, 1, &cons_encwarn_setting,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/encwarn on|off",
|
||||
NULL
|
||||
@ -914,7 +914,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/presence",
|
||||
cmd_presence, parse_args, 1, 1, &cons_presence_setting,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/presence on|off",
|
||||
NULL
|
||||
@ -929,7 +929,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/wrap",
|
||||
cmd_wrap, parse_args, 1, 1, &cons_wrap_setting,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/wrap on|off",
|
||||
NULL
|
||||
@ -944,7 +944,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/winstidy",
|
||||
cmd_winstidy, parse_args, 1, 1, &cons_winstidy_setting,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/winstidy on|off",
|
||||
NULL
|
||||
@ -959,7 +959,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/time",
|
||||
cmd_time, parse_args, 1, 3, &cons_time_setting,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/time main set <format>",
|
||||
"/time main off",
|
||||
@ -987,7 +987,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/inpblock",
|
||||
cmd_inpblock, parse_args, 2, 2, &cons_inpblock_setting,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/inpblock timeout <millis>",
|
||||
"/inpblock dynamic on|off",
|
||||
@ -1004,7 +1004,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/notify",
|
||||
cmd_notify, parse_args, 2, 3, &cons_notify_setting,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/notify message on|off",
|
||||
"/notify message current on|off",
|
||||
@ -1047,7 +1047,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/flash",
|
||||
cmd_flash, parse_args, 1, 1, &cons_flash_setting,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/flash on|off",
|
||||
NULL
|
||||
@ -1063,7 +1063,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/intype",
|
||||
cmd_intype, parse_args, 1, 1, &cons_intype_setting,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/intype on|off",
|
||||
NULL
|
||||
@ -1079,7 +1079,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/splash",
|
||||
cmd_splash, parse_args, 1, 1, &cons_splash_setting,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/splash on|off",
|
||||
NULL
|
||||
@ -1094,7 +1094,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/autoconnect",
|
||||
cmd_autoconnect, parse_args, 1, 2, &cons_autoconnect_setting,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/autoconnect set <account>",
|
||||
"/autoconnect off",
|
||||
@ -1114,7 +1114,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/vercheck",
|
||||
cmd_vercheck, parse_args, 0, 1, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/vercheck on|off",
|
||||
NULL
|
||||
@ -1129,7 +1129,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/titlebar",
|
||||
cmd_titlebar, parse_args, 2, 2, &cons_titlebar_setting,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/titlebar show on|off",
|
||||
"/titlebar goodbye on|off",
|
||||
@ -1146,7 +1146,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/alias",
|
||||
cmd_alias, parse_args_with_freetext, 1, 3, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/alias list",
|
||||
"/alias add <name> <value>",
|
||||
@ -1170,7 +1170,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/chlog",
|
||||
cmd_chlog, parse_args, 1, 1, &cons_chlog_setting,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/chlog on|off",
|
||||
NULL
|
||||
@ -1188,7 +1188,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/grlog",
|
||||
cmd_grlog, parse_args, 1, 1, &cons_grlog_setting,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/grlog on|off",
|
||||
NULL
|
||||
@ -1204,7 +1204,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/states",
|
||||
cmd_states, parse_args, 1, 1, &cons_states_setting,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/states on|off",
|
||||
NULL
|
||||
@ -1219,7 +1219,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/pgp",
|
||||
cmd_pgp, parse_args, 1, 3, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/pgp libver",
|
||||
"/pgp keys",
|
||||
@ -1252,7 +1252,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/otr",
|
||||
cmd_otr, parse_args, 1, 3, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/otr libver",
|
||||
"/otr gen",
|
||||
@ -1299,7 +1299,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/outtype",
|
||||
cmd_outtype, parse_args, 1, 1, &cons_outtype_setting,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/outtype on|off",
|
||||
NULL
|
||||
@ -1314,7 +1314,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/gone",
|
||||
cmd_gone, parse_args, 1, 1, &cons_gone_setting,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/gone <minutes>",
|
||||
NULL
|
||||
@ -1330,7 +1330,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/history",
|
||||
cmd_history, parse_args, 1, 1, &cons_history_setting,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/history on|off",
|
||||
NULL
|
||||
@ -1346,7 +1346,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/log",
|
||||
cmd_log, parse_args, 1, 2, &cons_log_setting,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/log where",
|
||||
"/log rotate on|off",
|
||||
@ -1367,7 +1367,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/carbons",
|
||||
cmd_carbons, parse_args, 1, 1, &cons_carbons_setting,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/carbons on|off",
|
||||
NULL
|
||||
@ -1383,7 +1383,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/receipts",
|
||||
cmd_receipts, parse_args, 2, 2, &cons_receipts_setting,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/receipts request on|off",
|
||||
"/receipts send on|off",
|
||||
@ -1400,7 +1400,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/reconnect",
|
||||
cmd_reconnect, parse_args, 1, 1, &cons_reconnect_setting,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/reconnect <seconds>",
|
||||
NULL
|
||||
@ -1415,7 +1415,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/autoping",
|
||||
cmd_autoping, parse_args, 1, 1, &cons_autoping_setting,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/autoping <seconds>",
|
||||
NULL
|
||||
@ -1430,7 +1430,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/ping",
|
||||
cmd_ping, parse_args, 0, 1, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/ping [<jid>]",
|
||||
NULL
|
||||
@ -1446,7 +1446,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/autoaway",
|
||||
cmd_autoaway, parse_args_with_freetext, 2, 2, &cons_autoaway_setting,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/autoaway mode idle|away|off",
|
||||
"/autoaway time <minutes>",
|
||||
@ -1474,7 +1474,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/priority",
|
||||
cmd_priority, parse_args, 1, 1, &cons_priority_setting,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/priority <priority>",
|
||||
NULL
|
||||
@ -1490,7 +1490,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/account",
|
||||
cmd_account, parse_args, 0, 4, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/account",
|
||||
"/account list",
|
||||
@ -1567,7 +1567,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/prefs",
|
||||
cmd_prefs, parse_args, 0, 1, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/prefs [ui|desktop|chat|log|conn|presence]",
|
||||
NULL
|
||||
@ -1588,7 +1588,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/theme",
|
||||
cmd_theme, parse_args, 1, 2, &cons_theme_setting,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/theme list",
|
||||
"/theme load <theme>",
|
||||
@ -1609,7 +1609,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/statuses",
|
||||
cmd_statuses, parse_args, 2, 2, &cons_statuses_setting,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/statuses console|chat|muc all|online|none",
|
||||
NULL
|
||||
@ -1633,7 +1633,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/xmlconsole",
|
||||
cmd_xmlconsole, parse_args, 0, 0, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/xmlconsole",
|
||||
NULL
|
||||
@ -1647,7 +1647,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/away",
|
||||
cmd_away, parse_args_with_freetext, 0, 1, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/away [<message>]",
|
||||
NULL
|
||||
@ -1664,7 +1664,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/chat",
|
||||
cmd_chat, parse_args_with_freetext, 0, 1, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/chat [<message>]",
|
||||
NULL
|
||||
@ -1681,7 +1681,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/dnd",
|
||||
cmd_dnd, parse_args_with_freetext, 0, 1, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/dnd [<message>]",
|
||||
NULL
|
||||
@ -1698,7 +1698,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/online",
|
||||
cmd_online, parse_args_with_freetext, 0, 1, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/online [<message>]",
|
||||
NULL
|
||||
@ -1715,7 +1715,7 @@ static struct cmd_t command_defs[] =
|
||||
|
||||
{ "/xa",
|
||||
cmd_xa, parse_args_with_freetext, 0, 1, NULL,
|
||||
{ NULL, NULL, { NULL },
|
||||
{
|
||||
{
|
||||
"/xa [<message>]",
|
||||
NULL
|
||||
@ -2502,10 +2502,10 @@ _cmd_execute(ProfWin *window, const char * const command, const char * const inp
|
||||
if (cmd) {
|
||||
gchar **args = cmd->parser(inp, cmd->min_args, cmd->max_args, &result);
|
||||
if (result == FALSE) {
|
||||
ui_invalid_command_usage(cmd->help.usage, cmd->setting_func);
|
||||
ui_invalid_command_usage(cmd->cmd, cmd->setting_func);
|
||||
return TRUE;
|
||||
} else {
|
||||
gboolean result = cmd->func(window, args, cmd->help);
|
||||
gboolean result = cmd->func(window, args, command);
|
||||
g_strfreev(args);
|
||||
return result;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -39,10 +39,6 @@
|
||||
|
||||
// Command help strings
|
||||
typedef struct cmd_help_t {
|
||||
const gchar *usage;
|
||||
const gchar *short_help;
|
||||
const gchar *long_help[50];
|
||||
|
||||
const gchar *synopsis[50];
|
||||
const gchar *desc;
|
||||
const gchar *args[50][2];
|
||||
@ -61,7 +57,7 @@ typedef struct cmd_help_t {
|
||||
*/
|
||||
typedef struct cmd_t {
|
||||
gchar *cmd;
|
||||
gboolean (*func)(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean (*func)(ProfWin *window, gchar **args, const char * const command);
|
||||
gchar** (*parser)(const char * const inp, int min, int max, gboolean *result);
|
||||
int min_args;
|
||||
int max_args;
|
||||
@ -72,85 +68,85 @@ typedef struct cmd_t {
|
||||
gboolean cmd_execute_alias(ProfWin *window, const char * const inp, gboolean *ran);
|
||||
gboolean cmd_execute_default(ProfWin *window, const char * inp);
|
||||
|
||||
gboolean cmd_about(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_account(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_autoaway(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_autoconnect(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_autoping(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_away(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_beep(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_caps(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_chat(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_chlog(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_clear(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_close(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_connect(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_decline(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_disco(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_disconnect(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_dnd(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_flash(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_gone(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_grlog(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_group(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_help(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_history(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_carbons(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_receipts(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_info(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_intype(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_invite(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_invites(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_join(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_leave(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_log(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_msg(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_nick(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_notify(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_online(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_otr(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_pgp(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_outtype(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_prefs(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_priority(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_quit(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_reconnect(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_room(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_rooms(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_bookmark(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_roster(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_software(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_splash(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_states(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_status(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_statuses(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_sub(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_theme(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_tiny(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_titlebar(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_vercheck(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_who(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_win(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_wins(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_winstidy(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_xa(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_alias(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_xmlconsole(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_ping(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_form(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_occupants(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_kick(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_ban(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_subject(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_affiliation(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_role(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_privileges(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_presence(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_wrap(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_time(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_resource(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_inpblock(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_encwarn(ProfWin *window, gchar **args, struct cmd_help_t help);
|
||||
gboolean cmd_about(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_account(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_autoaway(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_autoconnect(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_autoping(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_away(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_beep(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_caps(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_chat(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_chlog(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_clear(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_close(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_connect(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_decline(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_disco(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_disconnect(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_dnd(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_flash(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_gone(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_grlog(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_group(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_help(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_history(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_carbons(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_receipts(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_info(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_intype(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_invite(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_invites(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_join(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_leave(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_log(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_msg(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_nick(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_notify(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_online(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_otr(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_pgp(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_outtype(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_prefs(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_priority(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_quit(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_reconnect(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_room(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_rooms(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_bookmark(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_roster(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_software(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_splash(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_states(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_status(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_statuses(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_sub(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_theme(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_tiny(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_titlebar(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_vercheck(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_who(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_win(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_wins(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_winstidy(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_xa(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_alias(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_xmlconsole(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_ping(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_form(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_occupants(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_kick(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_ban(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_subject(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_affiliation(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_role(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_privileges(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_presence(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_wrap(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_time(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_resource(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_inpblock(ProfWin *window, gchar **args, const char * const command);
|
||||
gboolean cmd_encwarn(ProfWin *window, gchar **args, const char * const command);
|
||||
|
||||
gboolean cmd_form_field(ProfWin *window, char *tag, gchar **args);
|
||||
|
||||
|
@ -141,6 +141,18 @@ cons_show_help(Command *command)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
cons_bad_cmd_usage(const char * const cmd)
|
||||
{
|
||||
GString *msg = g_string_new("");
|
||||
g_string_printf(msg, "Invalid usage, see '/help %s' for details.", &cmd[1]);
|
||||
|
||||
cons_show("");
|
||||
cons_show(msg->str);
|
||||
|
||||
g_string_free(msg, TRUE);
|
||||
}
|
||||
|
||||
void
|
||||
cons_show_error(const char * const msg, ...)
|
||||
{
|
||||
|
@ -667,22 +667,25 @@ ui_handle_error(const char * const err_msg)
|
||||
}
|
||||
|
||||
void
|
||||
ui_invalid_command_usage(const char * const usage, void (*setting_func)(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("Usage: %s", usage);
|
||||
cons_show(msg->str);
|
||||
} else {
|
||||
cons_show("");
|
||||
cons_show("Usage: %s", usage);
|
||||
cons_show(msg->str);
|
||||
ProfWin *current = wins_get_current();
|
||||
if (current->type == WIN_CHAT) {
|
||||
char usage_cpy[strlen(usage) + 8];
|
||||
sprintf(usage_cpy, "Usage: %s", usage);
|
||||
ui_current_print_line(usage_cpy);
|
||||
ui_current_print_line(msg->str);
|
||||
}
|
||||
}
|
||||
|
||||
g_string_free(msg, TRUE);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -228,7 +228,7 @@ void ui_input_clear(void);
|
||||
void ui_input_nonblocking(gboolean);
|
||||
void ui_write(char *line, int offset);
|
||||
|
||||
void ui_invalid_command_usage(const char * const usage, void (*setting_func)(void));
|
||||
void ui_invalid_command_usage(const char * const cmd, void (*setting_func)(void));
|
||||
|
||||
void ui_create_xmlconsole_win(void);
|
||||
gboolean ui_xmlconsole_exists(void);
|
||||
@ -243,6 +243,7 @@ void cons_show(const char * const msg, ...);
|
||||
void cons_about(void);
|
||||
void cons_help(void);
|
||||
void cons_show_help(Command *command);
|
||||
void cons_bad_cmd_usage(const char * const cmd);
|
||||
void cons_navigation_help(void);
|
||||
void cons_prefs(void);
|
||||
void cons_show_ui_prefs(void);
|
||||
|
Loading…
Reference in New Issue
Block a user