mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
Fixed bug in more stuff.
This commit is contained in:
parent
3873b351f4
commit
723ff123e1
@ -218,7 +218,9 @@ class MiscCommands(callbacks.Privmsg):
|
||||
userHostmask = msg.prefix.split('!', 1)[1]
|
||||
try:
|
||||
chunk = self._mores[userHostmask].pop()
|
||||
irc.reply(msg, chunk)
|
||||
if self._mores[userHostmask]:
|
||||
chunk += ' (more)'
|
||||
irc.reply(msg, chunk, True)
|
||||
except KeyError:
|
||||
irc.error(msg, 'You haven\'t asked me a command!')
|
||||
except IndexError:
|
||||
|
@ -333,10 +333,12 @@ class IrcObjectProxy:
|
||||
debug.recoverableException()
|
||||
self.error(self.msg, debug.exnToString(e))
|
||||
|
||||
def reply(self, msg, s):
|
||||
def reply(self, msg, s, noLengthCheck=False):
|
||||
if self.finalEvaled:
|
||||
if isinstance(self.irc, self.__class__):
|
||||
self.irc.reply(msg, s)
|
||||
self.irc.reply(msg, s, noLengthCheck)
|
||||
elif noLengthCheck:
|
||||
self.irc.queueMsg(reply(msg, s))
|
||||
else:
|
||||
# The size of a PRIVMSG is:
|
||||
# 1 for the colon
|
||||
@ -356,7 +358,7 @@ class IrcObjectProxy:
|
||||
# 512 - 51 == 461.
|
||||
s = ircutils.safeArgument(s)
|
||||
allowedLength = 461 - len(self.irc.prefix)
|
||||
msgs = textwrap.wrap(s, allowedLength)
|
||||
msgs = textwrap.wrap(s, allowedLength-30) # -30 is for "nick:"
|
||||
msgs.reverse()
|
||||
response = msgs.pop()
|
||||
if msgs:
|
||||
|
Loading…
Reference in New Issue
Block a user