mirror of
https://github.com/oddluck/limnoria-plugins.git
synced 2025-05-07 12:03:45 -05:00
SpiffyTitles: Add snarfMultipleUrls Config Option (#42)
* SpiffyTitles: Add snarfMultipleUrls Config Option * SpiffyTitles: Add snarfMultipleUrls Config Option
This commit is contained in:
parent
c4f666efe7
commit
211bddc1bf
@ -167,6 +167,20 @@ conf.registerChannelValue(
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
conf.registerChannelValue(
|
||||||
|
SpiffyTitles,
|
||||||
|
"snarfMultipleUrls",
|
||||||
|
registry.Boolean(
|
||||||
|
True,
|
||||||
|
_(
|
||||||
|
"""
|
||||||
|
Determines whether SpiffyTitles will query all URLs in a message,
|
||||||
|
or only the first one.
|
||||||
|
"""
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
conf.registerChannelValue(
|
conf.registerChannelValue(
|
||||||
SpiffyTitles,
|
SpiffyTitles,
|
||||||
"requireCapability",
|
"requireCapability",
|
||||||
|
@ -184,7 +184,10 @@ class SpiffyTitles(callbacks.Plugin):
|
|||||||
% (channel)
|
% (channel)
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
if self.registryValue("snarfMultipleUrls", channel=channel):
|
||||||
urls = self.get_urls_from_message(message, channel)
|
urls = self.get_urls_from_message(message, channel)
|
||||||
|
else:
|
||||||
|
urls = self.get_urls_from_message(message, channel)[0]
|
||||||
if not urls:
|
if not urls:
|
||||||
return
|
return
|
||||||
for url in urls:
|
for url in urls:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user