ModRail: A Moderation bot to keep your server on Track.

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

Post Reply
User avatar
SarahRose
Engineer
Engineer
Posts: 2
Joined: 05 May 2024 11:15

ModRail: A Moderation bot to keep your server on Track.

Post by SarahRose »

A moderation bot to keep your server on Track (get it, Mod(erator)Rail(on Track?) :lol: :wink: :roll: )

The idea is pretty simple, with the help of this library https://github.com/liki-mc/pyOpenTTDAdmin I began writing a bot that uses the admin port of OpenTTD to monitor all chat messages and allow us take actions based on how users behave.

This is still very much in the early stages but so far it does the following:
  • Monitors all chat on the server
  • Easy configuration via ini file
  • Kick users based on using foul language in wordlists
  • Allows users to kick and ban vote users, requires votes from several other user ids, though I will likely switch to ip and id combos to reduce abuse factor

I have plans for adding offensive name changing based on wordlists as well, again all while allowing you to enable/disable stuff from the ini file.

Let me know if you're interested, I can't afford to host a server right now so I'm just testing this locally and having fun with it but....
I'll need people interested in it being expanded to continue development long term.

If you'd like to play with it, I just uploaded it to github: https://github.com/SarahRoseLives/ModRail
User avatar
odisseus
Director
Director
Posts: 576
Joined: 01 Nov 2017 21:19

Re: ModRail: A Moderation bot to keep your server on Track.

Post by odisseus »

It looks like your script checks for offensive words by simply comparing the message against the static entries in a list. Such algorithm is very easy to bypass (e. g. f_u_c_k). Generally, automating censorship in a reasonable way is far from trivial.
User avatar
SarahRose
Engineer
Engineer
Posts: 2
Joined: 05 May 2024 11:15

Re: ModRail: A Moderation bot to keep your server on Track.

Post by SarahRose »

You're correct, the way it's being done right now is pretty simple and wouldn't be effective in a lot of situations.
I'm working to improve how I do this but wanted to start with a wordlist just to see if I could do it.

The vote kick option I believe also gives users more control over situations where someone is getting around it.
Speaking of, that's still being fine tuned as well to ensure it's not abused. I just did this in a night to see if I could.

Right now vote based kicks are just done by player id so they could re-join continuously. Now a vote ban is an IP ban so that's a little better, though again a user can evade that by changing their ip too.

Happy to update and change things if it might eventually get some use.
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 5 guests