mirror of
https://github.com/oddluck/limnoria-plugins.git
synced 2025-04-29 06:51:12 -05:00
SpiffyTitles: remove onDemandTitleError
This commit is contained in:
parent
8fb4618d79
commit
200f37cbaa
@ -50,7 +50,7 @@ You can increase the verbosity of the logging in SpiffyTitles by issuing the fol
|
|||||||
|
|
||||||
|
|
||||||
## On-Demand Titles
|
## On-Demand Titles
|
||||||
You can retrieve titles on demand using the `t` command. If something goes wrong, `onDemandTitleError`
|
You can retrieve titles on demand using the `t` command. If something goes wrong, `badLinkText`
|
||||||
will be sent instead of the link title.
|
will be sent instead of the link title.
|
||||||
|
|
||||||
## Available Options
|
## Available Options
|
||||||
|
@ -158,20 +158,6 @@ conf.registerGlobalValue(
|
|||||||
registry.Integer(600, _("""Link cache lifetime in seconds""")),
|
registry.Integer(600, _("""Link cache lifetime in seconds""")),
|
||||||
)
|
)
|
||||||
|
|
||||||
conf.registerChannelValue(
|
|
||||||
SpiffyTitles,
|
|
||||||
"onDemandTitleError",
|
|
||||||
registry.String(
|
|
||||||
"Error retrieving title.",
|
|
||||||
_(
|
|
||||||
"""
|
|
||||||
This error message is used when there is a problem getting
|
|
||||||
an on-demand title
|
|
||||||
"""
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
conf.registerChannelValue(
|
conf.registerChannelValue(
|
||||||
SpiffyTitles,
|
SpiffyTitles,
|
||||||
"ignoredMessagePattern",
|
"ignoredMessagePattern",
|
||||||
|
@ -1722,8 +1722,6 @@ class SpiffyTitles(callbacks.Plugin):
|
|||||||
"""
|
"""
|
||||||
channel = msg.args[0]
|
channel = msg.args[0]
|
||||||
title = None
|
title = None
|
||||||
error_message = self.registryValue("onDemandTitleError", channel=channel)
|
|
||||||
err = ""
|
|
||||||
try:
|
try:
|
||||||
title = self.get_title_by_url(query, channel)
|
title = self.get_title_by_url(query, channel)
|
||||||
except:
|
except:
|
||||||
@ -1731,7 +1729,7 @@ class SpiffyTitles(callbacks.Plugin):
|
|||||||
if title:
|
if title:
|
||||||
irc.reply(title)
|
irc.reply(title)
|
||||||
else:
|
else:
|
||||||
irc.reply(error_message + " {}".format(err))
|
return
|
||||||
|
|
||||||
t = wrap(t, ["text"])
|
t = wrap(t, ["text"])
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user