mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-30 23:09:23 +01:00
183a4cbd75
The following forms are supported in $account, with groups separated by a literal colon. All account and network name matching is currently case sensitive: $account -> Returns True (a match) if the target is registered. $account:accountname -> Returns True if the target's account name matches the one given, and the target is connected to the local network.. $account:accountname:netname -> Returns True if both the target's account name and origin network name match the ones given. $account:*:netname -> Matches all logged in users on the given network.
25 lines
719 B
Python
25 lines
719 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!!
|