trinque

2016/08/11

logbot-genesis.vpatch

Filed under: Software — Tags: , — trinque @ 12:49 p.m.

From README:

`logbot` extends `ircbot` to provide an interface to a single IRC channel from PostgreSQL, writing all messages to a `log` table and reading messages to be sent from `outbox` in a specified database. By listening to pg_notify channels, services connected to PostgreSQL can react when new log lines are inserted.

From INSTALL:

 * Install `ircbot`.

 * From the SBCL REPL:
     (ql:quickload :cl-irc)
     (ql:quickload :cl-postgres)
     (ql:quickload :postmodern)

 * Use V to press `logbot`

mkdir -p ~/src/logbot
cd ~/src/logbot

mkdir .wot
cd .wot && wget http://trinque.org/trinque.asc && cd ..

v.pl init http://trinque.org/src/logbot
v.pl press logbot-genesis logbot-genesis.vpatch

ln -s ~/src/logbot/logbot-genesis ~/quicklisp/local-projects/logbot

 * Create a PostgreSQL database with UTF-8 encoding, then load logbot.sql
   into that database:

psql -f logbot.sql mydb

From USAGE:

(asdf:load-system :logbot)
(defvar *bot*)
(setf *bot*
    (logbot:make-logbot
    "chat.freenode.net" 6667 "nick" "password" "#channel"
    '("db-name" "db-user" "db-password" "db-host")))

; connect in separate thread, returning thread
(logbot:ircbot-connect-thread *bot*)

; or connect using the current thread
; (logbot:ircbot-connect *bot*)

2016/08/10

ircbot-genesis.vpatch

Filed under: Software — Tags: — trinque @ 10:29 a.m.

From README:

`ircbot` provides a simple CLOS class, `ircbot`, which will maintain a connection to a single IRC channel via `cl-irc`. The bot will handle ping/pong and detect failed connections, and is capable of authenticating with NickServ (using ghost when necessary to reacquire nick).

From INSTALL:

 * Install SBCL (with sb-thread) and Quicklisp.

 * From the SBCL REPL:
     (ql:quickload :cl-irc)

 * Use V to press `ircbot`

mkdir -p ~/src/ircbot
cd ~/src/ircbot

mkdir .wot
cd .wot && wget http://trinque.org/trinque.asc && cd ..

v.pl init http://trinque.org/src/ircbot
v.pl press ircbot-genesis ircbot-genesis.vpatch

ln -s ~/src/ircbot/ircbot-genesis ~/quicklisp/local-projects/ircbot

From USAGE:

(asdf:load-system :ircbot)
(defvar *bot*)
(setf *bot*
      (ircbot:make-ircbot
       "chat.freenode.net" 6667 "nick" "password" "#channel"))

; connect in separate thread, returning thread
(ircbot:ircbot-connect-thread *bot*)

; or connect using the current thread
; (ircbot:ircbot-connect *bot*)