ergochat / ergo

A modern IRC server (daemon/ircd) written in Go.
https://ergo.chat/
MIT License
2.25k stars 177 forks source link

Bulk message removal or removing everything from RELAYMSG'd user #1593

Open Mikaela opened 3 years ago

Mikaela commented 3 years ago

Yesterday we had a lot of "binary mess" spawning about ten 50 minutes and 178 lines (before matterbridge crash?) from Discord and I wish to remove it from being visible to new users through KiwiIRC without waiting for history expiration time. I don't expect the content to disappear for clients that have already received it, only for CHATHISTORY and PLAYBACK.

I don't know if this warrants an issue at Oragono or if I should be commenting to https://github.com/ircv3/ircv3-specifications/pull/425, but I am using Oragono while not being a client nor server developer or otherwise part of IRCv3 and by opening an issue there is at least a record of this happening.

Mikaela commented 3 years ago

Self-bumb from IRC and keyword HistServ (that didn't find this issue):

2021-W31-6 14:30:04 +0300 <Mikaela> Regarding recent Apple events what is the Ergo way of dealing with spammers either spamming childporn or something manipulated to look like childporn towards Apple? Copying message-IDs from RAW LOG to HistServ?

I guess Ergo is in a better position than many for not storing actual images/files (unless they are converted to text somehow), but malicious links are still a concern and many IRC clients nowdays fetch images for previews which may include a webchat publicly associated with the network and look bad especially towards new users.

slingamn commented 2 years ago

Let's add HISTSERV BULKDELETE for 2.10. The MVP is the ability to delete messages matching a NUH (or possibly a NUH wildcard) from a single channel.

slingamn commented 2 years ago

I'm going to implement this using the client-to-server protocol (a custom client based on irc-go, taking command-line arguments that specify how to connect to the server and retrieve affected history).

Mikaela commented 2 years ago

That sounds like a excotic solution. Can it be ran remotely and manage remote server through oper credentials or will it need to be ran on the Ergo account on localhost?

slingamn commented 2 years ago

It will work remotely. You'll just need to supply the server address, operator credentials, and (optionally) SASL credentials.

slingamn commented 2 years ago

It's not polished or user-friendly but I figured it was better to release a first pass:

https://github.com/ergochat/bulkremoval

I think the decision to make it client-side instead of server-side has been validated --- it gives us a lot more flexibility in UI decisions, message matching, etc.

poVoq commented 6 months ago

This is good to have for massive spam, but a simpler option for channel ops to just wipe some recent history would be also really good to have.

I would propose to extend the HISTSERV delete function with time based parameters, like so:

/histserv delete #channelname 1d

or 1h or all etc. to just wipe the recent messages from the stored history.