Fix previous commit
This commit is contained in:
parent
8e0468c5d4
commit
7439aa8f7b
@ -244,17 +244,18 @@ def restart_program(cli, nick, *rest):
|
||||
@cmd("ping")
|
||||
def pinger(cli, nick, chan, rest):
|
||||
"""Pings the channel to get people's attention. Rate-Limited."""
|
||||
|
||||
if var.PHASE in ('night','day'):
|
||||
#cli.notice(nick, "You cannot use this command while a game is running.")
|
||||
cli.notice(nick, 'Pong!')
|
||||
return
|
||||
|
||||
if (var.LAST_PING and
|
||||
var.LAST_PING + timedelta(seconds=var.PING_WAIT) > datetime.now()):
|
||||
cli.notice(nick, ("This command is rate-limited. " +
|
||||
"Please wait a while before using it again."))
|
||||
return
|
||||
|
||||
if var.PHASE in ('night','day'):
|
||||
#cli.notice(nick, "You cannot use this command while a game is running.")
|
||||
#return
|
||||
cli.notice(nick, 'Pong!')
|
||||
|
||||
var.LAST_PING = datetime.now()
|
||||
if var.PINGING:
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user