add option to disable req command globally
This commit is contained in:
parent
33c94a589c
commit
602762f371
|
@ -58,7 +58,8 @@ object BridgeCommandRegistry {
|
||||||
commandMap.clear()
|
commandMap.clear()
|
||||||
val permStatus = PermissionConfig.loadPermFile()
|
val permStatus = PermissionConfig.loadPermFile()
|
||||||
register("help", HelpCommand)
|
register("help", HelpCommand)
|
||||||
register("req", PermCommand)
|
if(cfg.command.permissionRequests)
|
||||||
|
register("req", PermCommand)
|
||||||
val cmdStatus = CommandConfig.readConfig()
|
val cmdStatus = CommandConfig.readConfig()
|
||||||
CommandConfig.commands.forEach { (alias, command) ->
|
CommandConfig.commands.forEach { (alias, command) ->
|
||||||
register(alias, command)
|
register(alias, command)
|
||||||
|
|
|
@ -35,7 +35,8 @@ data class BaseConfig(val rootDir: File) {
|
||||||
|
|
||||||
data class CommandOptions(
|
data class CommandOptions(
|
||||||
val prefix: Char = '!',
|
val prefix: Char = '!',
|
||||||
val enable: Boolean = true
|
val enable: Boolean = true,
|
||||||
|
val permissionRequests: Boolean = true
|
||||||
)
|
)
|
||||||
|
|
||||||
data class ConnectOptions(
|
data class ConnectOptions(
|
||||||
|
@ -172,6 +173,11 @@ data class BaseConfig(val rootDir: File) {
|
||||||
"prefix",
|
"prefix",
|
||||||
prefix,
|
prefix,
|
||||||
"Prefix for MC bridge commands. Accepts a single character (not alphanumeric or /)"
|
"Prefix for MC bridge commands. Accepts a single character (not alphanumeric or /)"
|
||||||
|
),
|
||||||
|
permissionRequests = it.getOrDefault(
|
||||||
|
"permissionRequests",
|
||||||
|
permissionRequests,
|
||||||
|
"Enable the 'req' command for requestion permissions from chat"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue