fjoin: Remove stasis if it's 1 game, error otherwise
This commit is contained in:
parent
a6c4303e3e
commit
f7af95405a
@ -1230,12 +1230,6 @@ def join_player(cli, player, chan, who = None, forced = False):
|
|||||||
cli.msg("ChanServ", "op " + botconfig.CHANNEL)
|
cli.msg("ChanServ", "op " + botconfig.CHANNEL)
|
||||||
return
|
return
|
||||||
|
|
||||||
if is_user_stasised(player)[0] and not forced:
|
|
||||||
cli.notice(who, "Sorry, but {0} in stasis for {1} game{2}.".format(
|
|
||||||
"you are" if player == who else player + " is", is_user_stasised(player)[1],
|
|
||||||
"s" if is_user_stasised(player)[1] != 1 else ""))
|
|
||||||
return
|
|
||||||
|
|
||||||
if player in var.USERS:
|
if player in var.USERS:
|
||||||
cloak = var.USERS[player]["cloak"]
|
cloak = var.USERS[player]["cloak"]
|
||||||
acc = var.USERS[player]["account"]
|
acc = var.USERS[player]["account"]
|
||||||
@ -1247,6 +1241,21 @@ def join_player(cli, player, chan, who = None, forced = False):
|
|||||||
return # Not normal
|
return # Not normal
|
||||||
if not acc or acc == "*":
|
if not acc or acc == "*":
|
||||||
acc = None
|
acc = None
|
||||||
|
|
||||||
|
(is_stasised, stasis_amt) = is_user_stasised(player)
|
||||||
|
|
||||||
|
if is_stasised:
|
||||||
|
if forced and stasis_amt == 1:
|
||||||
|
if cloak in var.STASISED:
|
||||||
|
del var.STASISED[cloak]
|
||||||
|
if acc in var.STASISED_ACCS:
|
||||||
|
del var.STASISED_ACCS[acc]
|
||||||
|
else:
|
||||||
|
cli.notice(who, "Sorry, but {0} in stasis for {1} game{2}.".format(
|
||||||
|
"you are" if player == who else player + " is", is_user_stasised(player)[1],
|
||||||
|
"s" if is_user_stasised(player)[1] != 1 else ""))
|
||||||
|
return
|
||||||
|
|
||||||
cmodes = [("+v", player)]
|
cmodes = [("+v", player)]
|
||||||
if var.PHASE == "none":
|
if var.PHASE == "none":
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user