mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 02:49:27 +01:00
ChannelStats: Fix bug when conf.supybot.databases.plugins.channelSpecific is true (KeyError in channels list).
This commit is contained in:
parent
70a169ab6f
commit
115f8001fe
@ -362,7 +362,9 @@ class ChannelStats(callbacks.Plugin):
|
||||
irc.error(format('You must be in %s to use this command.', channel))
|
||||
return
|
||||
try:
|
||||
stats = self.db.getChannelStats(channel)
|
||||
channeldb = conf.supybot.databases.plugins.channelSpecific. \
|
||||
getChannelLink(channel)
|
||||
stats = self.db.getChannelStats(channeldb)
|
||||
curUsers = len(irc.state.channels[channel].users)
|
||||
s = format(_('On %s there %h been %i messages, containing %i '
|
||||
'characters, %n, %n, and %n; '
|
||||
@ -387,7 +389,7 @@ class ChannelStats(callbacks.Plugin):
|
||||
irc.reply(s)
|
||||
except KeyError:
|
||||
irc.error(format(_('I\'ve never been on %s.'), channel))
|
||||
channelstats = wrap(channelstats, ['channeldb'])
|
||||
channelstats = wrap(channelstats, ['channel'])
|
||||
|
||||
|
||||
Class = ChannelStats
|
||||
|
Loading…
Reference in New Issue
Block a user