ergochat / ergo

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

Timed channel bans #1513

Open DanielOaks opened 3 years ago

DanielOaks commented 3 years ago

Sometimes you only wanna ban someone for a short while and being able to do that easily would be nice. I'm not sure what syntax other ircds use for this, it's something at least one other server does support though iirc.

slingamn commented 3 years ago

Proposal: make this an extban. It'll accept un-normalized inputs like exp:1h,m:alice!*@*, then normalize them to exp:1611919844,m:alice!*@* (UNIX time of expiration) for listing and deletion purposes.

slingamn commented 3 years ago

https://golang.org/pkg/strings/#LastIndexByte

prdes commented 3 years ago

I presume this will cover mutes as well. I remember the discussion and concluding points wrt to have CS BAN ADD <account>|<mask> [<duration>] and CS MUTE ADD <account>|<mask> [<duration>] as a frontend of sorts for these sort of bans. We don't need to have the . It's just that while we may like to familiarize ourselves with such extbans and utilize them, the average channel operator will may not utilize it because of the complexity of typing that. Also it keeps things homogeneous somehow i.e. a channel founder should ideally have to use one toolkit to moderate their channel which would be ChanServ. Thoughts?

prdes commented 3 years ago

I was wondering if #1502 would work with this if it was being implemented.

slingamn commented 3 years ago

Yes and yes.

slingamn commented 3 years ago

Removal should probably normalize out the time arg (so you can unban someone without having to copy and paste the exact time of the expiration?)