mIRC Home    About    Download    Register    News    Help

Print Thread
[Twitch] Ban Bot #254264 31/07/15 07:28 AM
Joined: Jun 2015
Posts: 6
M
Mike512 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Jun 2015
Posts: 6
Hey guys! Im back this time I have a script that bans users for various reasons but I cant get the the script to work to timeout people for using certain words.
Code:
on *:TEXT:*:#: {
  if ($nick isop #) { halt }
  if ($read(words.txt) isin $1-) {
    timeouts $nick
  }
}


This is where the problem is Ive tried it a couple different ways but for some reason it seems to ban anyone who even uses a letter thats in the word list. Here Is a setup of the word list.

Code:
badword1
badword2
badword3


Im sure its something simple Im missing. Thanks in advanced.

Last edited by Mike512; 31/07/15 08:47 AM.
Re: [Twitch] Ban Bot [Re: Mike512] #254282 31/07/15 09:38 PM
Joined: Sep 2014
Posts: 259
S
Sakana Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2014
Posts: 259
$read(words.txt) <---- this just reads a random line in the file

You would have to do a while loop over all the lines in the file and check for each of them

You can also make a $regex for better performance

Re: [Twitch] Ban Bot [Re: Sakana] #254349 05/08/15 07:51 PM
Joined: Jun 2015
Posts: 6
M
Mike512 Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Jun 2015
Posts: 6
Thanks. I knew it was something I was doing stupid.

Re: [Twitch] Ban Bot [Re: Mike512] #254550 15/08/15 09:59 PM
Joined: Aug 2015
Posts: 12
A
Airfox Offline
Pikka bird
Offline
Pikka bird
A
Joined: Aug 2015
Posts: 12
Can you write the working script? Wanna use the same D: