Lines, Text Files, and Scripts, Oh My! - 22/02/10 06:07 PM
As the subject puts it, I'm having trouble with lines in text files when used in scripts.
Here's the scoop. I want to define lists in my text files. Each line with a specific thing on it.
Bad Words - Words that shouldn't be said by anyone. Sure you guys know what I mean here.
Bad Nicks - Nicknames with bad words in them.
NoKick - Nicknames that the bot should not be made to kick or ban under any circumstances. ((Owner, admins, etc))
The way I've been writing the script is like this.
on 500:TEXT:Kick *:?: {
if ($2 isin $read($mircdir\text\<filename>)) msg # I can't kick that person!
else /kick # $2
}
The thing is, it's not 100%. The more names, the less it hits. I know $read is doing it randomly, I need it for the entire list.
Is there a way to make the script glance at the list.txt and if any line matches, trigger the if condition?
Here's the scoop. I want to define lists in my text files. Each line with a specific thing on it.
Bad Words - Words that shouldn't be said by anyone. Sure you guys know what I mean here.
Bad Nicks - Nicknames with bad words in them.
NoKick - Nicknames that the bot should not be made to kick or ban under any circumstances. ((Owner, admins, etc))
The way I've been writing the script is like this.
on 500:TEXT:Kick *:?: {
if ($2 isin $read($mircdir\text\<filename>)) msg # I can't kick that person!
else /kick # $2
}
The thing is, it's not 100%. The more names, the less it hits. I know $read is doing it randomly, I need it for the entire list.
Is there a way to make the script glance at the list.txt and if any line matches, trigger the if condition?