Troop management

This commit is contained in:
jiahua.liu 2020-02-03 17:11:36 +08:00
parent 870234a007
commit 3d8c60cbd4
2 changed files with 41 additions and 1 deletions

View File

@ -5,6 +5,7 @@ import kotlinx.io.pool.useInstance
import net.mamoe.mirai.data.Packet
import net.mamoe.mirai.event.Subscribable
import net.mamoe.mirai.qqandroid.QQAndroidBot
import net.mamoe.mirai.qqandroid.network.protocol.packet.chat.TroopManagement
import net.mamoe.mirai.qqandroid.network.protocol.packet.chat.receive.MessageSvc
import net.mamoe.mirai.qqandroid.network.protocol.packet.chat.receive.OnlinePush
import net.mamoe.mirai.qqandroid.network.protocol.packet.list.FriendList
@ -117,7 +118,10 @@ internal object KnownPacketFactories {
MessageSvc.PbSendMsg,
FriendList.GetFriendGroupList,
FriendList.GetTroopListSimplify,
FriendList.GetTroopMemberList
FriendList.GetTroopMemberList,
TroopManagement.EditNametag,
TroopManagement.Mute,
TroopManagement.MuteAll
)
object IncomingFactories : List<IncomingPacketFactory<*>> by mutableListOf(

View File

@ -0,0 +1,36 @@
package net.mamoe.mirai.qqandroid.network.protocol.packet.chat
import kotlinx.io.core.ByteReadPacket
import net.mamoe.mirai.qqandroid.QQAndroidBot
import net.mamoe.mirai.qqandroid.network.protocol.packet.OutgoingPacketFactory
import net.mamoe.mirai.qqandroid.network.protocol.packet.login.LoginPacket
internal class TroopManagement {
internal object Mute : OutgoingPacketFactory<LoginPacket.LoginPacketResponse>("OidbSvc.0x570_8") {
override suspend fun ByteReadPacket.decode(bot: QQAndroidBot): LoginPacket.LoginPacketResponse {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
internal object MuteAll : OutgoingPacketFactory<LoginPacket.LoginPacketResponse>("OidbSvc.0x89a_0") {
override suspend fun ByteReadPacket.decode(bot: QQAndroidBot): LoginPacket.LoginPacketResponse {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
internal object EditNametag : OutgoingPacketFactory<LoginPacket.LoginPacketResponse>("OidbSvc.0x8fc_2") {
override suspend fun ByteReadPacket.decode(bot: QQAndroidBot): LoginPacket.LoginPacketResponse {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
/*
internal object Recall: OutgoingPacketFactory<LoginPacket.LoginPacketResponse>("wtlogin.login"){
override suspend fun ByteReadPacket.decode(bot: QQAndroidBot): LoginPacket.LoginPacketResponse {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
*/
}