Update ban feature
This commit is contained in:
@@ -102,7 +102,17 @@ export class GameRoom {
|
||||
}
|
||||
const position = ProtobufUtils.toPointInterface(positionMessage);
|
||||
|
||||
const user = new User(this.nextUserId, joinRoomMessage.getUseruuid(), position, false, this.positionNotifier, socket, joinRoomMessage.getTagList(), joinRoomMessage.getName(), ProtobufUtils.toCharacterLayerObjects(joinRoomMessage.getCharacterlayerList()));
|
||||
const user = new User(this.nextUserId,
|
||||
joinRoomMessage.getUseruuid(),
|
||||
joinRoomMessage.getIpaddress(),
|
||||
position,
|
||||
false,
|
||||
this.positionNotifier,
|
||||
socket,
|
||||
joinRoomMessage.getTagList(),
|
||||
joinRoomMessage.getName(),
|
||||
ProtobufUtils.toCharacterLayerObjects(joinRoomMessage.getCharacterlayerList())
|
||||
);
|
||||
this.nextUserId++;
|
||||
this.users.set(user.id, user);
|
||||
this.usersByUuid.set(user.uuid, user);
|
||||
@@ -112,7 +122,7 @@ export class GameRoom {
|
||||
|
||||
// Notify admins
|
||||
for (const admin of this.admins) {
|
||||
admin.sendUserJoin(user.uuid);
|
||||
admin.sendUserJoin(user.uuid, user.name, user.IPAddress);
|
||||
}
|
||||
|
||||
return user;
|
||||
@@ -135,7 +145,7 @@ export class GameRoom {
|
||||
|
||||
// Notify admins
|
||||
for (const admin of this.admins) {
|
||||
admin.sendUserLeft(user.uuid);
|
||||
admin.sendUserLeft(user.uuid, user.name, user.IPAddress);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -318,7 +328,7 @@ export class GameRoom {
|
||||
|
||||
// Let's send all connected users
|
||||
for (const user of this.users.values()) {
|
||||
admin.sendUserJoin(user.uuid);
|
||||
admin.sendUserJoin(user.uuid, user.name, user.IPAddress);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user