From 70935119a42484cd5df6f0c3aff5fccf7328b5d1 Mon Sep 17 00:00:00 2001 From: meixiongfeng <766881921@qq.com> Date: Mon, 19 Sep 2022 11:00:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E6=8E=A8=E9=80=81gm=20=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E6=88=90=E5=8A=9F=E8=BF=98=E6=98=AF=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=EF=BC=8C=E5=AE=A2=E6=88=B7=E7=AB=AF=E7=9B=91=E5=90=AC=E7=89=A9?= =?UTF-8?q?=E5=93=81=E5=8F=98=E5=8C=96=E5=8D=B3=E5=8F=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/gm/module.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/gm/module.go b/modules/gm/module.go index fc0809ba2..f76f4eb3e 100644 --- a/modules/gm/module.go +++ b/modules/gm/module.go @@ -44,6 +44,7 @@ func (this *GM) OnInstallComp() { } func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (code pb.ErrorCode) { + code = pb.ErrorCode_ReqParameterError keys := strings.Split(cmd, ":") if len(keys) == 2 { if keys[0] == "bingo" { @@ -61,14 +62,9 @@ func (this *GM) CreateCmd(session comm.IUserSession, cmd string) (code pb.ErrorC N: int32(num), }, }, true) - if code == pb.ErrorCode_Success { // 成功直接返回 - session.SendMsg(string(this.GetType()), "cmd", &pb.GMCmdResp{IsSucc: true}) - return - } } } } - code = pb.ErrorCode_ReqParameterError - session.SendMsg(string(this.GetType()), "cmd", &pb.GMCmdResp{IsSucc: false}) + return }