Go to file
Neale Pickett b45ae4b605 Remove leading '.' after Brugh bitched at me enough. 2011-01-10 14:10:32 -06:00
.gitignore Add `bot` script 2011-01-07 14:03:16 -06:00
COPYING Import OCS, add COPYING file 2009-03-02 18:49:21 -07:00
Makefile C version 2011-01-06 21:08:21 -07:00
README A little more in README 2011-01-06 22:25:02 -07:00
bot Remove leading '.' after Brugh bitched at me enough. 2011-01-10 14:10:32 -06:00
cobalt C version 2011-01-06 21:08:21 -07:00
cobalt-handler Modify debug output 2011-01-06 22:08:00 -07:00
dispatch.c C version 2011-01-06 21:08:21 -07:00
dump.h C version 2011-01-06 21:08:21 -07:00
firebot Remove leading '.' after Brugh bitched at me enough. 2011-01-10 14:10:32 -06:00
infobot Remove leading '.' after Brugh bitched at me enough. 2011-01-10 14:10:32 -06:00
irc.c Make more portable 2011-01-07 14:05:21 -06:00
notes Make note sender more verbose 2010-12-16 22:07:39 -07:00
rollforinitiative.py Make lots more happen in a script 2010-12-14 17:13:52 -07:00
whuffie Add whuffie 2010-12-16 21:13:34 -07:00

README

bot
===

This is a suite of simple programs which allow you to write an IRC bot.
It is based on the Unix principle that one program should do one thing,
and makes extensive use of pipes, child processes, and passing of file
descriptors.

Unless you are a seasoned Unix programmer or are willing to become one,
this is not the bot you're looking for.


dispatch
--------

Reads lines from stdin (or fd 6).  Each line causes a fork and exec of a
specified program; the line is sent as the last argument.  Any output
from children is passed through to stdout (or fd 7), optionally rate
limited.  A fifo can optionally be specified on the command line;
anything written to it is treated identically to child output.


irc
---

Parses its last argument as a line from IRC.  Determines prefix,
command, sender, forum (channel or user), and text; then invokes a
specified program with these as arguments.  Also responds to server
pings as a convenience.


bot
---

Given nickname $nick, creates $nick.fifo, logs into IRC as $nick, and
passes control to dispatch -> irc -> $nick-handler.


cobalt-handler
--------------

Joins initial channels, responds to invite messages, and tries private
messages with several different handlers in turn.


firebot
-------

A private message handler providing a few handy commands.


infobot
-------

A private message handler providing infobot-like functionality.


notes
-----

A private message handler allowing users to leave notes for each other.


whuffie
-------

A private message handler keeping track of whuffe (also known as karma),
which is really just a meaningless number associated with your nick,
which other people can manipulate but you can't.



Putting it all together
=======================

A full chain of programs would look something like

    tcpclient -> bot -> dispatch -> handler

and would be invoked as

    $ tcpclient irc.host.org 6667 ./bot cobalt


Author
------

Neale Pickett <neale@woozle.org>