3
0
mirror of https://github.com/jlu5/PyLink.git synced 2025-01-23 18:54:05 +01:00

relay_clientbot: use isinstance(obj, dict) & cleanup imports (#410)

This commit is contained in:
James Lu 2017-06-29 18:08:41 -07:00
parent 8eebcb0b06
commit 85fbc9ea9d

View File

@ -1,8 +1,6 @@
# relay_clientbot.py: Clientbot extensions for Relay
import string
import collections
import time
import hashlib
from pylinkirc import utils, conf, world
from pylinkirc.log import log
@ -163,7 +161,7 @@ def cb_relay_core(irc, source, command, args):
if nicklist:
# Get channel-specific nick list if relevent.
if type(nicklist) == collections.defaultdict:
if isinstance(nicklist, dict):
nicklist = nicklist.get(target, [])
# Ignore if no nicks are affected on the channel.