Monday, August 15, 2005

IRC Bot

Here is the code for the latest revision of my IRC Bot. It isn't made to be use friendly right now so don't expect it to work right off the bat.

I think to get it started you'll need to do the following:
  1. Compile everything, be sure to add the inc directory to your include path.
  2. Start it with a node name and set a mnesia directory.
  3. Call p1_db:start(). Then p1_db:create_tables().
  4. Then call irc_bot:add_bot (Maybe it's addbot?). It takes a tuple, see code to figure it out.
  5. p1_main:start()
  6. When you are finished: bot_server ! stop. The beauty of erlang lets you do this from another node on another machine too, if you so desire.
The code can be found here.

The only other erlang irc bot I've found is manderlbot which can be found on freshmeat. I think it is a bit better designed than mine and has the intention of other people using it in mind where as mine is more of me just playing around. If there is an interest in it perhaps I will do more with it.

0 Comments:

Post a Comment

<< Home