Web: add trailing space for snarferPrefix at runtime

Before, the trailing space in the default snarferPrefix value disappears after a reload because spaces at the end of config lines are ignored.
This commit is contained in:
James Lu 2018-07-22 03:55:52 +00:00
parent 9374c1fee0
commit 2242aadde9
2 changed files with 2 additions and 2 deletions

View File

@ -63,7 +63,7 @@ conf.registerChannelValue(Web, 'snarferShowTargetDomain',
by the snarfer will be the original one (posted on IRC) or the target one
(got after following redirects, if any).""")))
conf.registerChannelValue(Web, 'snarferPrefix',
registry.String(_('Title: '), _("""Determines the string used at before
registry.String(_('Title:'), _("""Determines the string used at before
a web page's title.""")))
conf.registerChannelValue(Web, 'nonSnarfingRegexp',
registry.Regexp(None, _("""Determines what URLs matching the given regexp

View File

@ -200,7 +200,7 @@ class Web(callbacks.PluginRegexp):
if self.registryValue('snarferShowTargetDomain', channel)
else url)
prefix = self.registryValue('snarferPrefix', channel)
s = prefix + title
s = "%s %s" % (prefix, title)
if self.registryValue('snarferShowDomain', channel):
s += format(_(' (at %s)'), domain)
irc.reply(s, prefixNick=False)