mirror of
https://github.com/oddluck/limnoria-plugins.git
synced 2025-04-25 20:41:21 -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(
|
||||
SpiffyTitles,
|
||||
"requireCapability",
|
||||
|
@ -184,7 +184,10 @@ class SpiffyTitles(callbacks.Plugin):
|
||||
% (channel)
|
||||
)
|
||||
return
|
||||
urls = self.get_urls_from_message(message, channel)
|
||||
if self.registryValue("snarfMultipleUrls", channel=channel):
|
||||
urls = self.get_urls_from_message(message, channel)
|
||||
else:
|
||||
urls = self.get_urls_from_message(message, channel)[0]
|
||||
if not urls:
|
||||
return
|
||||
for url in urls:
|
||||
|
Loading…
x
Reference in New Issue
Block a user