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 }