summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorDmitry Kim <dmitry point kim at gmail point com>2007-08-29 21:06:29 +0000
committerDmitry Kim <dmitry point kim at gmail point com>2007-08-29 21:06:29 +0000
commit2a8e0061aa290f8a3caf90cdcc14c5b661968a36 (patch)
tree373371e8537d69a346594d10acccfd6fecacc3f0 /data
parentabf44640b30133b3db5f614822b53cc015f9c705 (diff)
* (url.rb) pass original irc message to url logger
Diffstat (limited to 'data')
-rw-r--r--data/rbot/plugins/url.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/data/rbot/plugins/url.rb b/data/rbot/plugins/url.rb
index c3463d5d..1e111fec 100644
--- a/data/rbot/plugins/url.rb
+++ b/data/rbot/plugins/url.rb
@@ -42,7 +42,7 @@ class UrlPlugin < Plugin
$1.ircify_html
end
- def get_title_for_url(uri_str, nick = nil, channel = nil)
+ def get_title_for_url(uri_str, nick = nil, channel = nil, ircline = nil)
url = uri_str.kind_of?(URI) ? uri_str : URI.parse(uri_str)
return if url.scheme !~ /https?/
@@ -50,6 +50,7 @@ class UrlPlugin < Plugin
logopts = Hash.new
logopts[:nick] = nick if nick
logopts[:channel] = channel if channel
+ logopts[:ircline] = ircline if ircline
title = nil
extra = String.new
@@ -152,7 +153,7 @@ class UrlPlugin < Plugin
Thread.start do
debug "Getting title for #{urlstr}..."
begin
- title = get_title_for_url urlstr, m.source.nick, m.channel
+ title = get_title_for_url urlstr, m.source.nick, m.channel, m.message
if title
m.reply "#{LINK_INFO} #{title}", :overlong => :truncate
debug "Title found!"