From bb6e3e9dfe654ae5b11ac285df23aa7d5f4efaf0 Mon Sep 17 00:00:00 2001 From: nyuszika7h Date: Mon, 3 Nov 2014 14:25:26 +0100 Subject: [PATCH] fallow, fdeny: Add temporary warning about persistence Or rather, the lack of it. --- modules/wolfgame.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/modules/wolfgame.py b/modules/wolfgame.py index 926ad58..79a9c93 100644 --- a/modules/wolfgame.py +++ b/modules/wolfgame.py @@ -5217,8 +5217,19 @@ def deny(cli, nick, chan, rest): @cmd("fallow", admin_only=True) def fallow(cli, nick, chan, rest): """Allow someone to use an admin command.""" + allow(cli, nick, chan, rest) + # TODO: Remove this after code to save this to the database has been + # implemented. + msg = ("\u0002Warning:\u0002 This change has not been saved to the " + "database. It will be lost after a restart.") + + if chan == nick: + pm(cli, nick, msg) + else: + cli.notice(nick, msg) + @pmcmd("fallow", admin_only=True) def fallow_pm(cli, nick, rest): @@ -5230,6 +5241,16 @@ def fdeny(cli, nick, chan, rest): """Deny someone from using a command.""" deny(cli, nick, chan, rest) + # TODO: Remove this after code to save this to the database has been + # implemented. + msg = ("\u0002Warning:\u0002 This change has not been saved to the " + "database. It will be lost after a restart.") + + if chan == nick: + pm(cli, nick, msg) + else: + cli.notice(nick, msg) + @pmcmd("fdeny", admin_only=True) def fdeny_pm(cli, nick, rest):