mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59: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))
|
irc.error(format('You must be in %s to use this command.', channel))
|
||||||
return
|
return
|
||||||
try:
|
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)
|
curUsers = len(irc.state.channels[channel].users)
|
||||||
s = format(_('On %s there %h been %i messages, containing %i '
|
s = format(_('On %s there %h been %i messages, containing %i '
|
||||||
'characters, %n, %n, and %n; '
|
'characters, %n, %n, and %n; '
|
||||||
@ -387,7 +389,7 @@ class ChannelStats(callbacks.Plugin):
|
|||||||
irc.reply(s)
|
irc.reply(s)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
irc.error(format(_('I\'ve never been on %s.'), channel))
|
irc.error(format(_('I\'ve never been on %s.'), channel))
|
||||||
channelstats = wrap(channelstats, ['channeldb'])
|
channelstats = wrap(channelstats, ['channel'])
|
||||||
|
|
||||||
|
|
||||||
Class = ChannelStats
|
Class = ChannelStats
|
||||||
|
Loading…
Reference in New Issue
Block a user