crawl / sequell

##crawl bot Sequell; depends on https://github.com/crawl/go-sequell
40 stars 25 forks source link

Sequell

Sequell is the stats IRC bot for #crawl on Libera IRC.

Sequell is the successor to the original #crawl Henzell which at one point shared the same code. There are still many references to Henzell in the source and configuration.

Dependencies

Sequell wants Perl modules for IRC, YAML parsing, DB connectivity, etc. In addition the SQL query commands require several Ruby gems. To install Sequell's dependencies, use:

# ./scripts/install-libs

You can also install the Perl and Ruby dependencies independently:

# ./scripts/install-perl-modules
# gem install bundler && bundle install

Configuring Sequell

Sequell has three primary functions:

  1. Providing a repository for user-maintained content (the LearnDB).
  2. Storing records of all games on public serves and making them available to query.
  3. Serving a playlist of games enqueued for FooTV. This is one half of the configuration for FooTV. The FooTV service must separately be configured to connect to Sequell's playlist server.

Sequell also provides additional utility commands.

You configure Sequell by supplying an rc/sequell.rc in the directory from which you run Sequell. You can alternatively specify the rc filename as a command-line option with:

perl sequell.pl --rc=some/path/to/myweirdrc

Running Sequell queries without connecting to IRC

If you want to test new commands or run !lg queries on a local Sequell database without involving IRC, you can use the scripts/runcmd.pl script for an interactive Sequell REPL with no IRC strings attached. It's a good idea to run it via rlwrap for command-line editing and history support:

$ rlwrap ./scripts/runcmd.pl
Sequell command runner
> !lg *
7941444. foo the Warrior (L19 MfGl of Okawaru), mangled by a naga ritualist (a +3 dagger of venom) on Snake:4 (snake_hunt) on 2017-10-22 18:04:42, with 217416 points after 31169 turns and 0:53:26.

runcmd.pl assumes a default IRC nick of anon, and a default IRC channel of #crawl, for commands that expect to see a nick/channel. You may override these defaults with the NICK/CHANNEL environment variables.

$ NICK=won CHANNEL='#crawl-dev' rlwrap ./scripts/runcmd.pl
> .echo $nick in $channel
Sequell command runner
won in #crawl-dev