IRC bot for GamingOnLinux.com, written in Rust.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Sami Lahtinen af661a1add Here's an example config too 2 months ago
src Freenode made me do a feature update 2 months ago
.gitignore Initial commit to git, working replacement for GOLBOTv2 written in Rust 3 years ago
.gitlab-ci.yml Also, switch to rust:latest for tests 1 year ago
CONTRIBUTING.md Add CONTRIBUTING 1 year ago
Cargo.toml Switch to XDG 4 months ago
Dockerfile Updated deps and added Dockerfile 1 year ago
LICENSE Add LICENSE 3 years ago
README.md Update README.md 2 years ago
botconfig-example.toml Initial commit to git, working replacement for GOLBOTv2 written in Rust 3 years ago
plugins-example.toml Here's an example config too 2 months ago

README.md

GOLBot-Rust, GamingOnLinux IRC Bot Rust rewrite

pipeline status codecov

What is it?

GOLBot-Rust is a rewrite of the older GOLBotV2 IRC bot, used on the gamingonlinux.com IRC channel. This marks the third major iteration of the GOLBot IRC bot.

GOLBot's tasks include posting links from an RSS feed to reading URLs for web page titles and allowing users to check when someone has been last seen and leaving each other messages.

Why a third iteration?

The previous version of GOLBot was hacked together by two people with little regard to maintainability. As such, the versions we ended up with were more akin to spaghetti than readable program code. This made making changes and improvements to the bot increasingly difficult.

GOLBot-Rust is a total rewrite of the codebase and aims to separate each part of the bot properly, making changes and additions significantly easier.

Usage

GOLBot-Rust uses two configuration files: botconfig.toml and plugins.toml.

botconfig.toml

The general structure of the botconfig.toml is as follows:

    nick = "GOLBOTv3"
    serv = "chat.freenode.net"
    channel = "#golbottest"
    realname = "I have none"
    ident = "GOLBOT"
    password = "somepassword" # optional

An example file is provided in the repository.

In the botconfig.toml file you can define the nickname, server and channel, along with other identifying information used to connect the bot to the desired IRC server.

plugins.toml

The plugins.toml file is used to store any plugin specific, largely optional, details. You can see an example file here, which defines an RSS feed for the RSS plugin to read and a nickname to ignore in the URL Reader plugin.

Extending the bot

The bot can be extended by writing plugins for it. I use the term "plugin" fairly loosely, however, since plugins cannot be loaded during runtime. Instead the plugins are compiled into the bot upon building. The plugin system is more of an abstraction layer that separates the internals of the IRC bot from the code that is run on top of the bot.

I recommend you read the sources at src/plugins/ to have an idea how a GOLBot plugin behaves. Better documentation about plugins will be written when I bother writing some.