bitbot-irc / bitbot

https://bitbot.dev | Python3 event-driven modular IRCv3 bot 🤖

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rework the way the channel blacklist works

examknow opened this issue · comments

Currently, the channel blacklist is managed by a hacky channel config setting. Not only is there no way to leave information as to the reason for the blacklist, but the channel's blacklist status cannot actually be managed without the bot first being in the channel. In addition, anyone with operator status in the channel can blacklist the channel when this function should only ever be used by bot admins.

I propose to give the channel blacklist its own table in the database. This will allow us to log the creator of the blacklist entry and allow them to provide a reason for administrative purposes. By moving away from the channel config setting, we can also blacklist wildcard patterns which would allow us to ban entire namespaces (ie #botnet* or similar.)

you could keep the same table but only allow changes to it via a command that requires a user to be bot admin