mirror of
https://github.com/oddluck/limnoria-plugins.git
synced 2025-04-25 20:41:21 -05:00
SpiffyTitles: urlRegularExpression -> urlRegexp
This commit is contained in:
parent
17dfc21209
commit
9345cc6335
@ -306,7 +306,7 @@ titles will be shown in all channels. Default value: `""`
|
|||||||
|
|
||||||
`badLinkText` - The text to return when unable to retrieve a title from a URL. Default value: `Error retrieving title. Check the log for more details.`
|
`badLinkText` - The text to return when unable to retrieve a title from a URL. Default value: `Error retrieving title. Check the log for more details.`
|
||||||
|
|
||||||
`urlRegularExpression` - A regular expression override used to match URLs. You shouldn't need to change this.
|
`urlRegexp` - A regular expression override used to match URLs. You shouldn't need to change this.
|
||||||
|
|
||||||
`ignoreActionLinks` (Boolean) - By default SpiffyTitles will ignore links that appear in an action, like /me.
|
`ignoreActionLinks` (Boolean) - By default SpiffyTitles will ignore links that appear in an action, like /me.
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ conf.registerGlobalValue(
|
|||||||
# URL regex
|
# URL regex
|
||||||
conf.registerChannelValue(
|
conf.registerChannelValue(
|
||||||
SpiffyTitles,
|
SpiffyTitles,
|
||||||
"urlRegularExpression",
|
"urlRegexp",
|
||||||
registry.String(
|
registry.String(
|
||||||
r"", _("""If set, this regular expression will be used to match URLs"""),
|
r"", _("""If set, this regular expression will be used to match URLs"""),
|
||||||
),
|
),
|
||||||
|
@ -559,10 +559,7 @@ class SpiffyTitles(callbacks.Plugin):
|
|||||||
"""
|
"""
|
||||||
Find the first string that looks like a URL from the message
|
Find the first string that looks like a URL from the message
|
||||||
"""
|
"""
|
||||||
try:
|
url_re = self.registryValue("urlRegexp", channel)
|
||||||
url_re = self.registryValue("urlRegularExpression", channel)
|
|
||||||
except:
|
|
||||||
url_re = self.registryValue("urlRegularExpression")
|
|
||||||
if not url_re:
|
if not url_re:
|
||||||
url_re = utils.web._httpUrlRe
|
url_re = utils.web._httpUrlRe
|
||||||
matches = re.findall(url_re, input)
|
matches = re.findall(url_re, input)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user