Alias: don't crash when doing alias info output because i forgot to update the reply calls.
This commit is contained in:
parent
04c5a641d1
commit
f4d69c90d4
@ -158,25 +158,25 @@ class DrBotIRC(irclib.IRC):
|
|||||||
|
|
||||||
self.config.set('Alias', whats[2], ' '.join(whats[3:]))
|
self.config.set('Alias', whats[2], ' '.join(whats[3:]))
|
||||||
replystr = 'Added alias ' + whats[2] + '.'
|
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 whats[0] == '!alias' and whats[1] == 'remove' and len(whats) >= 3:
|
||||||
if not self.config.has_section('Alias'):
|
if not self.config.has_section('Alias'):
|
||||||
self.config.add_section('Alias')
|
self.config.add_section('Alias')
|
||||||
|
|
||||||
if self.config.remove_option('Alias', whats[2]):
|
if self.config.remove_option('Alias', whats[2]):
|
||||||
replystr = 'Removed 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':
|
elif whats[0] == '!alias' and whats[1] == 'list':
|
||||||
try:
|
try:
|
||||||
if len(whats) > 2:
|
if len(whats) > 2:
|
||||||
alias = self.config.get('Alias', whats[2])
|
alias = self.config.get('Alias', whats[2])
|
||||||
return self.reply(connection, replypath, alias)
|
return self.reply(connection, event, alias)
|
||||||
else:
|
else:
|
||||||
alist = self.config.options('Alias')
|
alist = self.config.options('Alias')
|
||||||
alist.remove('debug')
|
alist.remove('debug')
|
||||||
alist.sort()
|
alist.sort()
|
||||||
liststr = ', '.join(alist)
|
liststr = ', '.join(alist)
|
||||||
return self.reply(connection, replypath, liststr)
|
return self.reply(connection, event, liststr)
|
||||||
except NoSectionError: pass
|
except NoSectionError: pass
|
||||||
except NoOptionError: pass
|
except NoOptionError: pass
|
||||||
except NoSectionError: pass
|
except NoSectionError: pass
|
||||||
|
Loading…
Reference in New Issue
Block a user