diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-04-11 22:43:00 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-04-11 22:43:00 +0000 |
commit | f73a5f3e63b6c68fb04e3d58f97e500bfdd93f51 (patch) | |
tree | 926be7b28410366cf5f4651b5d543f7d379742b7 /data/rbot/plugins/url.rb | |
parent | 8985c8f3e655ba1aef4166e4247696fed3d20e9c (diff) |
HttpUtil: decompress gzipped body in partial_body too; whitespace cleanup too
Diffstat (limited to 'data/rbot/plugins/url.rb')
-rw-r--r-- | data/rbot/plugins/url.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/data/rbot/plugins/url.rb b/data/rbot/plugins/url.rb index 0a5ef74e..8a46af59 100644 --- a/data/rbot/plugins/url.rb +++ b/data/rbot/plugins/url.rb @@ -1,8 +1,9 @@ Url = Struct.new("Url", :channel, :nick, :time, :url) -TITLE_RE = /<\s*?title\s*?>(.+?)<\s*?\/title\s*?>/im -LINK_INFO = "[Link Info]" class UrlPlugin < Plugin + TITLE_RE = /<\s*?title\s*?>(.+?)<\s*?\/title\s*?>/im + LINK_INFO = "[Link Info]" + BotConfig.register BotConfigIntegerValue.new('url.max_urls', :default => 100, :validate => Proc.new{|v| v > 0}, :desc => "Maximum number of urls to store. New urls replace oldest ones.") @@ -166,6 +167,7 @@ class UrlPlugin < Plugin end end end + plugin = UrlPlugin.new plugin.map 'urls search :channel :limit :string', :action => 'search', :defaults => {:limit => 4}, |