mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
current -> currently
This commit is contained in:
parent
e02e0ec08b
commit
1dc359a385
@ -60,7 +60,7 @@ class TopicFormat(registry.String):
|
|||||||
registry.String.setValue(self, v)
|
registry.String.setValue(self, v)
|
||||||
else:
|
else:
|
||||||
self.error()
|
self.error()
|
||||||
|
|
||||||
conf.registerPlugin('Topic')
|
conf.registerPlugin('Topic')
|
||||||
conf.registerChannelValue(conf.supybot.plugins.Topic, 'separator',
|
conf.registerChannelValue(conf.supybot.plugins.Topic, 'separator',
|
||||||
registry.StringSurroundedBySpaces(' || ', """Determines what separator is
|
registry.StringSurroundedBySpaces(' || ', """Determines what separator is
|
||||||
@ -113,7 +113,7 @@ class Topic(callbacks.Privmsg):
|
|||||||
stack.append(topics)
|
stack.append(topics)
|
||||||
maxLen = self.registryValue('undo.max', channel)
|
maxLen = self.registryValue('undo.max', channel)
|
||||||
del stack[:len(stack)-maxLen]
|
del stack[:len(stack)-maxLen]
|
||||||
|
|
||||||
def _getUndo(self, channel):
|
def _getUndo(self, channel):
|
||||||
try:
|
try:
|
||||||
return self.undos[channel].pop()
|
return self.undos[channel].pop()
|
||||||
@ -125,7 +125,7 @@ class Topic(callbacks.Privmsg):
|
|||||||
return self.redos[channel].pop()
|
return self.redos[channel].pop()
|
||||||
except (KeyError, IndexError):
|
except (KeyError, IndexError):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def _sendTopics(self, irc, channel, topics, isDo=False):
|
def _sendTopics(self, irc, channel, topics, isDo=False):
|
||||||
topics = [s for s in topics if s and not s.isspace()]
|
topics = [s for s in topics if s and not s.isspace()]
|
||||||
self.lastTopics[channel] = topics
|
self.lastTopics[channel] = topics
|
||||||
@ -150,7 +150,7 @@ class Topic(callbacks.Privmsg):
|
|||||||
'is +t.' % channel, Raise=True)
|
'is +t.' % channel, Raise=True)
|
||||||
else:
|
else:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def _topicNumber(self, irc, n, topics=None, normalize=False):
|
def _topicNumber(self, irc, n, topics=None, normalize=False):
|
||||||
try:
|
try:
|
||||||
n = int(n)
|
n = int(n)
|
||||||
@ -180,9 +180,9 @@ class Topic(callbacks.Privmsg):
|
|||||||
topic = irc.state.channels[channel].topic
|
topic = irc.state.channels[channel].topic
|
||||||
irc.reply(topic)
|
irc.reply(topic)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
irc.error('I\'m not current in %s.' % channel)
|
irc.error('I\'m not currently in %s.' % channel)
|
||||||
topic = privmsgs.channel(topic)
|
topic = privmsgs.channel(topic)
|
||||||
|
|
||||||
def add(self, irc, msg, args, channel, insert=False):
|
def add(self, irc, msg, args, channel, insert=False):
|
||||||
"""[<channel>] <topic>
|
"""[<channel>] <topic>
|
||||||
|
|
||||||
@ -444,7 +444,7 @@ class Topic(callbacks.Privmsg):
|
|||||||
topics[second] = t
|
topics[second] = t
|
||||||
self._sendTopics(irc, channel, topics)
|
self._sendTopics(irc, channel, topics)
|
||||||
swap = privmsgs.channel(swap)
|
swap = privmsgs.channel(swap)
|
||||||
|
|
||||||
def default(self, irc, msg, args, channel):
|
def default(self, irc, msg, args, channel):
|
||||||
"""[<channel>]
|
"""[<channel>]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user