commit 5183307f4cf92dd1c328ef328f9ba5cb5d9d4184
parent e76664603028b662d6498570501339fd4f7c361a
Author: hhvn <dev@hhvn.uk>
Date: Thu, 23 Dec 2021 23:34:02 +0000
s/commands.c: dump everything by default
Diffstat:
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/commands.c b/src/commands.c
@@ -202,8 +202,9 @@ struct Command commands[] = {
" -servers dump /server commands",
" -channels dump /join commands for respective servers",
" -queries dump /query commands for respective servers",
- " -all dump all of the above",
- " -default dump default settings (dump non-default otherwise)", NULL}},
+ " -default dump default settings (dump non-default otherwise)",
+ "If none (excluding -default) of the above are selected, it is",
+ "treated as though all are selected.", NULL}},
{NULL, NULL},
};
@@ -1211,7 +1212,6 @@ command_dump(struct Server *server, char *str) {
opt_servers = 16,
opt_channels = 32,
opt_queries = 64,
- opt_all = 127,
opt_default = 128,
};
static struct CommandOpts opts[] = {
@@ -1222,7 +1222,6 @@ command_dump(struct Server *server, char *str) {
{"servers", CMD_NARG, opt_servers},
{"channels", CMD_NARG, opt_channels},
{"queries", CMD_NARG, opt_queries},
- {"all", CMD_NARG, opt_all},
{"default", CMD_NARG, opt_default},
{NULL, 0, 0},
};
@@ -1237,7 +1236,6 @@ command_dump(struct Server *server, char *str) {
case opt_config:
case opt_servers:
case opt_channels:
- case opt_all:
selected |= ret;
break;
case opt_default:
@@ -1246,6 +1244,9 @@ command_dump(struct Server *server, char *str) {
}
}
+ if (!selected)
+ selected = 127;
+
if (!str || !*str) {
command_toofew("dump");
return;