-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
30 lines (22 loc) · 855 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
I wanted to learn OCaml, I wanted to write an IRC bot, so I killed two birds with one stone.
Files
-----
bumbot.ml provides the basic stuff you'll need to write a bot on top of bumbot.
loggingbot.ml is a sample bot built on top of bumbot. It's pretty rough around the edges right now.
Usage
-----
To build a bot on top of bumbot you simply call connect_bot, providing host, port, nickname, room, and a function for handling received commands. The handler function takes a Bumbot.irc_message and returns a Bumbot.irc_response.
Compiling
---------
To compile loggingbot simply run
ocamlbuild -l unix -l str loggingbot.native
To run do
./loggingbot.native host port nick room logbase
The # is automatically prefixed
TODOs
-----
- Rework bumbot message parsing
- Make loggingbot a little less rough around the edges
License
-------
Apache 2.0