mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 11:12:47 +01:00
Added more support for passworded servers.
This commit is contained in:
parent
16374c53d6
commit
6e0aff9fb2
@ -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':
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user