mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-16 22:53:08 +01:00
Fixed permissions bug.
This commit is contained in:
parent
42e1a7ca34
commit
aafc138745
@ -144,7 +144,12 @@ class Topic(callbacks.Privmsg):
|
|||||||
topics = irc.state.getTopic(channel).split(self.topicSeparator)
|
topics = irc.state.getTopic(channel).split(self.topicSeparator)
|
||||||
topic = topics.pop(number)
|
topic = topics.pop(number)
|
||||||
(topic, name) = self.topicUnformatter.match(topic).groups()
|
(topic, name) = self.topicUnformatter.match(topic).groups()
|
||||||
if name != ircdb.users.getUserName(msg.prefix) and \
|
try:
|
||||||
|
senderName = ircdb.users.getUserName(msg.prefix)
|
||||||
|
except KeyError:
|
||||||
|
irc.error(msg, conf.replyNoUser)
|
||||||
|
return
|
||||||
|
if name != senderName and \
|
||||||
not ircdb.checkCapabilities(msg.prfix, ('op', 'admin')):
|
not ircdb.checkCapabilities(msg.prfix, ('op', 'admin')):
|
||||||
irc.error(msg, 'You can only modify your own topics.')
|
irc.error(msg, 'You can only modify your own topics.')
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user