Riddim is an XMPP bot framework, which can respond to commands or perform various automated tasks via XMPP.
One of Riddim’s features is to protect rooms it is in using one or more RTBLs, such as those published by xmppbl.org. It can automatically ban users that are found on a blocklist, before they have the opportunity to spam a channel.
There are various ways to set up Riddim, but we’re going to focus on running it as a container, because this is the simplest and most widely available method.
First, create a file called config.lua
with the following contents:
-- Provide the JID and password of the account the bot will use
= "antispam@example.com"
jid = "secret-account-password"
password
-- The list of rooms the bot should join
= {
autojoin "your-channel@channels.example.com";
"other-channel@somewhere.example";
}
-- What nickname the bot should use
= "spamguard"
nick
-- Choose a prefix for commands
= "-"
command_prefix
-- What plugins to load
= {
plugins "groupchat";
"rtbl_guard";
}
-- Configure the RTBLs to monitor
= {
rtbl_guard { host = "xmppbl.org", node = "muc_bans_sha256" };
};
There are multiple tools available to download, run and manage containers. Here we provide an example of how to run riddim with docker or podman.
This command assumes that:
config.lua
is in the current directoryYou can choose any name for the container (to allow you to identify and manage it later). Here we give it the name ‘spamguard’.
docker run --name spamguard --restart=always -v "$PWD/config.lua:/etc/riddim/config.lua" mwild1/riddim
The podman command should work just the same as the docker command:
podman run --name spamguard --restart=always -v "$PWD/config.lua:/etc/riddim/config.lua" docker.io/mwild1/riddim