fix ORIGINAL_ROLES not being updated on player swaps
This commit is contained in:
parent
141bab2624
commit
bd66621a43
@ -72,7 +72,7 @@ var.LAST_GOAT = {}
|
|||||||
var.USERS = {}
|
var.USERS = {}
|
||||||
|
|
||||||
var.ADMIN_PINGING = False
|
var.ADMIN_PINGING = False
|
||||||
var.ORIGINAL_ROLES = {}
|
var.ORIGINAL_ROLES = {} # type: Dict[str, Set[users.User]]
|
||||||
var.DCED_LOSERS = set() # type: Set[users.User]
|
var.DCED_LOSERS = set() # type: Set[users.User]
|
||||||
var.PLAYERS = {}
|
var.PLAYERS = {}
|
||||||
var.DCED_PLAYERS = {}
|
var.DCED_PLAYERS = {}
|
||||||
@ -602,6 +602,10 @@ def swap_player(evt, var, old_user, user):
|
|||||||
if old_user in players:
|
if old_user in players:
|
||||||
players.remove(old_user)
|
players.remove(old_user)
|
||||||
players.add(user)
|
players.add(user)
|
||||||
|
for role, players in var.ORIGINAL_ROLES.items():
|
||||||
|
if old_user in players:
|
||||||
|
players.remove(old_user)
|
||||||
|
players.add(user)
|
||||||
|
|
||||||
|
|
||||||
@command("pingif", "pingme", "pingat", "pingpref", pm=True)
|
@command("pingif", "pingme", "pingat", "pingpref", pm=True)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user