mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-13 15:34:38 +01:00
add missing castbinary messagetype
This commit is contained in:
@@ -16,6 +16,7 @@ import (
|
||||
const (
|
||||
BinaryMessageTypeState = 0
|
||||
BinaryMessageTypeChat = 1
|
||||
BinaryMessageTypeData = 3
|
||||
BinaryMessageTypeMailNotify = 4
|
||||
BinaryMessageTypeEmote = 6
|
||||
)
|
||||
@@ -164,6 +165,17 @@ func handleMsgSysCastBinary(s *Session, p mhfpacket.MHFPacket) {
|
||||
|
||||
fmt.Printf("Got chat message: %+v\n", chatMessage)
|
||||
|
||||
if strings.HasPrefix(chatMessage.Message, "!test ") {
|
||||
var x uint32
|
||||
n, err := fmt.Sscanf(chatMessage.Message, "!test %d", &x)
|
||||
if err != nil || n != 1 {
|
||||
sendServerChatMessage(s, "Invalid command. Usage:\"!test X\"")
|
||||
} else {
|
||||
s.test = x
|
||||
sendServerChatMessage(s, fmt.Sprintf("Set value to %d", x))
|
||||
}
|
||||
}
|
||||
|
||||
// Set account rights
|
||||
if strings.HasPrefix(chatMessage.Message, "!rights") {
|
||||
var v uint32
|
||||
|
||||
Reference in New Issue
Block a user