3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 09:19:23 +01:00
PyLink/world.py
James Lu f4922743fc core: SID and hostname options are now optional (#282)
Hostname defaults to a fallback hardcoded in world.fallback_hostname, while SID defaults to None (protocol modules have to deal with this themselves)
2016-07-28 22:23:59 -07:00

28 lines
839 B
Python

"""
world.py: Stores global variables for PyLink, including lists of active IRC objects and plugins.
"""
from collections import defaultdict
import threading
# This indicates whether we're running in tests modes. What it actually does
# though is control whether IRC connections should be threaded or not.
testing = False
# Statekeeping for our hooks list, IRC objects, loaded plugins, and initialized
# service bots.
hooks = defaultdict(list)
networkobjects = {}
plugins = {}
services = {}
# Registered extarget handlers. This maps exttarget names (strings) to handling functions.
exttarget_handlers = {}
started = threading.Event()
source = "https://github.com/GLolol/PyLink" # CHANGE THIS IF YOU'RE FORKING!!
# Fallback hostname used in various places internally when hostname isn't configured.
fallback_hostname = 'pylink.int'