url

package
v0.0.0-...-115c377 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2013 License: BSD-1-Clause Imports: 9 Imported by: 0

README

URL

This plugin detects webpage urls embedded in incoming messages. It extracts the urls, fetches their contents from the web and finds the page title element. The title is then posted to the channel/user from wence the message came.

For example:

<someuser> http://www.youtube.com/watch?v=dQw4w9WgXcQ
<bot> someuser's link shows: Rick Astley - Never Gonna Give You Up - YouTube

It's configuration file can present a list of regular expression patterns. These patterns represent (partial) urls, which should be excluded from the lookup. For example, to ignore all links to imgur.com and those ending in file extensions for images and video:

[exclude]
url < \.imgur\.com
url < \.(jpe?g|png|gif|bmp|tga|tiff)$
url < \.(mpe?g|avi|mp[1-5])$

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(profile string, c *proto.Client)

Init initializes the plugin. it loads configuration data and binds commands and protocol handlers.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL