|
@@ -147,15 +147,25 @@ export class RoomService {
|
|
|
type: 'room-maxing',
|
|
|
code: 308,
|
|
|
});
|
|
|
- socket.disconnect(true);
|
|
|
this.handleKickAction(RoomId, UserId);
|
|
|
- this.logger.warn(`308:超员kick--- RoomId:${RoomId}, UserId:${UserId}`);
|
|
|
+ this.logger.warn(
|
|
|
+ `308:room-maxing`,
|
|
|
+ `308:超员kick--- RoomId:${RoomId}, UserId:${UserId}`,
|
|
|
+ );
|
|
|
+ socket.disconnect(true);
|
|
|
+
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (!blockJoin) {
|
|
|
if (!isExist) {
|
|
|
- await this.userService.insertUser(socket.data.user);
|
|
|
+ if (!socket.data.banning) {
|
|
|
+ this.logger.warn(
|
|
|
+ `insertUser::`,
|
|
|
+ `${socket.data.user.UserId}当前不是超员。`,
|
|
|
+ );
|
|
|
+ await this.userService.insertUser(socket.data.user);
|
|
|
+ }
|
|
|
socket.data.banning = false;
|
|
|
} else {
|
|
|
const updated = await this.userService.updateUsers(socket.data.user);
|