mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 03:33:11 +01:00
Add support for network-specific umodes.
This commit is contained in:
parent
b5c99b1ce1
commit
e3d170d9fe
@ -289,6 +289,10 @@ def registerNetwork(name, password='', ssl=False, sasl_username='',
|
|||||||
registerGlobalValue(network, 'nick', ValidNickOrEmpty('', _("""Determines
|
registerGlobalValue(network, 'nick', ValidNickOrEmpty('', _("""Determines
|
||||||
what nick the bot will use on this network. If empty, defaults to
|
what nick the bot will use on this network. If empty, defaults to
|
||||||
supybot.nick.""")))
|
supybot.nick.""")))
|
||||||
|
registerGlobalValue(network, 'umodes',
|
||||||
|
registry.String('', _("""Determines what user modes the bot will request
|
||||||
|
from the server when it first connects. If empty, defaults to
|
||||||
|
supybot.protocols.irc.umodes""")))
|
||||||
sasl = registerGroup(network, 'sasl')
|
sasl = registerGroup(network, 'sasl')
|
||||||
registerGlobalValue(sasl, 'username', registry.String(sasl_username,
|
registerGlobalValue(sasl, 'username', registry.String(sasl_username,
|
||||||
_("""Determines what SASL username will be used on %s. This should
|
_("""Determines what SASL username will be used on %s. This should
|
||||||
|
@ -966,7 +966,9 @@ class Irc(IrcCommandDispatcher):
|
|||||||
self.afterConnect = True
|
self.afterConnect = True
|
||||||
# Let's reset nicks in case we had to use a weird one.
|
# Let's reset nicks in case we had to use a weird one.
|
||||||
self.alternateNicks = conf.supybot.nick.alternates()[:]
|
self.alternateNicks = conf.supybot.nick.alternates()[:]
|
||||||
umodes = conf.supybot.protocols.irc.umodes()
|
umodes = conf.supybot.networks.get(self.network).umodes()
|
||||||
|
if umodes == '':
|
||||||
|
umodes = conf.supybot.protocols.irc.umodes()
|
||||||
supported = self.state.supported.get('umodes')
|
supported = self.state.supported.get('umodes')
|
||||||
if umodes:
|
if umodes:
|
||||||
addSub = '+'
|
addSub = '+'
|
||||||
|
Loading…
Reference in New Issue
Block a user