This commit is contained in:
shoopea 2020-06-21 19:05:51 +02:00
parent 2a8fc76e3f
commit e9296526c0

12
main.go
View File

@ -106,6 +106,13 @@ func main() {
} }
_, err = conn.Write(px.Bytes()) _, err = conn.Write(px.Bytes())
px = PacketAdminUpdateFrequency{
Packet: Packet{PType: AdminPacketAdminUpdateFrequency},
UpdateType: AdminUpdateCompanyInfo,
UpdateFrequency: AdminFrequencyAutomatic,
}
_, err = conn.Write(px.Bytes())
px = PacketAdminUpdateFrequency{ px = PacketAdminUpdateFrequency{
Packet: Packet{PType: AdminPacketAdminUpdateFrequency}, Packet: Packet{PType: AdminPacketAdminUpdateFrequency},
UpdateType: AdminUpdateChat, UpdateType: AdminUpdateChat,
@ -211,6 +218,11 @@ func main() {
} }
sp.Read(b[:p.PLength]) sp.Read(b[:p.PLength])
logInfoDebug("AdminPacketServerRConEnd :\n- Command: %s", sp.Command) logInfoDebug("AdminPacketServerRConEnd :\n- Command: %s", sp.Command)
if sp.Command == "clients" {
for k, v := range clients {
logInfoDebug("Client[%d] : %s - %d (%s)", k, v.Name, v.CompanyID, v.Address)
}
}
default: default:
logInfoDebug("Packet fully read : len : %d / type : %d", p.PLength, p.PType) logInfoDebug("Packet fully read : len : %d / type : %d", p.PLength, p.PType)
} }