Let's safe-argument this thing earlier.

This commit is contained in:
Jeremy Fincher 2004-09-30 07:36:55 +00:00
parent b4ad7ca863
commit 6878510d7e

View File

@ -701,13 +701,12 @@ class IrcObjectProxy(RichReplyMethods):
# No matching regexp commands, now we do invalidCommands. # No matching regexp commands, now we do invalidCommands.
self._callInvalidCommands() self._callInvalidCommands()
elif len(cbs) > 1: elif len(cbs) > 1:
names = sorted([cb.name() for cb in cbs])
return self.error('The command %s is available in the %s plugins. ' return self.error('The command %s is available in the %s plugins. '
'Please specify the plugin whose command you ' 'Please specify the plugin whose command you '
'wish to call by using its name as a command ' 'wish to call by using its name as a command '
'before %s.' % 'before %s.' %
(command, (command, utils.commaAndify(names), command))
sorted([cb.name() for cb in cbs]),
command))
else: else:
cb = cbs[0] cb = cbs[0]
del self.args[0] # Remove the command. del self.args[0] # Remove the command.
@ -755,6 +754,7 @@ class IrcObjectProxy(RichReplyMethods):
self.to = self.to or to self.to = self.to or to
# action=True implies noLengthCheck=True and prefixName=False # action=True implies noLengthCheck=True and prefixName=False
self.noLengthCheck=noLengthCheck or self.noLengthCheck or self.action self.noLengthCheck=noLengthCheck or self.noLengthCheck or self.action
s = ircutils.safeArgument(s)
if self.finalEvaled: if self.finalEvaled:
try: try:
if not isinstance(self.irc, irclib.Irc): if not isinstance(self.irc, irclib.Irc):
@ -778,7 +778,6 @@ class IrcObjectProxy(RichReplyMethods):
self.irc.queueMsg(m) self.irc.queueMsg(m)
return m return m
else: else:
s = ircutils.safeArgument(s)
allowedLength = 450 - len(self.irc.prefix) allowedLength = 450 - len(self.irc.prefix)
maximumMores = conf.supybot.reply.mores.maximum() maximumMores = conf.supybot.reply.mores.maximum()
maximumLength = allowedLength * maximumMores maximumLength = allowedLength * maximumMores