fix crash when trying to !swap to someone not in var.USERS (fake nicks in debug mode)

This commit is contained in:
jacob1 2016-01-02 01:21:45 -05:00
parent 9ef0696da8
commit 9f64b13489

View File

@ -775,7 +775,7 @@ def replace(cli, nick, chan, rest):
if target is not None:
target = pl[pll.index(target)]
if target not in var.list_players() and target not in var.VENGEFUL_GHOSTS:
if (target not in var.list_players() and target not in var.VENGEFUL_GHOSTS) or target not in var.USERS:
msg = messages["target_not_playing"].format(" longer" if target in var.DEAD else "t")
if chan == nick:
pm(cli, nick, msg)
@ -783,7 +783,6 @@ def replace(cli, nick, chan, rest):
cli.notice(nick, msg)
return
if target in var.USERS:
if var.USERS[target]["account"] == "*":
if chan == nick:
pm(cli, nick, messages["target_not_logged_in"])