Minor changes.
- Small changes in fstasis() - Combined decorators for join() - Added a space in decorator for vote() - Added comma in decorator for freload()
This commit is contained in:
parent
959ef98f51
commit
bd303f5b48
@ -391,8 +391,7 @@ def fpinger(cli, nick, chan, rest):
|
|||||||
pinger(cli, nick, chan, rest)
|
pinger(cli, nick, chan, rest)
|
||||||
|
|
||||||
|
|
||||||
@cmd("j", raw_nick=True)
|
@cmd("join", "j", raw_nick=True)
|
||||||
@cmd("join", raw_nick=True)
|
|
||||||
def join(cli, nick, chann_, rest):
|
def join(cli, nick, chann_, rest):
|
||||||
"""Either starts a new game of Werewolf or joins an existing game that has not started yet."""
|
"""Either starts a new game of Werewolf or joins an existing game that has not started yet."""
|
||||||
pl = var.list_players()
|
pl = var.list_players()
|
||||||
@ -2581,19 +2580,21 @@ def on_error(cli, pfx, msg):
|
|||||||
raise SystemExit
|
raise SystemExit
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@pmcmd("fstasis", admin_only=True)
|
@pmcmd("fstasis", admin_only=True)
|
||||||
def fstasis(cli, nick, *rest):
|
def fstasis(cli, nick, rest):
|
||||||
data = rest[0].split()
|
"""Admin command for removing or setting stasis penalties."""
|
||||||
|
data = rest.split()
|
||||||
if data:
|
if data:
|
||||||
lusers = {k.lower(): v for k, v in var.USERS.items()}
|
lusers = {k.lower(): v for k, v in var.USERS.items()}
|
||||||
user = data[0].lower()
|
user = data[0].lower()
|
||||||
if user in lusers:
|
|
||||||
cloak = lusers[user]['cloak']
|
if user not in lusers:
|
||||||
else:
|
cli.msg(nick, "Sorry, {0} cannot be found.".format(data[0]))
|
||||||
cloak = None
|
|
||||||
cli.msg(nick, "Sorry, that user cannot be found.")
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
cloak = lusers[user]['cloak']
|
||||||
|
|
||||||
if len(data) == 1:
|
if len(data) == 1:
|
||||||
if cloak in var.STASISED:
|
if cloak in var.STASISED:
|
||||||
cli.msg(nick, "{0} ({1}) is in stasis for {2} games.".format(data[0], cloak, var.STASISED[cloak]))
|
cli.msg(nick, "{0} ({1}) is in stasis for {2} games.".format(data[0], cloak, var.STASISED[cloak]))
|
||||||
@ -3118,7 +3119,7 @@ def fsend(cli, nick, rest):
|
|||||||
print('fsend ({0}): {1}'.format(nick, rest))
|
print('fsend ({0}): {1}'.format(nick, rest))
|
||||||
cli.send(rest)
|
cli.send(rest)
|
||||||
|
|
||||||
@cmd("freload" "frehash", admin_only=True)
|
@cmd("freload", "frehash", admin_only=True)
|
||||||
def freload(cli, nick, chan, rest):
|
def freload(cli, nick, chan, rest):
|
||||||
try:
|
try:
|
||||||
# No, this doesn't clear the stasis list.
|
# No, this doesn't clear the stasis list.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user