Improve LoginSolver selecting

This commit is contained in:
Karlatemp 2020-12-26 23:44:31 +08:00
parent 113fc20cf9
commit 8529704378
No known key found for this signature in database
GPG Key ID: 21FBDDF664FF06F8

View File

@ -78,6 +78,7 @@ class MiraiConsoleImplementationTerminal
override val isAnsiSupported: Boolean get() = true
override fun createLoginSolver(requesterBot: Long, configuration: BotConfiguration): LoginSolver {
LoginSolver.Default?.takeIf { it !is StandardCharImageLoginSolver }?.let { return it }
return StandardCharImageLoginSolver(input = { requestInput("LOGIN> ") })
}