diff --git a/scripts/setup.py b/scripts/setup.py index b506fa7c6..fd54a54da 100644 --- a/scripts/setup.py +++ b/scripts/setup.py @@ -74,6 +74,9 @@ if __name__ == '__main__': if ny('Does that server require connection on a non-standard port?')=='y': server = ':'.join(server, anything('What port is that?')) configfd.write('Server: %s\n' % server) + if ny('Does the server require a password to connect?') == 'y': + password = anything('What password would you like the bot to use?') + configfd.write('Pass: ' + password) nick = anything('What nick would you like the bot to use?') configfd.write('Nick: %s\n' % nick) if advanced and ny('Would you like to set a user/ident?') == 'y': diff --git a/src/bot.py b/src/bot.py index dede319f2..461892bb0 100755 --- a/src/bot.py +++ b/src/bot.py @@ -103,6 +103,7 @@ def processConfigFile(filename): return nick = d['nick'] server = d['server'] + password = d['password'] if server.find(':') != -1: (server, port) = server.split(':', 1) try: @@ -114,7 +115,7 @@ def processConfigFile(filename): server = (server, 6667) user = d['user'] or nick ident = d['ident'] or nick - irc = irclib.Irc(nick, user, ident) + irc = irclib.Irc(nick, user, ident, password) for Class in privmsgs.standardPrivmsgModules: irc.addCallback(Class()) world.startup = True