From b100f30cfe537fc3e0cbc1f2773cf32fbe98306a Mon Sep 17 00:00:00 2001 From: James Lu Date: Sun, 27 Mar 2016 21:41:35 -0700 Subject: [PATCH] fantasy: break if IRC object isn't ready --- plugins/fantasy.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/fantasy.py b/plugins/fantasy.py index 19907cd..2010638 100644 --- a/plugins/fantasy.py +++ b/plugins/fantasy.py @@ -8,6 +8,11 @@ from log import log def handle_fantasy(irc, source, command, args): """Fantasy command handler.""" + + if not irc.connected.is_set(): + # Break if the IRC network isn't ready. + return + try: # First, try to fetch the config-defined prefix. prefixes = [irc.botdata["prefix"]] except KeyError: # Config option is missing.