1
0
mirror of https://github.com/kami-blue/client synced 2025-02-20 23:27:14 +00:00

Fix customsize #tunnel if AutoTunnel settings are default (#876)

This commit is contained in:
pNoName1337 2020-05-26 01:22:35 +03:00 committed by GitHub
parent cbb05403a2
commit 4bb6c80506
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,6 +12,7 @@ import me.zeroeightsix.kami.util.MessageSendHelper
/**
* @author dominikaaaa
* Updated by pNoName on 25/05/20
*/
@Module.Info(
name = "AutoTunnel",
@ -44,7 +45,13 @@ class AutoTunnel : Module() {
}
private fun sendTunnel() {
val current = arrayOf("tunnel", height.value.toString(), width.value.toString(), "1000000")
var current = arrayOf("")
if (height.value == 2 && width.value == 1) {
current = arrayOf("tunnel")
}
else {
current = arrayOf("tunnel", height.value.toString(), width.value.toString(), "1000000")
}
if (!current.contentEquals(lastCommand)) {
lastCommand = current