fix !swap, blame nyuszika7h
don't remove all the returns in the sanity checks
This commit is contained in:
parent
bc8e7e6da1
commit
89b38794e1
@ -741,11 +741,13 @@ def replace(cli, nick, chan, rest):
|
|||||||
|
|
||||||
if nick in var.list_players():
|
if nick in var.list_players():
|
||||||
reply(cli, nick, chan, messages["already_playing"].format("You"), private=True)
|
reply(cli, nick, chan, messages["already_playing"].format("You"), private=True)
|
||||||
|
return
|
||||||
|
|
||||||
account = var.USERS[nick]["account"]
|
account = var.USERS[nick]["account"]
|
||||||
|
|
||||||
if not account or account == "*":
|
if not account or account == "*":
|
||||||
reply(cli, nick, chan, messages["not_logged_in"], private=True)
|
reply(cli, nick, chan, messages["not_logged_in"], private=True)
|
||||||
|
return
|
||||||
|
|
||||||
rest = rest.split()
|
rest = rest.split()
|
||||||
|
|
||||||
@ -760,10 +762,12 @@ def replace(cli, nick, chan, rest):
|
|||||||
target = user
|
target = user
|
||||||
else:
|
else:
|
||||||
reply(cli, nick, chan, messages["swap_notice"].format(botconfig.CMD_CHAR), private=True)
|
reply(cli, nick, chan, messages["swap_notice"].format(botconfig.CMD_CHAR), private=True)
|
||||||
|
return
|
||||||
|
|
||||||
if target is None:
|
if target is None:
|
||||||
msg = messages["account_not_playing"]
|
msg = messages["account_not_playing"]
|
||||||
reply(cli, nick, chan, msg, private=True)
|
reply(cli, nick, chan, msg, private=True)
|
||||||
|
return
|
||||||
else:
|
else:
|
||||||
pl = var.list_players() + list(var.VENGEFUL_GHOSTS.keys())
|
pl = var.list_players() + list(var.VENGEFUL_GHOSTS.keys())
|
||||||
pll = [var.irc_lower(i) for i in pl]
|
pll = [var.irc_lower(i) for i in pl]
|
||||||
@ -776,6 +780,7 @@ def replace(cli, nick, chan, rest):
|
|||||||
if (target not in var.list_players() and target not in var.VENGEFUL_GHOSTS) or target not in var.USERS:
|
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")
|
msg = messages["target_not_playing"].format(" longer" if target in var.DEAD else "t")
|
||||||
reply(cli, nick, chan, msg, private=True)
|
reply(cli, nick, chan, msg, private=True)
|
||||||
|
return
|
||||||
|
|
||||||
if var.USERS[target]["account"] == "*":
|
if var.USERS[target]["account"] == "*":
|
||||||
reply(cli, nick, chan, messages["target_not_logged_in"], private=True)
|
reply(cli, nick, chan, messages["target_not_logged_in"], private=True)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user