diff --git a/src/settings.py b/src/settings.py index 5d4f301..2611d81 100644 --- a/src/settings.py +++ b/src/settings.py @@ -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 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.") +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 FORTUNE_CHANCE = 1/25 diff --git a/src/wolfgame.py b/src/wolfgame.py index 3041aed..94a4dda 100644 --- a/src/wolfgame.py +++ b/src/wolfgame.py @@ -612,17 +612,15 @@ def restart_program(cli, nick, chan, rest): var.RESTARTING = True -@cmd("ping", chan=False, 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") +@cmd("ping", pm=True) 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 ' - '"{0}help pingif" for more information.'.format(botconfig.CMD_CHAR)) + if chan == nick: + pm(cli, nick, message) + else: + cli.msg(chan, message) @cmd("simple", raw_nick=True, pm=True) def mark_simple_notify(cli, nick, chan, rest):