Skip to content

Commit d4ae0bd

Browse files
committed
Fix channel and client id for type OnlineClient
1 parent d0d4455 commit d4ae0bd

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

server_cmds.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,8 @@ func (s *ServerMethods) PrivilegeKeyAdd(ttype, id1, id2 int, options ...CmdArg)
340340

341341
// OnlineClient represents a client online on a virtual server.
342342
type OnlineClient struct {
343-
ID int `ms:"cid"`
343+
ID int `ms:"clid"`
344+
ChannelID int `ms:"cid"`
344345
DatabaseID int `ms:"client_database_id"`
345346
Nickname string `ms:"client_nickname"`
346347
Type int `ms:"client_type"`

server_cmds_test.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ func TestCmdsServer(t *testing.T) {
7575
return
7676
}
7777
expected := &Server{
78-
Status: "template",
79-
MaxClients: 32,
80-
Name: "Test Server",
78+
Status: "template",
79+
MaxClients: 32,
80+
Name: "Test Server",
8181
AntiFloodPointsNeededCommandBlock: 150,
8282
AntiFloodPointsNeededIPBlock: 250,
8383
AntiFloodPointsTickReduce: 5,
@@ -259,7 +259,8 @@ func TestCmdsServer(t *testing.T) {
259259

260260
expected := []*OnlineClient{
261261
{
262-
ID: 7,
262+
ID: 5,
263+
ChannelID: 7,
263264
DatabaseID: 40,
264265
Nickname: "ScP",
265266
Type: 0,

0 commit comments

Comments
 (0)