mjl > projects > ircbot

ircbot

a very simplistic IRC bot. see the comment in ircbot.c for information on what it does and how it works. you can either download ircbot (see below) or have a quick look at ircbot.c of the current version.

download

the latest version is 0.1. thus you may download ircbot-0.1.tgz (11300 bytes). this tarball contains just two files: ircbot.c and botmd.

MD5 (ircbot-0.1.tgz) = 37436e61fcbe4884a6e74829adf6a76f
SHA1 (ircbot-0.1.tgz) = 7ee7d436ab20fce11322f3b24e4cee7d15d841bc
RMD160 (ircbot-0.1.tgz) = e53bfb336b14e7ece1f8d891c983d83dcdbe8876

more info

all information is included in ircbot.c inside the tarball, but course you want to see some of it on the website. thus, a copy-paste of a small subset of the information in ircbot.c:

name:        ircbot
date:        08-12-2003
version:     0.1
license:     public domain
website:     http://www.ueber.net/who/mjl/projects/ircbot/
author:      mechiel lukkien
e-mail:      mechiel@ueber.net
compile:     cc -g -Wall -pthread -o ircbot ircbot.c
xlint:       lint -aabchruH -lposix ircbot.c
usage:       ./ircbot nick host port listenhost listenport nickfile >> logfile
see also:    rfc2810, rfc2811, rfc2812 and rfc2813
tested on:   OpenBSD 3.3 (extensively), FreeBSD 4.7 and some Linux

sample scripts

if you know how ircbot works, you'll understand how the following scripts work (these are all in the public domain). note that these are (mostly) rc shell scripts. all scripts are fairly short, so it should be easy to determine which tools they depend on.

P
prints `no such smiley' (in response to ;P)
allow
add the nicks given as arguments to $nickfile and make ircbot reread it
deny
inverse operation of allow
deop
deop the given nicks
help
print a list of commands in $home/bin
ircjoin
join the given channel (channel should have a # prepended)
ircpart
inverse of ircjoin
ircquit
quit irc
msg
send a message to a user/channel
op
op the given nicks
raw
send a raw command
topic
set the topic of a channel