From 58b3b2b9adc0cf594608920d5ac921a691585852 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Thu, 21 Dec 2023 15:16:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E7=B3=BB=E7=BB=9F=E5=85=AC?= =?UTF-8?q?=E5=91=8A=E5=8E=8B=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/gm/module.go | 2 +- modules/robot/modulerobot_gm.go | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/gm/module.go b/modules/gm/module.go index 198bc8b62..577fc6465 100644 --- a/modules/gm/module.go +++ b/modules/gm/module.go @@ -417,7 +417,7 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (errdata *pb.Er log.Field{Key: "uid", Value: session.GetUserId()}, log.Field{Key: "0", Value: datas[0]}, ) - } else if len(datas) == 2 && (datas[0] == "chat") { + } else if len(datas) == 1 && (datas[0] == "chat") { if module, err := this.service.GetModule(comm.ModuleChat); err == nil { if errdata = module.(comm.IChat).SendSysChatToWorld(session, comm.ChatSystem10, nil, 5, 0, "xxx", "25001"); errdata != nil { diff --git a/modules/robot/modulerobot_gm.go b/modules/robot/modulerobot_gm.go index a3a90b8d0..8469df1b1 100644 --- a/modules/robot/modulerobot_gm.go +++ b/modules/robot/modulerobot_gm.go @@ -92,6 +92,12 @@ func (this *ModuleRobot_GM) OncePipeline(robot IRobot) (err error) { err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message)) return } + //测试下系统公告 + if _, errdata = robot.SendMessage("gm", "cmd", &pb.GMCmdReq{Cmod: "bingo:chat"}); errdata != nil { + err = errors.New(fmt.Sprintf("code:%d message:%s", errdata.Code, errdata.Message)) + return + } + return }