From 94bfb279e65413711248dbc19b51a12bfee9590c Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Wed, 2 Feb 2005 04:42:22 +0000 Subject: [PATCH] Some format character changes, and a little more information on the "Topic exceeds maximum length" error message. --- plugins/Topic/plugin.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/Topic/plugin.py b/plugins/Topic/plugin.py index 026debfad..8cd027e2a 100644 --- a/plugins/Topic/plugin.py +++ b/plugins/Topic/plugin.py @@ -53,7 +53,7 @@ def getTopic(irc, msg, args, state, format=True): separator = state.cb.registryValue('separator', state.channel) if separator in args[0]: irc.errorInvalid('topic', args[0], - format('The topic must not include %s.', separator)) + format('The topic must not include %q.', separator)) topic = args.pop(0) if format: env = {'topic': topic} @@ -144,7 +144,8 @@ class Topic(callbacks.Privmsg): if len(newTopic) > maxLen: if self.registryValue('recognizeTopiclen', channel): irc.error(format('That topic is too long for this server ' - '(maximum length: %s).', maxLen), + '(maximum length: %i; this topic: %i).', + maxLen, len(newTopic)), Raise=True) except KeyError: pass @@ -256,7 +257,7 @@ class Topic(callbacks.Privmsg): topics = self._splitTopic(irc.state.getTopic(channel), channel) L = [] for (i, t) in enumerate(topics): - L.append(format('%s: %s', i+1, utils.str.ellipsisify(t, 30))) + L.append(format('%i: %s', i+1, utils.str.ellipsisify(t, 30))) s = utils.str.commaAndify(L) irc.reply(s) list = wrap(list, ['inChannel'])