Add random !ping replies

This commit is contained in:
Vgr E.Barry 2015-07-31 13:26:50 -04:00
parent 6fecec6df3
commit dc54fdc883
2 changed files with 13 additions and 9 deletions

View File

@ -267,6 +267,12 @@ QUIT_MESSAGES_NO_REVEAL = ("\u0002{0}\u0002 suddenly falls over dead before the
"\u0002{0}\u0002 fell off the roof of their house and is now dead.", "\u0002{0}\u0002 fell off the roof of their house and is now dead.",
"\u0002{0}\u0002 is crushed to death by a falling tree. The villagers desperately try to save them, but it is too late.", "\u0002{0}\u0002 is crushed to death by a falling tree. The villagers desperately try to save them, but it is too late.",
"\u0002{0}\u0002 suddenly bursts into flames and is now all but a memory.") "\u0002{0}\u0002 suddenly bursts into flames and is now all but a memory.")
PING_MESSAGES = ("Pong!", "Ping!", "Sure thing.", "No.", "!gniP", "!gnoP", "Segmentation fault", "Segmentation fault (core dumped)",
"{0}.exe has stopped working. Windows is searching a solution to the problem...".format(botconfig.NICK), "HTTP Error 418: I'm a teapot",
"An error has pinged and has been ponged.", "I'm here!", "I refuse!", "What?", "Don't you mean \u0002{0}ping\u0002?".format(botconfig.CMD_CHAR),
"skynet.exe has stopped working. Windows is searching a solution to the problem...", "No ping received for 1337 seconds.",
"Congratulations! You're the 1337th person to use {0}ping. You win a goat!".format(botconfig.CMD_CHAR))
GIF_CHANCE = 1/50 GIF_CHANCE = 1/50
FORTUNE_CHANCE = 1/25 FORTUNE_CHANCE = 1/25

View File

@ -612,17 +612,15 @@ def restart_program(cli, nick, chan, rest):
var.RESTARTING = True var.RESTARTING = True
@cmd("ping", chan=False, pm=True) @cmd("ping", pm=True)
def pong(cli, nick, chan, rest):
"""Check if you or the bot is still connected."""
pm(cli, nick, "Pong!")
@cmd("ping", "away", "back")
def pinger(cli, nick, chan, rest): def pinger(cli, nick, chan, rest):
"""Placeholder for the old ping-related commands.""" """Check if you or the bot is still connected."""
message = random.choice(var.PING_MESSAGES)
cli.notice(nick, 'This command has been removed. Please see ' if chan == nick:
'"{0}help pingif" for more information.'.format(botconfig.CMD_CHAR)) pm(cli, nick, message)
else:
cli.msg(chan, message)
@cmd("simple", raw_nick=True, pm=True) @cmd("simple", raw_nick=True, pm=True)
def mark_simple_notify(cli, nick, chan, rest): def mark_simple_notify(cli, nick, chan, rest):