diff -ur /home/users/joe/rubix/bookmark_bot/mk2/bm_rubix.rb bm_bot/bm_rubix.rb
--- /home/users/joe/rubix/bookmark_bot/mk2/bm_rubix.rb 2005-02-19 23:09:19.065978650 -0700
+++ bm_bot/bm_rubix.rb 2005-03-08 20:39:46.340495416 -0700
@@ -25,9 +25,9 @@
require 'uri'
require 'net/http'
-$URI_RE1 = /^((?:http|ftp):\/\/[^:!"'() ]+) -- (.*)/mi
-$URI_RE2 = /^((?:http|ftp):\/\/[^:!"'() ]+) (.*)/mi
-$URI_RE3 = /^((?:http|ftp):\/\/[^:!"'() ]+)$/mi
+$URI_RE1 = %r{^((?:http|ftp)://[^:!"'() ]+) (?:--|#) (.*)}mi
+$URI_RE2 = %r{^((?:http|ftp)://[^:!"'() ]+) (.*)}mi
+$URI_RE3 = %r{^((?:http|ftp)://[^:!"'() ]+)$}mi
module Enumerable
def random
@@ -71,7 +71,7 @@
desc = fetch( uri )
if desc.respond_to? :body
if fetch( uri ).body =~ /
(.+)<\/title>/mi
- puts "Found the title, it's \"#{$1}\""
+ puts "Found the title for #{uri}, it's \"#{$1}\""
$1
end
elsif desc == 1
@@ -134,4 +134,4 @@
end
rubix = Rubix.new( "Rubix", "noctum", "a bot" )
-rubix.connect( "127.0.0.1", 6667, ["#nbtsc", "#rubixtest"] )
\ No newline at end of file
+rubix.connect( "127.0.0.1", 6667, ["#nbtsc", "#rubixtest"] )
diff -ur /home/users/joe/rubix/bookmark_bot/mk2/rubilicious.rb bm_bot/rubilicious.rb
--- /home/users/joe/rubix/bookmark_bot/mk2/rubilicious.rb 2005-02-19 23:04:23.878191165 -0700
+++ bm_bot/rubilicious.rb 2005-03-08 20:38:59.714835601 -0700
@@ -54,9 +54,8 @@
# XML escape elements, including spaces, ?, and +
#
def uri_escape
- str = xml_escape.gsub(/\+/, '&43;')
+ str = xml_escape.gsub(/\+/, '+')
str = str.gsub(/\s/, '+')
- str = str.gsub(/\?/, '&63;')
end
end