summaryrefslogtreecommitdiff
path: root/data/rbot/plugins/url.rb
diff options
context:
space:
mode:
authorChris Gahan <chris@ill-logic.com>2006-02-02 12:46:27 +0000
committerChris Gahan <chris@ill-logic.com>2006-02-02 12:46:27 +0000
commit90e7074ebda1180c702473c924434dd72a3dbf4a (patch)
tree9647badf5d35f0bff8258f093966000d1903e677 /data/rbot/plugins/url.rb
parent470891dd372ccc20ecee092ea8389efbfd0b340f (diff)
Searching for text in the URL history is now case-insensitive.
Diffstat (limited to 'data/rbot/plugins/url.rb')
-rw-r--r--data/rbot/plugins/url.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/data/rbot/plugins/url.rb b/data/rbot/plugins/url.rb
index 3fa9f62d..1e46f633 100644
--- a/data/rbot/plugins/url.rb
+++ b/data/rbot/plugins/url.rb
@@ -33,10 +33,10 @@ class UrlPlugin < Plugin
def get_title_for_url(uri_str, depth=10)
# This god-awful mess is what the ruby http library has reduced me to.
# Python's HTTP lib is so much nicer. :~(
-
- if depth == 0
- raise "Error: Maximum redirects hit."
- end
+
+ if depth == 0
+ raise "Error: Maximum redirects hit."
+ end
puts "+ Getting #{uri_str}"
url = URI.parse(uri_str)
@@ -135,7 +135,7 @@ class UrlPlugin < Plugin
string = params[:string]
max = 10 if max > 10
max = 1 if max < 1
- regex = Regexp.new(string)
+ regex = Regexp.new(string, Regexp::IGNORECASE)
list = @registry[channel].find_all {|url|
regex.match(url.url) || regex.match(url.nick)
}