From 4284853a4ad349c7e967f2ea35b4a8deadebb40c Mon Sep 17 00:00:00 2001 From: James Lu Date: Sun, 5 Mar 2017 00:00:11 -0800 Subject: [PATCH] Irc: remove internal use of 'conf' and 'botdata' (#273) --- classes.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/classes.py b/classes.py index ef1cae2..6c830a8 100644 --- a/classes.py +++ b/classes.py @@ -23,7 +23,7 @@ try: except ImportError: raise ImportError("PyLink requires ircmatch to function; please install it and try again.") -from . import world, utils, structures, __version__ +from . import world, utils, structures, conf, __version__ from .log import * ### Exceptions @@ -78,7 +78,7 @@ class Irc(utils.DeprecatedAttributesObject): Initializes any channel loggers defined for the current network. """ try: - channels = self.conf['logging']['channels'][self.name] + channels = conf.conf['logging']['channels'][self.name] except KeyError: # Not set up; just ignore. return @@ -103,7 +103,7 @@ class Irc(utils.DeprecatedAttributesObject): (Re)sets an IRC object to its default state. This should be called when an IRC object is first created, and on every reconnection to a network. """ - self.botdata = self.conf['bot'] + self.botdata = conf.conf['bot'] self.pingfreq = self.serverdata.get('pingfreq') or 90 self.pingtimeout = self.pingfreq * 3 @@ -303,7 +303,7 @@ class Irc(utils.DeprecatedAttributesObject): self.servers[self.sid] = IrcServer(None, host, internal=True, desc=self.serverdata.get('serverdesc') - or self.botdata['serverdesc']) + or conf.conf['bot']['serverdesc']) log.info('(%s) Starting ping schedulers....', self.name) self.schedulePing()