Ban by visible name, not username: Thanks Ray
git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@717 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -229,7 +229,7 @@ public class Table
|
|||||||
return TABLE_POSITION_OCCUPIED;
|
return TABLE_POSITION_OCCUPIED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_bannedUsers != null && _bannedUsers.contains(player.username)) {
|
if (_bannedUsers != null && _bannedUsers.contains(player.getVisibleName())) {
|
||||||
return BANNED_FROM_TABLE;
|
return BANNED_FROM_TABLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -253,13 +253,13 @@ public class Table
|
|||||||
* Indicate to this table that a user was booted and should
|
* Indicate to this table that a user was booted and should
|
||||||
* be prevented from rejoining.
|
* be prevented from rejoining.
|
||||||
*/
|
*/
|
||||||
public void addBannedUser (Name username)
|
public void addBannedUser (int position)
|
||||||
{
|
{
|
||||||
if (_bannedUsers == null) {
|
if (_bannedUsers == null) {
|
||||||
_bannedUsers = new HashSet<Name>();
|
_bannedUsers = new HashSet<Name>();
|
||||||
}
|
}
|
||||||
|
|
||||||
_bannedUsers.add(username);
|
_bannedUsers.add(players[position]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -299,7 +299,7 @@ public class TableManager
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Remember to keep him banned
|
// Remember to keep him banned
|
||||||
table.addBannedUser(table.players[position]);
|
table.addBannedUser(position);
|
||||||
|
|
||||||
// Remove the player from the table
|
// Remove the player from the table
|
||||||
if (notePlayerRemoved(table.bodyOids[position]) == null) {
|
if (notePlayerRemoved(table.bodyOids[position]) == null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user