diff --git a/plugins/fantasy.py b/plugins/fantasy.py index 6632a08..3dcc223 100644 --- a/plugins/fantasy.py +++ b/plugins/fantasy.py @@ -29,7 +29,7 @@ def handle_fantasy(irc, source, command, args): # 2) The global "pylink::respond_to_nick" option # 3) The (deprecated) global "bot::respondtonick" option. respondtonick = conf.conf.get(botname, {}).get('respond_to_nick', - conf.conf['pylink'].get("respond_to_nick", conf.conf['bot'].get("respondtonick"))) + conf.conf['pylink'].get("respond_to_nick", conf.conf['pylink'].get("respondtonick"))) log.debug('(%s) fantasy: checking bot %s', irc.name, botname) servuid = sbot.uids.get(irc.name) @@ -38,7 +38,7 @@ def handle_fantasy(irc, source, command, args): # Look up a string prefix for this bot in either its own configuration block, or # in bot::prefixes::. prefixes = [conf.conf.get(botname, {}).get('prefix', - conf.conf['bot'].get('prefixes', {}).get(botname))] + conf.conf['pylink'].get('prefixes', {}).get(botname))] # If responding to nick is enabled, add variations of the current nick # to the prefix list: "," and ":" diff --git a/protocols/hybrid.py b/protocols/hybrid.py index c9ac8e9..24f4703 100644 --- a/protocols/hybrid.py +++ b/protocols/hybrid.py @@ -85,7 +85,7 @@ class HybridProtocol(TS6Protocol): f('CAPAB :TBURST DLN KNOCK UNDLN UNKLN KLN ENCAP IE EX HOPS CHW SVS CLUSTER EOB QS') f('SERVER %s 0 :%s' % (self.serverdata["hostname"], - self.serverdata.get('serverdesc') or conf.conf['bot']['serverdesc'])) + self.serverdata.get('serverdesc') or conf.conf['pylink']['serverdesc'])) # send endburst now self.send(':%s EOB' % (self.sid,)) @@ -107,7 +107,7 @@ class HybridProtocol(TS6Protocol): uid = self.uidgen[server].next_uid() ts = ts or int(time.time()) - realname = realname or conf.conf['bot']['realname'] + realname = realname or conf.conf['pylink']['realname'] realhost = realhost or host raw_modes = self.join_modes(modes) u = self.users[uid] = User(self, nick, ts, uid, server, ident=ident, host=host, realname=realname, diff --git a/protocols/inspircd.py b/protocols/inspircd.py index 82a3c89..3a8c240 100644 --- a/protocols/inspircd.py +++ b/protocols/inspircd.py @@ -60,7 +60,7 @@ class InspIRCdProtocol(TS6BaseProtocol): uid = self.uidgen[server].next_uid() ts = ts or int(time.time()) - realname = realname or conf.conf['bot']['realname'] + realname = realname or conf.conf['pylink']['realname'] realhost = realhost or host raw_modes = self.join_modes(modes) u = self.users[uid] = User(self, nick, ts, uid, server, ident=ident, host=host, realname=realname, @@ -347,7 +347,7 @@ class InspIRCdProtocol(TS6BaseProtocol): name = name.lower() # "desc" defaults to the configured server description. - desc = desc or self.serverdata.get('serverdesc') or conf.conf['bot']['serverdesc'] + desc = desc or self.serverdata.get('serverdesc') or conf.conf['pylink']['serverdesc'] if sid is None: # No sid given; generate one! sid = self.sidgen.next_sid() @@ -419,7 +419,7 @@ class InspIRCdProtocol(TS6BaseProtocol): host = self.serverdata["hostname"] f('SERVER {host} {Pass} 0 {sid} :{sdesc}'.format(host=host, Pass=self.serverdata["sendpass"], sid=self.sid, - sdesc=self.serverdata.get('serverdesc') or conf.conf['bot']['serverdesc'])) + sdesc=self.serverdata.get('serverdesc') or conf.conf['pylink']['serverdesc'])) self._send_with_prefix(self.sid, 'BURST %s' % ts) # InspIRCd sends VERSION data on link, instead of whenever requested by a client. diff --git a/protocols/ngircd.py b/protocols/ngircd.py index 360b8df..db2d871 100644 --- a/protocols/ngircd.py +++ b/protocols/ngircd.py @@ -85,7 +85,7 @@ class NgIRCdProtocol(IRCS2SProtocol): if not self.is_internal_server(server): raise ValueError('Server %r is not a PyLink server!' % server) - realname = realname or conf.conf['bot']['realname'] + realname = realname or conf.conf['pylink']['realname'] uid = self._uidgen.next_uid(prefix=nick) userobj = self.users[uid] = User(self, nick, ts or int(time.time()), uid, server, ident=ident, host=host, realname=realname, @@ -114,7 +114,7 @@ class NgIRCdProtocol(IRCS2SProtocol): name = name.lower() sid = self._sidgen.next_sid(prefix=name) - desc = desc or self.serverdata.get('serverdesc') or conf.conf['bot']['serverdesc'] + desc = desc or self.serverdata.get('serverdesc') or conf.conf['pylink']['serverdesc'] if sid in self.servers: raise ValueError('A server named %r already exists!' % sid) diff --git a/protocols/p10.py b/protocols/p10.py index 6ff9eee..a1080d4 100644 --- a/protocols/p10.py +++ b/protocols/p10.py @@ -301,7 +301,7 @@ class P10Protocol(IRCS2SProtocol): # Fill in all the values we need ts = ts or int(time.time()) - realname = realname or conf.conf['bot']['realname'] + realname = realname or conf.conf['pylink']['realname'] realhost = realhost or host raw_modes = self.join_modes(modes) @@ -708,7 +708,7 @@ class P10Protocol(IRCS2SProtocol): # <- SERVER nefarious.midnight.vpn 1 1460673022 1460673239 J10 ABP]] +h6 :Nefarious2 test server uplink = uplink or self.sid name = name.lower() - desc = desc or self.serverdata.get('serverdesc') or conf.conf['bot']['serverdesc'] + desc = desc or self.serverdata.get('serverdesc') or conf.conf['pylink']['serverdesc'] if sid is None: # No sid given; generate one! sid = self.sidgen.next_sid() @@ -833,7 +833,7 @@ class P10Protocol(IRCS2SProtocol): # Encode our SID using P10 Base64. self.sid = sid = p10b64encode(self.serverdata["sid"]) - desc = self.serverdata.get('serverdesc') or conf.conf['bot']['serverdesc'] + desc = self.serverdata.get('serverdesc') or conf.conf['pylink']['serverdesc'] self._flags = [] diff --git a/protocols/ts6.py b/protocols/ts6.py index 8e1b099..2404e1f 100644 --- a/protocols/ts6.py +++ b/protocols/ts6.py @@ -59,7 +59,7 @@ class TS6Protocol(TS6BaseProtocol): # parameters: nickname, hopcount, nickTS, umodes, username, # visible hostname, IP address, UID, real hostname, account name, gecos ts = ts or int(time.time()) - realname = realname or conf.conf['bot']['realname'] + realname = realname or conf.conf['pylink']['realname'] raw_modes = self.join_modes(modes) u = self.users[uid] = User(self, nick, ts, uid, server, ident=ident, host=host, realname=realname, realhost=realhost or host, ip=ip, @@ -398,7 +398,7 @@ class TS6Protocol(TS6BaseProtocol): f('CAPAB :QS ENCAP EX CHW IE KNOCK SAVE SERVICES TB EUID RSFNC EOPMOD SAVETS_100 KLN') f('SERVER %s 0 :%s' % (self.serverdata["hostname"], - self.serverdata.get('serverdesc') or conf.conf['bot']['serverdesc'])) + self.serverdata.get('serverdesc') or conf.conf['pylink']['serverdesc'])) # Finally, end all the initialization with a PING - that's Charybdis' # way of saying end-of-burst :) diff --git a/protocols/ts6_common.py b/protocols/ts6_common.py index ffa7fd4..eacf228 100644 --- a/protocols/ts6_common.py +++ b/protocols/ts6_common.py @@ -169,7 +169,7 @@ class TS6BaseProtocol(IRCS2SProtocol): # -> :0AL SID test.server 1 0XY :some silly pseudoserver uplink = uplink or self.sid name = name.lower() - desc = desc or self.serverdata.get('serverdesc') or conf.conf['bot']['serverdesc'] + desc = desc or self.serverdata.get('serverdesc') or conf.conf['pylink']['serverdesc'] if sid is None: # No sid given; generate one! sid = self.sidgen.next_sid() diff --git a/protocols/unreal.py b/protocols/unreal.py index 4c1e5af..d91c186 100644 --- a/protocols/unreal.py +++ b/protocols/unreal.py @@ -61,7 +61,7 @@ class UnrealProtocol(TS6BaseProtocol): uid = self.uidgen[server].next_uid() ts = ts or int(time.time()) - realname = realname or conf.conf['bot']['realname'] + realname = realname or conf.conf['pylink']['realname'] realhost = realhost or host # Add +xt so that vHost cloaking always works. @@ -369,7 +369,7 @@ class UnrealProtocol(TS6BaseProtocol): # ESVID - Supports account names in services stamps instead of just the signon time. # AFAIK this doesn't actually affect services' behaviour? f('PROTOCTL SJOIN SJ3 NOQUIT NICKv2 VL UMODE2 PROTOCTL NICKIP EAUTH=%s SID=%s VHP ESVID' % (self.serverdata["hostname"], self.sid)) - sdesc = self.serverdata.get('serverdesc') or conf.conf['bot']['serverdesc'] + sdesc = self.serverdata.get('serverdesc') or conf.conf['pylink']['serverdesc'] f('SERVER %s 1 U%s-h6e-%s :%s' % (host, self.proto_ver, self.sid, sdesc)) f('NETINFO 1 %s %s * 0 0 0 :%s' % (self.start_ts, self.proto_ver, self.serverdata.get("netname", self.name))) self._send_with_prefix(self.sid, 'EOS') diff --git a/structures.py b/structures.py index 4a9acf2..e2841a2 100644 --- a/structures.py +++ b/structures.py @@ -215,7 +215,7 @@ class DataStore: log.debug('(DataStore:%s) using implementation %s', self.name, self.__class__.__name__) log.debug('(DataStore:%s) database path set to %s', self.name, self.filename) - self.save_frequency = save_frequency or conf.conf['bot'].get('save_delay', 300) + self.save_frequency = save_frequency or conf.conf['pylink'].get('save_delay', 300) log.debug('(DataStore:%s) saving every %s seconds', self.name, self.save_frequency) if default_db is not None: