mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
ChannelStats: Fix error when using @channelstats on a channel the bot did not join.
This commit is contained in:
parent
e65a722b2f
commit
bdec243909
@ -358,9 +358,11 @@ class ChannelStats(callbacks.Plugin):
|
|||||||
Returns the statistics for <channel>. <channel> is only necessary if
|
Returns the statistics for <channel>. <channel> is only necessary if
|
||||||
the message isn't sent on the channel itself.
|
the message isn't sent on the channel itself.
|
||||||
"""
|
"""
|
||||||
if msg.nick not in irc.state.channels[channel].users:
|
if channel not in irc.state.channels:
|
||||||
irc.error(format('You must be in %s to use this command.', channel))
|
irc.error(_('I am not in %s.', channel), Raise=True)
|
||||||
return
|
elif msg.nick not in irc.state.channels[channel].users:
|
||||||
|
irc.error(_('You must be in %s to use this command.') % channel,
|
||||||
|
Raise=True)
|
||||||
try:
|
try:
|
||||||
channeldb = conf.supybot.databases.plugins.channelSpecific. \
|
channeldb = conf.supybot.databases.plugins.channelSpecific. \
|
||||||
getChannelLink(channel)
|
getChannelLink(channel)
|
||||||
|
Loading…
Reference in New Issue
Block a user