btcinfo  

Hic inserere motto

Botworks - ircbot and logbot genesis

June 21, 2020 — shinohai

Alf has reminded me several times that it might be helpful to publish the sauce for my ircbot setup so this post is an attempt to do just that, and generally make it easier to install the bot components using V. My botworks tree uses trinque's lisp ircbot and logbot combo as the starting point.

A lot of good patches are scattered about on former republican blogs, though it seems I could get none of them to play nice with esthlos-v so a regrind was in order. For ircbot these are:

trinque's ircbot-genesis-kv.vpatch.

ben_vulpes' ircbot-multiple-channels-kv.vpatch.

whaack's ircbot-no-suicide-on-reconnect-kv.vpatch.

Assuming you already have SBCL and quicklisp, you can then use `V` to press ircbot and move the output to your local-projects directory:

v press ircbot-no-suicide-on-reconnect-kv out

mv out/ircbot ~/quicklisp/local-projects

The process is repeated to add the logbot system. While testing the regrinds I came upon a curious problem where adding ben_vulpes "logbot-multiple-channels" patch caused an error when trying to start logbot. Simply pressing the logbot genesis and running the bot is working, so I will continue to debug the issue and post results in a future botworks piece. The logbot requires that postgres be installed on your system, whaack has a good piece on how to do this on his blog, if you aren't familiar with setting that part up.

v press logbot-genesis-kv.vpatch

mv out/logbot ~/quicklisp/local-projects

With both of these components installed where ASDF can find them running the bot is as simple as firing up a REPL, adding your parameters and connecting to it according to the instructions in the "logbot/USAGE" file.

TODO:

Put together a better prefixed command system, the system I am currently using works but needs quite a bit of polish before being worthy of turning into a vpatch.

Cobble together a www log reader for use with the logbot system.

Links to useful lisp botworks resources:

trinque's sources: http://trinque.org/src/

ben_vulpes' post on multiple channels: http://cascadianhacker.com/correction-multiple-channel-patches-for-irclogbot

spyked's botworks vpatches: http://lucian.mogosanu.ro/src/botworks/v/patches/

whaack's post on setting up trinque's logbot: http://ztkfg.com/2019/12/setting-up-trinques-logbot-on-centos-6-with-sbcl-quicklisp-swank-and-postgres/

Tags: News, Lisp, UNIX