fix small typo
This commit is contained in:
parent
ff36de2446
commit
166fa8a6e1
|
@ -17,7 +17,7 @@ data class CustomCommand(
|
|||
val timeout: Int = 20,
|
||||
val defaultCommand: Boolean? = null,
|
||||
val execOp: Boolean? = null,
|
||||
val argumentsRegext: Regex? = null
|
||||
val argumentsRegex: Regex? = null
|
||||
) : IBridgeCommand {
|
||||
val alias: String
|
||||
get() = BridgeCommandRegistry.getName(this)!!
|
||||
|
@ -26,9 +26,9 @@ data class CustomCommand(
|
|||
private var lastUsed: Int = 0
|
||||
|
||||
override fun execute(alias: String, user: String, userId: String, server: String, args: String): Boolean {
|
||||
if(argumentsRegext != null) {
|
||||
instance.debug("testing '$args' against '${argumentsRegext.pattern}'")
|
||||
if(!argumentsRegext.matches(args)) {
|
||||
if(argumentsRegex != null) {
|
||||
instance.debug("testing '$args' against '${argumentsRegex.pattern}'")
|
||||
if(!argumentsRegex.matches(args)) {
|
||||
MessageHandlerInst.transmit(
|
||||
ApiMessage(
|
||||
text = "$user sent invalid input to command $alias".stripColorOut
|
||||
|
|
|
@ -58,7 +58,7 @@ object CommandConfig {
|
|||
"exec" to CustomCommand(
|
||||
type = CommandType.EXECUTE,
|
||||
execute = "{args}",
|
||||
argumentsRegext = ".*".toRegex(),
|
||||
argumentsRegex = ".*".toRegex(),
|
||||
permLevel = 1.0,
|
||||
help = "Execute any command as OP, be careful with this one",
|
||||
execOp = true,
|
||||
|
|
Loading…
Reference in New Issue