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]
|
userHostmask = msg.prefix.split('!', 1)[1]
|
||||||
try:
|
try:
|
||||||
chunk = self._mores[userHostmask].pop()
|
chunk = self._mores[userHostmask].pop()
|
||||||
irc.reply(msg, chunk)
|
if self._mores[userHostmask]:
|
||||||
|
chunk += ' (more)'
|
||||||
|
irc.reply(msg, chunk, True)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
irc.error(msg, 'You haven\'t asked me a command!')
|
irc.error(msg, 'You haven\'t asked me a command!')
|
||||||
except IndexError:
|
except IndexError:
|
||||||
|
@ -333,10 +333,12 @@ class IrcObjectProxy:
|
|||||||
debug.recoverableException()
|
debug.recoverableException()
|
||||||
self.error(self.msg, debug.exnToString(e))
|
self.error(self.msg, debug.exnToString(e))
|
||||||
|
|
||||||
def reply(self, msg, s):
|
def reply(self, msg, s, noLengthCheck=False):
|
||||||
if self.finalEvaled:
|
if self.finalEvaled:
|
||||||
if isinstance(self.irc, self.__class__):
|
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:
|
else:
|
||||||
# The size of a PRIVMSG is:
|
# The size of a PRIVMSG is:
|
||||||
# 1 for the colon
|
# 1 for the colon
|
||||||
@ -356,7 +358,7 @@ class IrcObjectProxy:
|
|||||||
# 512 - 51 == 461.
|
# 512 - 51 == 461.
|
||||||
s = ircutils.safeArgument(s)
|
s = ircutils.safeArgument(s)
|
||||||
allowedLength = 461 - len(self.irc.prefix)
|
allowedLength = 461 - len(self.irc.prefix)
|
||||||
msgs = textwrap.wrap(s, allowedLength)
|
msgs = textwrap.wrap(s, allowedLength-30) # -30 is for "nick:"
|
||||||
msgs.reverse()
|
msgs.reverse()
|
||||||
response = msgs.pop()
|
response = msgs.pop()
|
||||||
if msgs:
|
if msgs:
|
||||||
|
Loading…
Reference in New Issue
Block a user