2025-01-21 12:36:54 +09:00
|
|
|
use command_parser::parameter;
|
|
|
|
|
|
2025-01-07 23:15:18 +09:00
|
|
|
use super::*;
|
2025-01-04 07:35:04 +09:00
|
|
|
|
2025-01-07 23:15:18 +09:00
|
|
|
pub fn cmds() -> impl Iterator<Item = Command> {
|
2025-01-21 12:36:54 +09:00
|
|
|
let ap = tokens!(["config", "cfg"], ["autoproxy", "ap"]);
|
|
|
|
|
|
|
|
|
|
let ap_account = concat_tokens!(ap, [["account", "ac"]]);
|
|
|
|
|
let ap_timeout = concat_tokens!(ap, [["timeout", "tm"]]);
|
2025-01-07 23:15:18 +09:00
|
|
|
|
|
|
|
|
[
|
2025-01-21 12:36:54 +09:00
|
|
|
command!(ap_account => "cfg_ap_account_show")
|
2025-01-20 22:50:45 +09:00
|
|
|
.help("Shows autoproxy status for the account"),
|
2025-01-21 12:36:54 +09:00
|
|
|
command!(ap_account, Toggle => "cfg_ap_account_update")
|
|
|
|
|
.help("Toggles autoproxy for the account"),
|
|
|
|
|
command!(ap_timeout => "cfg_ap_timeout_show").help("Shows the autoproxy timeout"),
|
|
|
|
|
command!(ap_timeout, parameter::RESET => "cfg_ap_timeout_reset")
|
|
|
|
|
.help("Resets the autoproxy timeout"),
|
|
|
|
|
command!(ap_timeout, parameter::DISABLE => "cfg_ap_timeout_off")
|
|
|
|
|
.help("Disables the autoproxy timeout"),
|
|
|
|
|
command!(ap_timeout, ("timeout", OpaqueString) => "cfg_ap_timeout_update")
|
|
|
|
|
.help("Sets the autoproxy timeout"),
|
2025-01-07 23:15:18 +09:00
|
|
|
]
|
|
|
|
|
.into_iter()
|
|
|
|
|
}
|