mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-08 17:20:11 +08:00
Name and permission analyzing is now available
This commit is contained in:
parent
d5587bb3d8
commit
735b0934b6
@ -5,7 +5,7 @@ import net.mamoe.mirai.contact.Group
|
|||||||
import net.mamoe.mirai.contact.QQ
|
import net.mamoe.mirai.contact.QQ
|
||||||
import net.mamoe.mirai.message.Message
|
import net.mamoe.mirai.message.Message
|
||||||
import net.mamoe.mirai.message.MessageChain
|
import net.mamoe.mirai.message.MessageChain
|
||||||
import net.mamoe.mirai.network.protocol.tim.packet.SenderPermission
|
import net.mamoe.mirai.network.protocol.tim.packet.event.SenderPermission
|
||||||
|
|
||||||
|
|
||||||
abstract class GroupEvent(bot: Bot, val group: Group) : BotEvent(bot)
|
abstract class GroupEvent(bot: Bot, val group: Group) : BotEvent(bot)
|
||||||
|
@ -17,6 +17,7 @@ import net.mamoe.mirai.network.protocol.tim.packet.action.ClientSendFriendMessag
|
|||||||
import net.mamoe.mirai.network.protocol.tim.packet.action.ClientSendGroupMessagePacket
|
import net.mamoe.mirai.network.protocol.tim.packet.action.ClientSendGroupMessagePacket
|
||||||
import net.mamoe.mirai.network.protocol.tim.packet.action.ServerSendFriendMessageResponsePacket
|
import net.mamoe.mirai.network.protocol.tim.packet.action.ServerSendFriendMessageResponsePacket
|
||||||
import net.mamoe.mirai.network.protocol.tim.packet.action.ServerSendGroupMessageResponsePacket
|
import net.mamoe.mirai.network.protocol.tim.packet.action.ServerSendGroupMessageResponsePacket
|
||||||
|
import net.mamoe.mirai.network.protocol.tim.packet.event.*
|
||||||
import net.mamoe.mirai.utils.MiraiLogger
|
import net.mamoe.mirai.utils.MiraiLogger
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -57,7 +57,7 @@ class ServerGroupMessageEventPacket(input: ByteReadPacket, eventIdentity: EventP
|
|||||||
|
|
||||||
senderPermission = when (val value0x03 = tlv.getValue(0x03)[0].toUInt()) {
|
senderPermission = when (val value0x03 = tlv.getValue(0x03)[0].toUInt()) {
|
||||||
0x04u -> SenderPermission.OWNER
|
0x04u -> SenderPermission.OWNER
|
||||||
0x03u -> {
|
0x02u -> {
|
||||||
when (val value0x04 = tlv.getValue(0x04)[3].toUInt()) {
|
when (val value0x04 = tlv.getValue(0x04)[3].toUInt()) {
|
||||||
0x08u -> SenderPermission.OPERATOR
|
0x08u -> SenderPermission.OPERATOR
|
||||||
0x10u -> SenderPermission.MEMBER
|
0x10u -> SenderPermission.MEMBER
|
||||||
|
Loading…
Reference in New Issue
Block a user