I have this script for it, but its not working, i cant see why its not working
on *:text:*:#:{
if ($nick isop #) { halt }
if ( $len($1-) >= 10 ) {
if ( $calc($regex($1-,/[A-Z]/g) / $regex($1-,/[A-Z]/gi) * 100) >= 70 ) {
var %capsblock = $rand(1,3)
if (%capsblock == 1) { msg $chan $nick -> stop typing in caps! [caps] [warning] }
if (%capsblock == 2) { msg $chan $nick -> Ey! stop yelling! [caps] [warning] }
if (%capsblock == 3) { msg $chan $nick -> stop typing in BIG LETTERS! [caps] [warning] }
write capsban.txt $nick
msg /timeout $nick 120
}
}
}
The last line should be msg $chan .timeout $nick 120
At least that's I think the command is on Twitch, but it might be .ban
The command on twitch its
msg $chan /timeout $nick (Timeofban)
i had that set but still wont work, it keeps adding a *# before the command
i dont know why its doing that
The /timeout command only works in the Twitch chat (web browser). AFAIK, you have to use "msg $chan .timeout $nick 120", which will do the same as using /timeout in the web chat (except it's visible).
I made that change to your script, and it's working as intended.
Thank you its working now, my next question is that, i have a link protection script and i can turn it off and on, i want to be able to do this for my cap protection aswell, how would i go about doing this
There are a number of ways to do that depending on how you want it to work. If it was me, I would want a single command for on/off that could be accessed via Twitch chat by any mod.
on *:TEXT:!capsprotection:#:{
if ($nick !isop) { return }
if (%capsprotection = $null) { set %capsprotection 1 }
if (%capsprotection = 1) {
set %capsprotection 0
msg $chan Caps lock protection disabled
}
else if (%capsprotection = 0) {
set %capsprotection 1
msg $chan Caps lock protection enabled
}
}
on *:text:*:#:{
if ($nick isop #) { halt }
if ( $len($1-) >= 10 ) && ( $calc($regex($1-,/[A-Z]/g) / $regex($1-,/[A-Z]/gi) * 100) >= 70 ) && ( %capsprotection = 1 ) {
var %capsblock = $rand(1,3)
if (%capsblock == 1) { msg $chan $nick -> stop typing in caps! [caps] [warning] }
if (%capsblock == 2) { msg $chan $nick -> Ey! stop yelling! [caps] [warning] }
if (%capsblock == 3) { msg $chan $nick -> stop typing in BIG LETTERS! [caps] [warning] }
write capsban.txt $nick
msg $chan .timeout $nick 120
}
}
I would want the commands for it as !cap on for cap protection to be on and !cap off for it to be off and i would also want it to be different channels
Thanks for you help pal
on *:TEXT:!caps *:#:{
if ($nick !isop) { return }
if ($2 = on) {
set %capsprot. [ $+ [ $chan ] ] 1
msg # Caps protection enabled
}
else if ($2 = off) {
set %capsprot. [ $+ [ $chan ] ] 0
msg # Caps protection disabled
}
}
on *:text:*:#:{
if ($nick isop #) { halt }
if ( $len($1-) >= 10 ) && ( $calc($regex($1-,/[A-Z]/g) / $regex($1-,/[A-Z]/gi) * 100) >= 70 ) && ( %capsprot. [ $+ [ $chan ] ] == 1 ) {
var %capsblock = $rand(1,3)
if (%capsblock == 1) { msg $chan $nick -> stop typing in caps! [caps] [warning] }
if (%capsblock == 2) { msg $chan $nick -> Ey! stop yelling! [caps] [warning] }
if (%capsblock == 3) { msg $chan $nick -> stop typing in BIG LETTERS! [caps] [warning] }
write capsban.txt $nick
msg $chan .timeout $nick 120
}
}
fix line 2 adding $chan identifier
if ($nick !isop $chan) { return }