mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-23 06:10:30 +08:00
Unmodifiable IP list
This commit is contained in:
parent
6d58cb1880
commit
26b3ac07c2
@ -423,6 +423,7 @@ internal class TIMBotNetworkHandler(private val bot: Bot) : BotNetworkHandler {
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("MemberVisibilityCanBePrivate")
|
||||
suspend fun changeOnlineStatus(status: ClientLoginStatus) {
|
||||
socket.sendPacket(ClientChangeOnlineStatusPacket(bot.account.qqNumber, sessionKey, status))
|
||||
}
|
||||
|
@ -14,23 +14,21 @@ import java.util.stream.Collectors
|
||||
* @author Him188moe
|
||||
*/
|
||||
object TIMProtocol {
|
||||
val SERVER_IP: List<String> = object : ArrayList<String>() {
|
||||
init {
|
||||
//add("183.60.56.29")
|
||||
val SERVER_IP: List<String> by lazy {
|
||||
//add("183.60.56.29")
|
||||
val list = mutableListOf<String>()
|
||||
arrayOf(
|
||||
"sz3.tencent.com",
|
||||
"sz4.tencent.com",
|
||||
"sz5.tencent.com",
|
||||
"sz6.tencent.com",
|
||||
"sz8.tencent.com",
|
||||
"sz9.tencent.com",
|
||||
"sz2.tencent.com"
|
||||
).forEach { list.add(InetAddress.getByName(it).hostAddress) }
|
||||
|
||||
arrayOf(
|
||||
"sz3.tencent.com",
|
||||
"sz4.tencent.com",
|
||||
"sz5.tencent.com",
|
||||
"sz6.tencent.com",
|
||||
"sz8.tencent.com",
|
||||
"sz9.tencent.com",
|
||||
"sz2.tencent.com"
|
||||
).forEach { this.add(InetAddress.getByName(it).hostAddress) }
|
||||
|
||||
}
|
||||
list.toList()
|
||||
}
|
||||
get() = Collections.unmodifiableList(field)
|
||||
|
||||
const val head = "02"
|
||||
const val ver = "37 13"
|
||||
|
Loading…
Reference in New Issue
Block a user