url

package
v0.0.0-...-8b173c7 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2013 License: BSD-1-Clause Imports: 7 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

Overview

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.

This plugin has no commands. It simply hooks into PRIVMSG inputs and scans them for URLs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(profile string) plugin.Plugin

Types

type Plugin

type Plugin struct {
	*plugin.Base
	// contains filtered or unexported fields
}

func (*Plugin) Load

func (p *Plugin) Load(c *proto.Client) (err error)

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

Jump to

Keyboard shortcuts

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