Smarter than a toaster.
Banserv (or BanS3rv, as it was effectively called due to some naming policies on the AzzurraNet servers), was my second bot of a relative importance on Azzurra. I created it to keep some unwanted users away from the channels I managed. Unfortunately, these unwanted people have the tendency of not understanding (or not caring) that they are unwanted, so they try to enter channels where they know they are undesired anyway. AzzurraNet already had services to help manage channels, like ChanServ, but since they were widespread and well-known, there were some workarounds to avoid its bans.
Initially I thought about a preventive defense system, one that would ban users before they would even join the channels. However this solution had some drawbacks: first of all I would not be able to understand why the bot would ban some seemingly random addresses or if one of the banned users was actually trying to access the channel, or finally lost interest in it. Additionally, I thought that if users could see the bot adding and removing addresses from the banlist, it would be easier for them to figure out how it worked and maybe circumvent it.
In reality maybe I was overstimating the capabilities of most of this trolls, but just to be on the safe side I decided to change the bot so that it would not ban users until they attempted to join the channel. The trait that let Banserv work reliably for many years was that it was using IRC's notify list (that we might be calling "friends list" today) to add nicknames of notable users. The servers would then notify Banserv as soon as one of these users logged in. Banserv would at that point take note of the user's address, before they joined any channel, and it was able to recongize and kick them even if they changed nickname by the time they joined.
This behaviour caused some false positives, that ended up in the ban of some innocent users, but they were so few that taking care of them was not a chore and the channel was kept secure.
Later I added anti-caps, anti-flood and anti-mass-action protections, with a three strikes warning system and a regex powered antispam filter.
Banserv also communicated with Tavoletta to transfer some data to generate some stats.
Banserv was never released, since it was written for personal use and was in service until 2008, alternating ups and downs until it was finally decommissioned.
Copyright © 2020 - 2021 Riccardo Bastianini — All rights reserved.