if ($1- isin $read(bans- $+ $chan $+ .txt,w, $1-))
That's not working seen as you (For some reason.) HAVE to use variables to make that work. Just like this one:
echo # 14(00 $+ $time $+ 14) 10-11-15- 5min timeout on $nick
You also didn't define how long you want $nick to be timed out.
.msg $chan .timeout $nick |
In other words:
on 1:TEXT:*:#:{
var %readbans bans- $+ $chan $+ .txt
var %echotime 00 $+ $time $+ 14
if ($1- isin $read(%readbans,w, $1-)) { .msg $chan .timeout $nick 10 | echo # 14(%echotime) 10-11-15- 5min timeout on $nick }
elseif ($1 == !addban) {
if ($2- == $read(%readbans,w, $2-)) { msg $chan banmask " $+ $2- $+ " is already added. }
else { write %readbans $2- | msg $chan banmask " $+ $2- $+ " added. }
}
elseif ($1 == !delban) {
if ($2- != $read(%readbans,w, $2-)) { msg $chan no such banmask " $+ $2- $+ ". }
else { write -ds " $+ $2- $+ " %readbans | msg $chan banmask " $+ $2- $+ " deleted. }
}
}
that ought to do the trick. Try it.
You don't have to modify the !addban/!delban parts. This is just WAY easier when making modifycations. With some editing you could host this on multiple streams and once with just 1 script running. Don't get me wrong, but that's EXACTLY how Moobot, Nightbot Saucebot etc do their stuff. The have 1 script made to differ in options between streams. Now it's your tunr to figure out how and apply that. Then to become as famous as a bot like Moobot and Nightbot you'd have to pull some serious strings by some big-ass streams.
hello. thanks for the help. I will try this when I get the time and get back to you.
and for the timeout. I don't need to set time since the default is 5 minutes. this is a twitch.tv IRC-channel I'm using the script for. so that's fine. :)
and I don't need to change the !addban/!delban parts. they work as intended. I can add and remove several words banmasks.