feat 踢人功能

This commit is contained in:
2026-01-08 22:57:58 +08:00
parent 265e522aff
commit 5af027b35c
5 changed files with 15 additions and 2 deletions

View File

@@ -59,5 +59,8 @@ func (s *Server) ToClient(server grpc_pb.Gateway_ToClientServer) error {
}
func (s *Server) KickUser(ctx context.Context, req *grpc_pb.KickUserReq) (*grpc_pb.KickUserResp, error) {
if cli := client.UserMgr.GetByUSN(req.USN); cli != nil {
cli.CloseClient()
}
return &grpc_pb.KickUserResp{}, nil
}