Commit fc99e972 authored by Him188's avatar Him188

update

parent 298d0139
......@@ -3,7 +3,8 @@ apply plugin: "java"
dependencies {
api project(':mirai-core')
runtimeOnly files(':mirai-core-timpc')
api project(':mirai-core-timpc')
runtimeOnly files('../mirai-core-timpc/build/classes/kotlin/jvm/main')
runtimeOnly files('../mirai-core/build/classes/kotlin/jvm/main')
// classpath is not set correctly by IDE
}
......@@ -18,18 +18,19 @@ fun main() {
println("\"login qqnumber qqpassword \" to login a bot")
println("\"login qq号 qq密码 \" 来登陆一个BOT")
thread { processNextCommandLine() }
thread {
loop@ while (true) {
var command = readLine()
if (command != null) {
var commandArgs = command.split(" ")
PluginManager.loadPlugins()
}
tailrec fun processNextCommandLine() {
val commandArgs = readLine()?.split(" ") ?: return
when (commandArgs[0]) {
"login" -> {
if (commandArgs.size < 3) {
println("\"login qqnumber qqpassword \" to login a bot")
println("\"login qq号 qq密码 \" 来登陆一个BOT")
continue@loop
println("\"login qq号 qq密码 \" 来登录一个BOT")
return processNextCommandLine()
}
val qqNumber = commandArgs[1].toLong()
val qqPassword = commandArgs[2]
......@@ -39,13 +40,5 @@ fun main() {
}
}
}
}
}
}
PluginManager.loadPlugins()
return processNextCommandLine()
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment