do the split thing.
This commit is contained in:
parent
487d433a5c
commit
795947c01d
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue