From 3cac7225e3626d9e725b873d06971b65f3426fcb Mon Sep 17 00:00:00 2001 From: wr34k Date: Tue, 3 Jul 2018 14:13:56 +0200 Subject: [PATCH] Add hability for admins to cancel a started fight --- irc/ircCommands.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/irc/ircCommands.py b/irc/ircCommands.py index e3e7910..75803c2 100644 --- a/irc/ircCommands.py +++ b/irc/ircCommands.py @@ -54,6 +54,11 @@ class IrcCommands(object): else: self.IRC.raw(" ".join(args)) + if cmd == 'cancel' and self.fight.state != 'inactive': + self.IRC.privmsg(chan, "Fight cancelled.") + self.fight.state = 'inactive' + self.fight.fighters = [] + if cmd == 'status': self.fight.getStatus(chan)