pretty trivial variable renames for bot connection variables
This commit is contained in:
parent
51659c6078
commit
d1d54ca35c
10
dr.botzo.py
10
dr.botzo.py
|
@ -153,10 +153,10 @@ config.read([os.path.expanduser('~/.dr.botzo.cfg'), 'dr.botzo.cfg'])
|
||||||
# load necessary options
|
# load necessary options
|
||||||
try:
|
try:
|
||||||
# load connection info
|
# load connection info
|
||||||
server = config.get('IRC', 'server')
|
botserver = config.get('IRC', 'server')
|
||||||
port = config.getint('IRC', 'port')
|
botport = config.getint('IRC', 'port')
|
||||||
nick = config.get('IRC', 'nick')
|
botnick = config.get('IRC', 'nick')
|
||||||
ircname = config.get('IRC', 'name')
|
botircname = config.get('IRC', 'name')
|
||||||
except NoSectionError as e:
|
except NoSectionError as e:
|
||||||
sys.exit("Aborted due to error with necessary configuration: " + str(e))
|
sys.exit("Aborted due to error with necessary configuration: " + str(e))
|
||||||
except NoOptionError as e:
|
except NoOptionError as e:
|
||||||
|
@ -169,7 +169,7 @@ irclib.DEBUG = config.getboolean('IRC', 'debug')
|
||||||
|
|
||||||
# create IRC and server objects and connect
|
# create IRC and server objects and connect
|
||||||
irc = irclib.IRC()
|
irc = irclib.IRC()
|
||||||
server = irc.server().connect(server, port, nick, ircname)
|
server = irc.server().connect(botserver, botport, botnick, botircname)
|
||||||
|
|
||||||
# install handlers
|
# install handlers
|
||||||
server.add_global_handler("welcome", on_connect)
|
server.add_global_handler("welcome", on_connect)
|
||||||
|
|
Loading…
Reference in New Issue