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:
Bruno Garcia
2008-08-08 21:30:19 +00:00
parent 0a4b20d412
commit e590dfe1bf
2 changed files with 4 additions and 4 deletions
@@ -229,7 +229,7 @@ public class Table
return TABLE_POSITION_OCCUPIED;
}
if (_bannedUsers != null && _bannedUsers.contains(player.username)) {
if (_bannedUsers != null && _bannedUsers.contains(player.getVisibleName())) {
return BANNED_FROM_TABLE;
}
@@ -253,13 +253,13 @@ public class Table
* Indicate to this table that a user was booted and should
* be prevented from rejoining.
*/
public void addBannedUser (Name username)
public void addBannedUser (int position)
{
if (_bannedUsers == null) {
_bannedUsers = new HashSet<Name>();
}
_bannedUsers.add(username);
_bannedUsers.add(players[position]);
}
/**
@@ -299,7 +299,7 @@ public class TableManager
}
// Remember to keep him banned
table.addBannedUser(table.players[position]);
table.addBannedUser(position);
// Remove the player from the table
if (notePlayerRemoved(table.bodyOids[position]) == null) {