From 8529704378e16a6b082606e4ac683ab8cfa34dbc Mon Sep 17 00:00:00 2001 From: Karlatemp Date: Sat, 26 Dec 2020 23:44:31 +0800 Subject: [PATCH] Improve LoginSolver selecting --- .../src/MiraiConsoleImplementationTerminal.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/mirai-console-terminal/src/MiraiConsoleImplementationTerminal.kt b/frontend/mirai-console-terminal/src/MiraiConsoleImplementationTerminal.kt index 6c0cf0231..08c20e4b0 100644 --- a/frontend/mirai-console-terminal/src/MiraiConsoleImplementationTerminal.kt +++ b/frontend/mirai-console-terminal/src/MiraiConsoleImplementationTerminal.kt @@ -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> ") }) }