From 90e7074ebda1180c702473c924434dd72a3dbf4a Mon Sep 17 00:00:00 2001 From: Chris Gahan Date: Thu, 2 Feb 2006 12:46:27 +0000 Subject: Searching for text in the URL history is now case-insensitive. --- data/rbot/plugins/url.rb | 10 +++++----- 1 file 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) } -- cgit v1.2.3