https://github.com/preaction/bot-freyr
An IRC bot with multi-network capabilities and a web API
https://github.com/preaction/bot-freyr
Last synced: about 1 year ago
JSON representation
An IRC bot with multi-network capabilities and a web API
- Host: GitHub
- URL: https://github.com/preaction/bot-freyr
- Owner: preaction
- License: other
- Created: 2014-10-14T06:20:17.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2016-11-12T04:02:49.000Z (over 9 years ago)
- Last Synced: 2024-04-17T21:16:57.168Z (about 2 years ago)
- Language: Perl
- Size: 106 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README
- Changelog: CHANGES
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
NAME
Freyr - IRC bot with multi-network and web API
VERSION
version 0.001
SYNOPSIS
use Freyr;
use Freyr::Plugin::Say;
my $bot = Freyr->new(
host => 'irc.perl.org',
channels => [ '#freyr' ],
nick => 'freyr',
prefix => '!',
plugins => {
say => Freyr::Plugin::Say->new,
},
);
$bot->start;
# In #freyr on irc.perl.org...
# -- Message addressed to the bot
# > freyr, say I'm a little teapot
# freyr> I'm a little teapot
# -- "prefix" message
# > !say Short and stout
# freyr> Short and stout
DESCRIPTION
Freyr is an IRC bot designed for multiple networks and a web interface.
ATTRIBUTES
nick
The default nickname for the bot
prefix
The prefix character. A shortcut to address the bot.
host
The default host to connect to in single-network mode.
port
The default port to connect to in single-network mode.
network
The network the bot is currently connected to.
channels
The channel names to connect to in single-network mode.
plugins
The plugins to attach to this bot, keyed by route. The plugin will be
registered with the given route.
log
The Mojo::Log object attached to this bot
ioloop
The Mojo::IOLoop the bot should use.
_route
The Freyr::Route for the entire bot.
METHODS
BUILD
Initialize the network in single-network mode.
channel( NAME )
Get a channel object, joining the channel if necessary.
route( ROUTE => DEST )
Add a route to the entire bot. Routes must be unique. Only one route
will be triggered for every message.
_route_message( NETWORK, MESSAGE )
AUTHOR
Doug Bell
COPYRIGHT AND LICENSE
This software is copyright (c) 2014 by Doug Bell.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.