do the split thing.

This commit is contained in:
Robert Gerus 2014-03-13 16:37:43 +01:00
parent 487d433a5c
commit 795947c01d

View file

@ -33,7 +33,8 @@ end
DataMapper.auto_upgrade!
Client.register_trigger("PRIVMSG") do |msg|
msg[:params].each do |word|
return 0 if msg[:params][1].nil?
msg[:params][1].split.each do |word|
if word =~ /^https?:\/\// then
original_url = word
if word =~ /4cdn[.]org/ then
@ -52,6 +53,7 @@ Client.register_trigger("PRIVMSG") do |msg|
)
Client.privmsg(msg[:params][0], Config[:scrape][:title_prefix] + title) if not title.nil?
return 0
end
end
end