-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathserver.go
58 lines (47 loc) · 872 Bytes
/
server.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package ts3
import (
"strconv"
)
func GlobalMessage(msg string) Command {
return Command{
Command: "gm",
Params: map[string][]string{
"msg": []string{msg},
},
}
}
func ServerInfo() Command {
return Command{
Command: "serverinfo",
}
}
func ServerProcessStop() Command {
return Command{
Command: "serverprocessstop",
}
}
func ServerStop(sid int) Command {
return Command{
Command: "serverstop",
Params: map[string][]string{
"sid": []string{strconv.Itoa(sid)},
},
}
}
func ServerStart(sid int) Command {
return Command{
Command: "serverstart",
Params: map[string][]string{
"sid": []string{strconv.Itoa(sid)},
},
}
}
func LogAdd(msg string, loglevel int) Command {
return Command{
Command: "logadd",
Params: map[string][]string{
"loglevel": []string{strconv.Itoa(loglevel)},
"msg": []string{msg},
},
}
}