/
fsysMem.go
42 lines (36 loc) · 949 Bytes
/
fsysMem.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package fesl
import (
"github.com/sirupsen/logrus"
"github.com/OSHeroes/bfheroesFesl/inter/network"
"github.com/OSHeroes/bfheroesFesl/inter/network/codec"
)
type reqMemCheck struct {
// TXN stands for Taxon, sub-query name of the command.
// Should be equal: MemCheck.
TXN string `fesl:"TXN"`
// FIXME: Result is usually an empty string
Result string `fesl:"result"`
}
type ansMemCheck struct {
// TXN stands for Taxon, sub-query name of the command.
// Should be equal: MemCheck.
TXN string `fesl:"TXN"`
MemChecks string `fesl:"memcheck.[]"`
Salt string `fesl:"salt"`
Type string `fesl:"type"`
Result string `fesl:"result"`
}
func (fm *Fesl) fsysMemCheck(event *network.EventNewClient) {
logrus.Println("Sending MemCheck")
event.Client.Answer(&codec.Packet{
Message: fsys,
Content: ansMemCheck{
TXN: "MemCheck",
Salt: "5",
Result: "",
Type: "0",
MemChecks: "0",
},
Send: 0xC0000000,
})
}