fix fquit not working in PM (to fquit someone from deadchat)
This commit is contained in:
parent
9b3768522b
commit
aee627b3e2
@ -1338,8 +1338,6 @@ def fjoin(cli, nick, chan, rest):
|
|||||||
@cmd("fleave", "fquit", admin_only=True, pm=True, phases=("join", "day", "night"))
|
@cmd("fleave", "fquit", admin_only=True, pm=True, phases=("join", "day", "night"))
|
||||||
def fleave(cli, nick, chan, rest):
|
def fleave(cli, nick, chan, rest):
|
||||||
"""Forces someone to leave the game."""
|
"""Forces someone to leave the game."""
|
||||||
if chan != botconfig.CHANNEL:
|
|
||||||
return
|
|
||||||
|
|
||||||
for a in re.split(" +",rest):
|
for a in re.split(" +",rest):
|
||||||
a = a.strip()
|
a = a.strip()
|
||||||
@ -1350,6 +1348,9 @@ def fleave(cli, nick, chan, rest):
|
|||||||
dcl = list(var.DEADCHAT_PLAYERS) if var.PHASE != "join" else []
|
dcl = list(var.DEADCHAT_PLAYERS) if var.PHASE != "join" else []
|
||||||
dcll = [x.lower() for x in dcl]
|
dcll = [x.lower() for x in dcl]
|
||||||
if a.lower() in pll:
|
if a.lower() in pll:
|
||||||
|
if chan != botconfig.CHANNEL:
|
||||||
|
reply(cli, nick, chan, "Forcing a live player to leave must be done in channel", True)
|
||||||
|
return
|
||||||
a = pl[pll.index(a.lower())]
|
a = pl[pll.index(a.lower())]
|
||||||
|
|
||||||
message = "\u0002{0}\u0002 is forcing \u0002{1}\u0002 to leave.".format(nick, a)
|
message = "\u0002{0}\u0002 is forcing \u0002{1}\u0002 to leave.".format(nick, a)
|
||||||
@ -1377,6 +1378,8 @@ def fleave(cli, nick, chan, rest):
|
|||||||
a = dcl[dcll.index(a.lower())]
|
a = dcl[dcll.index(a.lower())]
|
||||||
|
|
||||||
leave_deadchat(cli, a, force=nick)
|
leave_deadchat(cli, a, force=nick)
|
||||||
|
if nick.lower() not in dcll:
|
||||||
|
reply(cli, nick, chan, "You have forced {0} to leave the deadchat".format(a), True)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
cli.msg(chan, nick+": That person is not playing.")
|
cli.msg(chan, nick+": That person is not playing.")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user