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