usermode as config file option

This commit is contained in:
Brian S. Stephan 2010-07-24 11:45:46 -05:00
parent e4e2014086
commit f310eadb6a
2 changed files with 7 additions and 2 deletions

View File

@ -4,4 +4,7 @@ port = 6667
channel = #bss
nick = dr_devzo
name = dr. devzo
usermode = -x
debug = true

View File

@ -9,8 +9,10 @@ import irclib
# handler for when the bot has connected to IRC
def on_connect(connection, event):
# user modes
# TODO: config file
connection.mode(nick, '-x')
try:
usermode = config.get('IRC', 'usermode')
connection.mode(nick, usermode)
except NoOptionError: pass
# join the specified channel
# TODO: support multiple