Alias: don't crash when doing alias info output because i forgot to update the reply calls.

This commit is contained in:
Brian S. Stephan 2011-02-17 10:07:29 -06:00
parent 04c5a641d1
commit f4d69c90d4
1 changed files with 4 additions and 4 deletions

View File

@ -158,25 +158,25 @@ class DrBotIRC(irclib.IRC):
self.config.set('Alias', whats[2], ' '.join(whats[3:]))
replystr = 'Added alias ' + whats[2] + '.'
return self.reply(connection, replypath, replystr)
return self.reply(connection, event, replystr)
if whats[0] == '!alias' and whats[1] == 'remove' and len(whats) >= 3:
if not self.config.has_section('Alias'):
self.config.add_section('Alias')
if self.config.remove_option('Alias', whats[2]):
replystr = 'Removed alias ' + whats[2] + '.'
return self.reply(connection, replypath, replystr)
return self.reply(connection, event, replystr)
elif whats[0] == '!alias' and whats[1] == 'list':
try:
if len(whats) > 2:
alias = self.config.get('Alias', whats[2])
return self.reply(connection, replypath, alias)
return self.reply(connection, event, alias)
else:
alist = self.config.options('Alias')
alist.remove('debug')
alist.sort()
liststr = ', '.join(alist)
return self.reply(connection, replypath, liststr)
return self.reply(connection, event, liststr)
except NoSectionError: pass
except NoOptionError: pass
except NoSectionError: pass