The Grubby Admin Manual
Josef Spillner, 2001-10-12
Updated 2002-08-18
Updated 2002-11-04
Updated 2003-09-28
Table Of Contents:
Installation
Network setup
Admin commands
Log files
Modules
* Exec module
* Embed module
* News module (modexec)
* Dictionary module (modexec)
* Meeting module (modexec)
* Translation module (modexec)
* Games module
Installation
Grubby consists of the binary "grubby", the perl script "grubby-config", lots
of plugins (shared libraries), scripts for modexec and modembed, and data and
translation files. Everything should install fine.
All you have to do then is to call grubby-config, which gives you a full
default installation. You might want to cut the options down, just edit the
configuration files under $HOME/.ggz.
Then launch the bot while having a ggzd or IRC server running somewhere.
If it fails, make sure you didn't cut too much options.
Read docs/Setup for a sample file.
Network Setup
Grubby can communicate with users either locally (for debugging) or being
logged into a GGZ or IRC server.
The core module 'net' can be setup appropriately:
- netggz.so
- netirc.so
- netconsole.so
For autojoining a room upon login, a number must be given for GGZ (e.g. 0),
while IRC expects a channel (e.g. #ggz).
The implementation netggz.so does not only provide chat, but also gaming
features, which are ignored by the other implementations.
Admin Commands
The owner of grubby, as specified in the configuration, may issue some more commands than the other players. Here's a list of what the admin can do:
- grubby insmod (modulename) - Inserts a plugin, like self or badword
- grubby rmmod (modulename) - Unloads a plugin
- grubby reload (modulename) - A combination of the above, makes sure the latest version is in memory
- grubby modules - List all loaded plugins
- grubby goto (roomnumber) - Let grubby join the given room
- grubby log (on|off) - Control whether the bot should log messages or not
Log files
Grubby can be requested to log all communication to a log file.
Also, the player database at ~/.ggz/grubby/playerdb is filled with entries when
players join the room Grubby is in. These entries can be enhanced by the
players with additional information.
Modules
Some of the available modules are documented here.
Exec Module
This plugin executes external scripts and programs, writes to their stdin and reads from their stdout. It should be noted that the more
external processes are spawned in serial order, the more time it consumes, and grubby may not react fast enough. Whereever available, a native
plugin (shared library) should be preferred.
Embed Module
Similar to modexec, save it embeds the scripts directly. This works for python,
perl and ruby so far and requires that support for those languages has been enabled
at compile time.
One advantage is that all commands are executed much faster.
News Module (via modexec)
Several news sites offer RDF files which contain all headlines and links to the articles in XML format. Now when the user
requests news from one of those sites, the module first fetches the latest RDF file from the target host (needs the perl module
Net::Telnet installed), and randomly seeks one of the headlines which is to be returned.
Dictionary Module (via modexec)
This module is presentated by the perl script "dict.pl", which in turn needs several dictionaries installed, or at least one of them.
Under Unix, those are mostly under /usr/share/trans/X-Y, where X and Y are lowercase language letters, like "en" for English. The
dictionary files contain key:value pairs of words. Now when a search is done, the module simply opens the appropriate file and scans
it. In the case of inverse search, key and value are swapped. The module returns a concatenated string which contains all translations
it found for the key word.
Meeting Module (via modexec)
This one needs Ruby installed, preferably version 1.6+. Its configurable database goes normally to /tmp/meetings, you might want to
change that. It uses an interesting technique to store its data: Instead of writing key-value pairs, it dumps the whole object
so one can transfer it from one host to another :)
Translation Module (via modexec)
In case common shell tools (cut, grep, ...) and wget are available, the script
webtrans.sh can be used for translations. It stores translated pairs of
sentences into its cache (~/.ggz/grubby/google).
Games Module
Grubby has the ability to launch game clients which have no GUI when
commanded to do so. Those games are registered like normal GGZ game clients,
except that their frontend is set to 'guru'.
This documentation is Copyright (C) 2001 - 2003 Josef Spillner.
Published under the GNU Free Documentation License.