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 !