mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Topic: Ensure do315's response is for a channel in our state object
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
This commit is contained in:
parent
26a458b9ec
commit
44eb449ba4
@ -236,7 +236,9 @@ class Topic(callbacks.Plugin):
|
|||||||
def do315(self, irc, msg):
|
def do315(self, irc, msg):
|
||||||
# Try to restore the topic when not set yet.
|
# Try to restore the topic when not set yet.
|
||||||
channel = msg.args[1]
|
channel = msg.args[1]
|
||||||
c = irc.state.channels[channel]
|
c = irc.state.channels.get(channel)
|
||||||
|
if c is None:
|
||||||
|
return
|
||||||
if irc.nick not in c.ops and 't' in c.modes:
|
if irc.nick not in c.ops and 't' in c.modes:
|
||||||
self.log.debug('Not trying to restore topic in %s. I\'m not opped '
|
self.log.debug('Not trying to restore topic in %s. I\'m not opped '
|
||||||
'and %s is +t.', channel, channel)
|
'and %s is +t.', channel, channel)
|
||||||
|
Loading…
Reference in New Issue
Block a user