This commit is contained in:
@@ -1,20 +1,9 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"blazing/common/socket/errorcode"
|
||||
"blazing/cool"
|
||||
"blazing/modules/player/service"
|
||||
// // CreatePlayer 处理命令: 1001
|
||||
// func (h Controller) CreatePlayer(data *user.CreatePlayerInboundInfo, c gnet.Conn) (result *user.CreatePlayerOutInfo, err errorcode.ErrorCode) {
|
||||
// data.Nickname = strings.Trim(data.Nickname, "\x00")
|
||||
// service.NewUserService(data.Head.UserID).Info.Reg(cool.Filter.Replace(data.Nickname, '*'), data.Color)
|
||||
|
||||
"blazing/logic/service/user"
|
||||
"strings"
|
||||
|
||||
"github.com/panjf2000/gnet/v2"
|
||||
)
|
||||
|
||||
// CreatePlayer 处理命令: 1001
|
||||
func (h Controller) CreatePlayer(data *user.CreatePlayerInboundInfo, c gnet.Conn) (result *user.CreatePlayerOutInfo, err errorcode.ErrorCode) {
|
||||
data.Nickname = strings.Trim(data.Nickname, "\x00")
|
||||
service.NewUserService(data.Head.UserID).Info.Reg(cool.Filter.Replace(data.Nickname, '*'), data.Color)
|
||||
|
||||
return result, 0
|
||||
}
|
||||
// return result, 0
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user