usermode as config file option
This commit is contained in:
parent
e4e2014086
commit
f310eadb6a
@ -4,4 +4,7 @@ port = 6667
|
|||||||
channel = #bss
|
channel = #bss
|
||||||
nick = dr_devzo
|
nick = dr_devzo
|
||||||
name = dr. devzo
|
name = dr. devzo
|
||||||
|
|
||||||
|
usermode = -x
|
||||||
|
|
||||||
debug = true
|
debug = true
|
||||||
|
@ -9,8 +9,10 @@ import irclib
|
|||||||
# handler for when the bot has connected to IRC
|
# handler for when the bot has connected to IRC
|
||||||
def on_connect(connection, event):
|
def on_connect(connection, event):
|
||||||
# user modes
|
# user modes
|
||||||
# TODO: config file
|
try:
|
||||||
connection.mode(nick, '-x')
|
usermode = config.get('IRC', 'usermode')
|
||||||
|
connection.mode(nick, usermode)
|
||||||
|
except NoOptionError: pass
|
||||||
|
|
||||||
# join the specified channel
|
# join the specified channel
|
||||||
# TODO: support multiple
|
# TODO: support multiple
|
||||||
|
Loading…
Reference in New Issue
Block a user