kameloso.plugins.webtitle

The Webtitle plugin catches URLs pasted in a channel, follows them and reports back the title of the web page that was linked to.

It has no bot commands; everything is done by automatically scanning channel and private query messages for things that look like links.

Members

Classes

TitleFetchException
class TitleFetchException

A normal Exception but with an HTTP status code attached.

WebtitlePlugin
class WebtitlePlugin

The Webtitle plugin catches HTTP URL links in messages, connects to their servers and and streams the web page itself, looking for the web page's title. This is then reported to the originating channel or personal query.

Functions

decodeEntities
auto decodeEntities(string line)

Removes unwanted characters from a string, and decodes HTML entities in it (like — and  ).

lookupURLs
void lookupURLs(WebtitlePlugin plugin, IRCEvent event, string[] urls)

Looks up the URLs in the passed string[] urls by spawning a worker thread to do all the work.

onMessage
void onMessage(WebtitlePlugin plugin, IRCEvent event)

Parses a message to see if the message contains one or more URLs. Merely passes the event on to onMessageImpl.

onMessageImpl
void onMessageImpl(WebtitlePlugin plugin, IRCEvent event)

Parses a message to see if the message contains one or more URLs. Implementation function.

parseResponseIntoTitleLookupResult
auto parseResponseIntoTitleLookupResult(HTTPQueryResponse response)

Parses a requests Response into a TitleLookupResult.

rewriteDirectImgurURL
auto rewriteDirectImgurURL(string url)

Takes a direct imgur link (one that points to an image) and rewrites it to instead point to the image's page.

Static variables

descriptionExemptions
auto descriptionExemptions;

Hostnames explicitly exempt from having their descriptions included after the titles.

Structs

TitleLookupResult
struct TitleLookupResult

A record of a URL lookup.

WebtitleSettings
struct WebtitleSettings

All Webtitle settings, gathered in a struct.

See Also

Meta