From 85fbc9ea9db22e4dd9345d49dcc4536a140e4341 Mon Sep 17 00:00:00 2001 From: James Lu Date: Thu, 29 Jun 2017 18:08:41 -0700 Subject: [PATCH] relay_clientbot: use isinstance(obj, dict) & cleanup imports (#410) --- plugins/relay_clientbot.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugins/relay_clientbot.py b/plugins/relay_clientbot.py index 48fcf89..3597380 100644 --- a/plugins/relay_clientbot.py +++ b/plugins/relay_clientbot.py @@ -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.