Fix previous commit

This commit is contained in:
nyuszika7h 2014-03-01 11:44:20 +01:00
parent 8e0468c5d4
commit 7439aa8f7b

View File

@ -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