+ Config.register Config::IntegerValue.new('url.display_link_info',
+ :default => 0,
+ :desc => "Get the title of links pasted to the channel and display it (also tells if the link is broken or the site is down). Do it for at most this many links per line (set to 0 to disable)")
+ Config.register Config::BooleanValue.new('url.auto_shorten',
+ :default => false,
+ :desc => "Automatically spit out shortened URLs when they're seen. Check shortenurls for config options")
+ Config.register Config::IntegerValue.new('url.auto_shorten_min_length',
+ :default => 48,
+ :desc => "Minimum length of URL to auto-shorten. Only has an effect when url.auto_shorten is true.")
+ Config.register Config::BooleanValue.new('url.titles_only',
+ :default => false,
+ :desc => "Only show info for links that have <title> tags (in other words, don't display info for jpegs, mpegs, etc.)")
+ Config.register Config::BooleanValue.new('url.first_par',
+ :default => false,
+ :desc => "Also try to get the first paragraph of a web page")
+ Config.register Config::IntegerValue.new('url.first_par_length',
+ :default => 150,
+ :desc => "The max length of the first paragraph")
+ Config.register Config::ArrayValue.new('url.first_par_whitelist',
+ :default => ['twitter.com'],
+ :desc => "List of url patterns to show the content for.")
+ Config.register Config::BooleanValue.new('url.info_on_list',
+ :default => false,
+ :desc => "Show link info when listing/searching for urls")
+ Config.register Config::ArrayValue.new('url.no_info_hosts',
+ :default => ['localhost', '^192\.168\.', '^10\.', '^127\.', '^172\.(1[6-9]|2\d|31)\.'],
+ :on_change => Proc.new { |bot, v| bot.plugins['url'].reset_no_info_hosts },
+ :desc => "A list of regular expressions matching hosts for which no info should be provided")
+ Config.register Config::ArrayValue.new('url.only_on_channels',
+ :desc => "Show link info only on these channels",
+ :default => [])
+ Config.register Config::ArrayValue.new('url.ignore',
+ :desc => "Don't show link info for urls from users represented as hostmasks on this list. Useful for ignoring other bots, for example.",
+ :default => [])
+