3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-25 12:12:53 +01:00

fantasy: break if IRC object isn't ready

This commit is contained in:
James Lu 2016-03-27 21:41:35 -07:00
parent cf363432f0
commit b100f30cfe

View File

@ -8,6 +8,11 @@ from log import log
def handle_fantasy(irc, source, command, args): def handle_fantasy(irc, source, command, args):
"""Fantasy command handler.""" """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. try: # First, try to fetch the config-defined prefix.
prefixes = [irc.botdata["prefix"]] prefixes = [irc.botdata["prefix"]]
except KeyError: # Config option is missing. except KeyError: # Config option is missing.