Added a configuration variable for user modes.

This commit is contained in:
Jeremy Fincher 2004-08-28 06:10:09 +00:00
parent c3b32148b3
commit 003d7d4ecc
2 changed files with 11 additions and 0 deletions

View File

@ -669,6 +669,12 @@ registerGlobalValue(supybot.protocols.irc, 'strictRfc',
a nick such as services@this.network.server then you you should set this to a nick such as services@this.network.server then you you should set this to
False.""")) False."""))
registerGlobalValue(supybot.protocols.irc, 'umodes',
registry.String('', """Determines what user modes the bot will request from
the server when it first connects. Many people might choose +i; some
networks allow +x, which indicates to the auth services on those networks
that you should be given a fake host."""))
registerGlobalValue(supybot.protocols.irc, 'maxHistoryLength', registerGlobalValue(supybot.protocols.irc, 'maxHistoryLength',
registry.Integer(1000, """Determines how many old messages the bot will registry.Integer(1000, """Determines how many old messages the bot will
keep around in its history. Changing this variable will not take effect keep around in its history. Changing this variable will not take effect

View File

@ -686,6 +686,11 @@ 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 = umodes.lstrip('+')
if umodes:
log.info('Sending user modes to %s: +%s', self.network, umodes)
self.sendMsg(ircmsgs.mode(self.nick, '+%s' % umodes))
do377 = do422 = do376 do377 = do422 = do376
def do433(self, msg): def do433(self, msg):