mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 01:09:22 +01:00
PyLinkNC: don't overwrite sid, serverdata if they're already set
This commit is contained in:
parent
24f85acfb8
commit
4f17a7986b
@ -229,8 +229,11 @@ class PyLinkNetworkCore(structures.CamelCaseToSnakeCase):
|
||||
self.loghandlers = []
|
||||
self.name = netname
|
||||
self.conf = conf.conf
|
||||
self.sid = None
|
||||
self.serverdata = conf.conf['servers'][netname]
|
||||
if not hasattr(self, 'sid'):
|
||||
self.sid = None
|
||||
# serverdata may be overridden as a property on some protocols
|
||||
if netname in conf.conf['servers'] and not hasattr(self, 'serverdata'):
|
||||
self.serverdata = conf.conf['servers'][netname]
|
||||
|
||||
self.protoname = self.__class__.__module__.split('.')[-1] # Remove leading pylinkirc.protocols.
|
||||
self.proto = self.irc = self # Backwards compat
|
||||
|
Loading…
Reference in New Issue
Block a user