uno fixes

This commit is contained in:
dave 2017-10-15 21:40:07 -07:00
parent d24e9b751d
commit ce634b4923
1 changed files with 7 additions and 1 deletions

View File

@ -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