Adding a flag to the ban command "/msg X ban [-w] <#chan> <REGEXP | banmask>" and a new column in the ban table would make it possible the use of regular expressions without restrictions, still.. wouldn't solve the cpu time problem.
On 7/6/07, Perry Lorier <[EMAIL PROTECTED]> wrote:
Brad Campbell wrote: > Fahim Chachar wrote: >> Dear coders, >> >> I'd like to suggest an idea to improve X that is there has to be some >> enhacements in BANS of X. Such as: >> >> If there is a person who contains 2 numbers in his ident, I'd make X >> to ban his nickname. That could be 2 3 4 etc numbers, in his ident or >> his nickname or his host and X would ban him. Also if we could allow X >> to place a ban to those who have any user given alphabets in his >> nickname/ident or his host. If that enhancement comes in X it would >> really control botnets on Undernet. > > I think you underestimate the bot writers. Having built regex bans into > my channel bots, the bot controllers rapidly figure out what is > triggering the bans by experimentation and work around it. > > Anything man can create, man can undo. > > In addition, I'd hate to have to account for the increase in processing > load required to achieve something like that. I'd rather see some form > of pattern matching in the server banlist first (and I'd guess that is > pretty hard to do without crippling the servers with extra load) > > Please, tell me if I'm wrong :) So I've often considered how to make regex bans usable. For most users understanding the full regex language is hard, and regex's have the unfortunate property of using quite a bit of cpu time, often being O(n**2). My thought would be to add extra matching characters that work like ? but only match a subset of the letters. One obvious choice would be to use "#" to match digits, except # is used by channels, so perhaps: % matches a single digit. ; matches any letter. thus ;;;[EMAIL PROTECTED] would match any 5 character nick where the first 3 characters are letters, and the last two are digits. In choosing the punctuation you have to consider: `~^\{}[]_- are all valid in nicks . is valid in server names and hostnames. #&+ are used as channel identifiers : is used by the IRC protocol *? are already used by banmasks ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghjiklmnopqrstuvwxyz0123456789 are already used by nicks/hostnames/ipaddrs/idents. $ is used on undernet for server notices (/notice $*.org foo) !@ are used as seperators within a banmark Thus you're left with %,;'"|/ as usable punctuation, and I'd like to keep hold of / for other projects. In choosing a syntax it must be one character matches one character, we can't have "[A-Z]" as that takes 5 characters to match one character and would require the length of bans to be longer. This also excludes using \w\d etc to match word letters and digit letters, although this is better than [] syntax. So thoughts (patches?) from anyone? _______________________________________________ Coder-com mailing list Coder-com@undernet.org http://undernet.sbg.org/mailman/listinfo/coder-com
-- Emanuel, If you're looking for a reason to hate me, you won't find one, but thousands; If you're looking for a reason to love me, you'll need to dig through the thorns of hate to find one. If you judge people, you have no time to love them. When looking at faults, use a mirror, not a telescope. Dream as if you'll live forever. Live as if you'll die today. Quitting is the easiest thing to do when you quit things that you don't love, and the hardest thing to do when you quit the ones you really love. Once upon a time, an angel loved me. Today, I Sand a Sad Sand Angel in my soul's desert world, so I can keep the image of the one who loved me closer to me more than ever. _______________________________________________ Coder-com mailing list Coder-com@undernet.org http://undernet.sbg.org/mailman/listinfo/coder-com