View Issue Details

IDProjectCategoryView StatusLast Update
0006169unrealircdpublic2022-09-15 19:24
Reporterarmyn Assigned Tosyzop  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionno change required 
Product Version6.0.4 
Summary0006169: Module chgswhois and exception swhois with /mode #channel +e ~swhois:*regex*
DescriptionHi

There is no extended ban system for making an exception on a *regexline* of swhois ?

Let's say I want to make a manual approval system so people can write in channels:
1) so by default everyone is banned from the channel with /mode #channel +b *!*@*
2) then to trusted or approved users (95% of users) they receive a "/CHGSWHOIS [user] customswhois approved"
3) then the thing that doesn't exist is to put a swhois exception on the channel like /mode #channel +e ~swhois:*approved*

It could do it to fight against unwanted users (they are only about 5% per day, and are professional ban bypassers, they won't be able to do any more harm if they have to be validated manually)
I also noticed that 3-5% of the people connected in the channels are chatty in the channel, all the others discuss only in pm, which means that it is not necessary to validate them immediately

Here's a trick I'd like to implement:
1) All service accounts that are already registered (example: before 9/11/2022) will have a swhois aprroved by default - 95% are not bothersome, per day
2) If they get in the way, they will be disapproved of the swhois
3) All new subscribers to the services from a date (example: 09/11/2022) will be checked manually, so each new user who wishes to chat in a channel will be put on hold for approval, once validated it will be filed in sql and a nodejs bot will give it the swhois approved each time it connects and it will therefore be able to speak in the channels.
There are on average 150 new subscribers per day and only 0 to 20 of them speak in the salon, but very few, so they can be approved if necessary. The troublemakers will be quickly recognized by their attitude as well as other tricks by which I know how to identify them.
By creating this exception system with swhois approved I could delete an old project which is still running, indeed I validate on average 5 to 10 manual accounts per day, I agree to send them the validation email by done by validating, but it's not reliable, they manage to override this system. They won't be able to with the "swhois approved".
It could allow me to delete this project of validation of accounts by email (5 to 10 per day) by taking care of approving 10 new subscribers per day with the swhois approved

Cheers
TagsNo tags attached.
3rd party modules

Activities

syzop

2022-09-14 12:03

administrator   ~0022638

Last edited: 2022-09-14 12:05

Yes, it would be easy to code an extban that matches on SWHOIS.

In UnrealIRCd 6.0.4 and later, any extban also automatically comes available as a security-group / match item, which means you can use it in
https://www.unrealircd.org/docs/Set_block#set::restrict-commands_in_UnrealIRCd_6.0.4_and_later
using https://www.unrealircd.org/docs/Mask_item#Advanced_matching_criteria

For example if there is a new extban ~swhois, which can be used in channels +bei lists like ~swhois:*approved*
But it can also be used in:
set {
        restrict-commands {
                private-message {
                        except { swhois *approved*; }
                }
                private-notice {
                        except { swhois *approved*; }
                }
                channel-message {
                        except { swhois *approved*; }
                }
                channel-notice {
                        except { swhois *approved*; }
                }
        }
}

That way it easily applied to all channels and you don't have to use any channel +b/+e/+I mode.

Even better (cleaner) would be to first define a security-group with all the exceptions you want (eg also IP for your bot, or stuff like that):

security-group trusted-users {
        swhois *approved*;
        ip 127.*;
        ip 192.168.*;
        // etc.. any other exceptions
}

And then you can use that security group in restrict-commands:

set {
        restrict-commands {
                private-message {
                        except { security-group trusted-users; }
                }
                private-notice {
                        except { security-group trusted-users; }
                }
                channel-message {
                        except { security-group trusted-users; }
                }
                channel-notice {
                        except { security-group trusted-users; }
                }
        }
}

armyn

2022-09-14 23:22

reporter   ~0022639

The swhois system and the security-group exception is good, it is not possible to choose to activate it on some channels in particular?

I also noticed this:
/chgswhois Liska TEST
<- @time=2022-09-14T21:13:43.291Z :irc.d.com 320 Lucide2 Liska :is in security-groups: known-users,webirc-users,tls-and-known-users,tls-users
<- @time=2022-09-14T21:13:43.291Z :irc.d.com 320 Lucide2 Liska :is using an IP with a reputation score of 231
<- @time=2022-09-14T21:13:43.292Z :irc.d.com 320 Lucide2 Liska :est connecté via WEBIRC
<- @time=2022-09-14T21:13:43.292Z :irc.dcom 344 Lucide2 Liska FR :is connecting from France
<- @time=2022-09-14T21:13:43.292Z :irc.d.com 320 Lucide2 Liska :APPROVED
<- @time=2022-09-14T21:13:43.292Z :irc.d.com 317 Lucide2 Liska 41 1663189981 :seconds idle, signon time
<- @time=2022-09-14T21:13:43.292Z :irc.d.com 318 Lucide2 Liska :End of /WHOIS list.

Is the swhois the last raw 320, or is it all 320 lines?
To recognize that it is a swhois you would have to put this: /chgswhois Liska SWHOIS:APPROVED to be able to retrieve it via a bot to differentiate it from other raw 320

syzop

2022-09-15 19:17

administrator   ~0022640

Last edited: 2022-09-15 19:19

If you need something per-channel then no, set::restrict-commands is not for that. Then you get back to your original extbans idea, but I don't think using extbans in channel is a good idea, +b/+e/+I messes too much.. you need to do it in every channel and then your regular banning/exempting, or +i/invex gets too much in the way with regular channel management and/or services, and you need to do it for everying. Bad idea IMO.

It sounds like you need something custom and that the proposed generic UnrealIRCd feature won't work for you. Maybe I should not have suggested / went along with your idea in the first place, it sounds like a feature that pretty nobody will ever use in UnrealIRCd anyway (selecting on swhois).

syzop

2022-09-15 19:21

administrator   ~0022641

Last edited: 2022-09-15 19:24

I'm closing this one. I don't think this is worth developing for UnrealIRCd itself, as it won't benefit many users, only you. It makes little sense to ban/exempt on swhois.

If you want something like it, try contacting a module coder... but even then I don't think you should go with your banning/exempting swhois idea, because.. yeah.. see previous message. Better make it something more 'clean' in my opinion... a channel mode.. a custom module with channel configuration in the config... whatever...

Issue History

Date Modified Username Field Change
2022-09-11 19:24 armyn New Issue
2022-09-14 12:03 syzop Note Added: 0022638
2022-09-14 12:03 syzop Note Edited: 0022638
2022-09-14 12:03 syzop Note Edited: 0022638
2022-09-14 12:04 syzop Note Edited: 0022638
2022-09-14 12:05 syzop Note Edited: 0022638
2022-09-14 23:22 armyn Note Added: 0022639
2022-09-15 19:17 syzop Note Added: 0022640
2022-09-15 19:19 syzop Note Edited: 0022640
2022-09-15 19:21 syzop Assigned To => syzop
2022-09-15 19:21 syzop Status new => closed
2022-09-15 19:21 syzop Resolution open => no change required
2022-09-15 19:21 syzop Note Added: 0022641
2022-09-15 19:22 syzop Note Edited: 0022641
2022-09-15 19:24 syzop Note Edited: 0022641