Skip to main content

Extensible IRC bot

Project description

Berend
======

Berend is a Twisted IRC bot with SSL-support. If you use this module,
you will not have to write any of the boilerplate and instead can
focus on programming the behavior of your bot.

If you use SSL, there is no certificate checking so beware!


Usage
-----

To build a bot you need to write a bot config file (yaml) and some
plugins (simple python modules).

The default config file berend will look for is `berend.yaml`. If you
want to use a different config file, then you need to set the
`BEREND_CONFIG` environment variable to its path.

An example bot config file is included in the distribution and looks
like this:

berend.yaml:

irc:
host: irc.freenode.net
ssl: true
port: 6697
channels:
- berend-botje-test
nickname: berend
realname: Berend Botje
# on_connect is a list of raw commands sent to the server on connect,
# use this to identify for example:
#
# on_connect:
# - "PRIVMSG NickServ :identify berend secret"
plugins:
berend.plugins.help:
myberend.plugins.hello:

Add your plugins to the bottom. The key is the importable,
dot-separated python module name, the value is passed on to your
plugin's setup method. Look at the help plugin for a fully documented
example.

An example plugin looks like this:

myberend/plugins/hello.py:

def setup(bot, config):
bot.respond('hello', hello, ('hello', 'force bot to greet you'))

def hello(bot, user, channel, msg, matches):
bot.reply(user, channel, 'hello to you %s' % user)


See Also
--------

The bot is a Twisted IRC client. Check out the [Twisted documentation](http://twistedmatrix.com/documents/12.2.0/api/twisted.words.protocols.irc.IRCClient.html) and the [ircLogBot example](http://twistedmatrix.com/documents/current/core/howto/clients.html#auto5) for more information.

Oh and of course: [Berend Botje](http://nl.wikipedia.org/wiki/Berend_Botje_ging_uit_varen)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

berend-0.4.tar.gz (6.4 kB view details)

Uploaded Source

File details

Details for the file berend-0.4.tar.gz.

File metadata

  • Download URL: berend-0.4.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for berend-0.4.tar.gz
Algorithm Hash digest
SHA256 0e96e0052d1032e6cd66defdce231323b1537d5feb305ca14498d2bcdfd589af
MD5 9d0658fa281aecc6a75bc3a659e751d0
BLAKE2b-256 20e5b5f7d5b4dcaae1960d114c55ed2bd39de432e47cdfcfdab437a4202d49b2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page