mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 11:12:47 +01:00
Moved file writing to later in the run.
This commit is contained in:
parent
8a18f03faa
commit
dd3ebb698f
@ -139,15 +139,6 @@ if __name__ == '__main__':
|
||||
postConnect = 'Would you like any other commands to run ' \
|
||||
'when the bot is finished connecting to the server?'
|
||||
afterConnect.append(anything('What command?'))
|
||||
for command in onStart:
|
||||
configfd.write(command)
|
||||
configfd.write('\n')
|
||||
configfd.write('\n')
|
||||
for command in afterConnect:
|
||||
configfd.write(command)
|
||||
configfd.write('\n')
|
||||
configfd.close()
|
||||
|
||||
###
|
||||
# Set owner user.
|
||||
###
|
||||
@ -157,11 +148,22 @@ if __name__ == '__main__':
|
||||
user = ircdb.IrcUser()
|
||||
user.setPassword(password)
|
||||
user.addCapability('owner')
|
||||
while yn('Would you like to add a hostmask for the owner?') == 'y':
|
||||
user.addHostmask(anything('What hostmask?'))
|
||||
ircdb.users.setUser(owner, user)
|
||||
|
||||
###
|
||||
# Finito!
|
||||
###
|
||||
for command in onStart:
|
||||
configfd.write(command)
|
||||
configfd.write('\n')
|
||||
configfd.write('\n')
|
||||
for command in afterConnect:
|
||||
configfd.write(command)
|
||||
configfd.write('\n')
|
||||
configfd.close()
|
||||
|
||||
print
|
||||
print 'You\'re done! Now run the bot with the command line:'
|
||||
print 'src/bot.py conf/%s' % name
|
||||
|
Loading…
Reference in New Issue
Block a user