From ce634b492340bd3e52ff36ba2cc1f6632c46c7e0 Mon Sep 17 00:00:00 2001 From: dave Date: Sun, 15 Oct 2017 21:40:07 -0700 Subject: [PATCH] uno fixes --- pyircbot/modules/UnoPlay.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pyircbot/modules/UnoPlay.py b/pyircbot/modules/UnoPlay.py index 6902e27..a34a430 100644 --- a/pyircbot/modules/UnoPlay.py +++ b/pyircbot/modules/UnoPlay.py @@ -48,7 +48,7 @@ class UnoPlay(ModuleBase): """ if trailing.startswith("["): # anti-znc buffer playback return - if self.config["unobot"] not in prefix: + if not prefix or self.config["unobot"] not in prefix: return if "You don't have that card" in trailing: @@ -98,6 +98,10 @@ class UnoPlay(ModuleBase): self.pickcolor() return + if "Choose a color" in trailing and self.bot.get_nick() not in trailing: + # Waiting for other guy to choose a color + return + # See if someone passed to us if "passes" in trailing and self.bot.get_nick() in trailing: self.shouldgo = True @@ -281,6 +285,8 @@ class UnoPlay(ModuleBase): if self.has_drawn: self.has_drawn = False self.shouldgo = False + if self.config["enable_delays"]: + time.sleep(self.config["randomhuman_sleep"]) self.bot.act_PRIVMSG(self.config["unochannel"], "pa") else: self.has_drawn = True