]> Pileus Git - pages/blob - tools/rhawk.md
Update rhawk page
[pages] / tools / rhawk.md
1 rhawk is a IRC bot written in GNU Awk.
2
3 Source Code
4 -----------
5 Source code is available in git and [gitweb](/git/?p=~andy/rhawk)
6
7     git clone git://pileus.org/~andy/rhawk
8
9 Components
10 ----------
11 <dl>
12   <dt>rhawk</dt>
13   <dd>rhawk is the main awk script that starts up the IRC bot. It requires a
14       network connection as standard input and output. The suggested way to do
15       this is by using socat as shown in rhawk.sh</dd>
16
17   <dt>irc.awk</dt>
18   <dd><p>IRC protocol handling is done in the irc awk script. In addition to
19          the pure protocol things, irc.awk also provides some framework code to
20          handle starting, stopping, and reloading the client.</p>
21
22       <p>When included, the irc script will spawn a child instance of rhawk.
23          This is done so that the client can be reloaded without dropping the
24          existing IRC connection.</p></dd>
25
26   <dt>json.awk</dt>
27   <dd>A simple json parser is included, it has no external dependencies, so it
28       can be used by other awk scripts as well.</dd>
29
30   <dt>email.awk</dt>
31   <dd>The email component provides notifications to IRC users if someone says
32       their name while they are away.</dd>
33
34   <dt>spades.awk</dt>
35   <dd>Spades is a great card game. As such, rhawk lets you play spades by
36       joining the #rhspades channel on freenode.net and issuing the .newgame
37       command. Note, you'll have to get three other players as well.
38       The '.help spades' command provides a list of spades commands.</dd>
39 </dl>
40
41 rhsed
42 -----
43 Awk is a great language for writing an IRC bot.
44
45 Sed, on the other hand, is not so a great at it.
46
47 * [gitweb](/git/?p=~andy/rhawk;f=rhsed;a=blob)