bad nick txt file ?

Help for those learning Tcl or writing their own scripts.
Post Reply
p
pektek
Halfop
Posts: 41
Joined: Sat Jul 01, 2023 4:51 pm

bad nick txt file ?

Post by pektek »

eggdrop reading txt file with bad nicknames ?

Is this possible ?
User avatar
Carlin0
Voice
Posts: 30
Joined: Tue Dec 04, 2018 3:41 pm
Location: Italy

Re: bad nick txt file ?

Post by Carlin0 »

If you search in tclarchive.org there are several scripts for this
p
pektek
Halfop
Posts: 41
Joined: Sat Jul 01, 2023 4:51 pm

Re: bad nick txt file ?

Post by pektek »

I couldn't find what I was looking for
w
willyw
Revered One
Posts: 1200
Joined: Thu Jan 15, 2009 12:55 am

Re: bad nick txt file ?

Post by willyw »

I'm not sure of exactly everything that you are looking for, and what you want the final product to do for you.

However, if you are trying to write your own tcl script to read from a text file, then this:

Code: Select all

   https://forum.eggheads.org/viewtopic.php?t=6885   
is VERY helpful. I've used the various info found there many times.

With the ideas there, you could easily write a tcl script to read all the lines from a text file into a variable.
I assume that you'd have one nick per line.
Once you have them in a variable as a list, then you can use other tcl commands to search and/or manipulate them as you please. Again... I don't know exactly what you are trying to do.

I hope this helps.

Good luck with your project. :)
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
s
simo
Revered One
Posts: 1085
Joined: Sun Mar 22, 2015 2:41 pm

Re: bad nick txt file ?

Post by simo »

Ive always wondered if there is a proper way read from a large text file each time a nick joins on a busy channel or in the case of checking badwords each time some one types in a busy channel from
A file with like 1000 or 2000 or more lines.
w
willyw
Revered One
Posts: 1200
Joined: Thu Jan 15, 2009 12:55 am

Re: bad nick txt file ?

Post by willyw »

simo wrote: Mon May 06, 2024 3:25 am Ive always wondered if there is a proper way read from a large text file each time a nick joins on a busy channel or in the case of checking badwords each time some one types in a busy channel from
A file with like 1000 or 2000 or more lines.
I think that the AllProtection script does both of these things. I don't recall ever examining it closely to see exactly how it does it, though. ( It is a huge and complicated script. )

But perhaps if you have time, you might like to get a copy of it, and try to see how it does it.

As for, " ... if there is a proper way ..." - I surely don't profess to know the "proper" way. :) If/when I am trying to script something, I just keep at it until I get it working. My way. :) :)

Seriously though: That link posted above, to the FAQ section of this forum, to that post that shows code for how to read a text file - is SO very handy. I hope that post lives forever. Whenever I need to do that, I just visit that post. Saves me the time of digging in my own scripts, looking for where I have used it.
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
User avatar
Carlin0
Voice
Posts: 30
Joined: Tue Dec 04, 2018 3:41 pm
Location: Italy

Re: bad nick txt file ?

Post by Carlin0 »

With a little imagination you don't even need a script to keep the bad nicknames at bay:

* You create a user in the bot
* Give user the +k flag
* Add as many nicknames as you want
Post Reply