mIRC Home    About    Download    Register    News    Help

Print Thread
how to convert this script to twitch? #266404 01/12/19 12:14 PM
Joined: Nov 2019
Posts: 3
C
cookiemac Offline OP
Self-satisified door
OP Offline
Self-satisified door
C
Joined: Nov 2019
Posts: 3
Quote

on *:text:*:#: {
if ($ulevel >= 99) {
if ($strip($1) == !filter) {
if ($strip($2) == on) {
if (%filter == on) { msg $chan Filter Is Already On }
elseif (%filter == off) { set %filter on | msg $chan Filter Is Now %filter }
elseif (!%filter) { set %filter on | msg $chan FIlter is Now %filter }
}
elseif ($strip($2) == off) {
if (%filter == off) { msg $chan Filter Is Already Off }
elseif (%filter == on) { set %filter off | msg $chan Filter Is Now %filter }
elseif (!%filter) { set %filter off | msg $chan Filter Is Now %filter }
}
}
if ($strip($1) == !filteradd) {
var %p = 1
while (%p <= $lines(badwords.txt)) {
if ($gettok($read(badwords.txt, %p),1,126) == $gettok($strip($2-),1,126)) {
set %rmatch 1
msg $chan $gettok($strip($2-),1,126) Is Already In Filter List
}
if (%p == $lines(badwords.txt)) {
if (!%rmatch) { write badwords.txt $strip($2-) }
}
inc %p
}
}
if ($strip($1) == !filterrem) {
var %o = 1
while (%o <= $lines(badwords.txt)) {
if ($gettok($read(badwords.txt, %o),1,126) == $strip($2-)) {
write $+(-dl,%o) badwords.txt
}
inc %o
}
}
}
if (%filter) {
var %x = 1
while (%x <= $numtok($strip($1-),32)) {
var %b = 1
var %y = $gettok($strip($1-),%x,32)
while (%b <= $lines(badwords.txt)) {
var %c = $gettok($read(badwords.txt, %b),1,126)
if (%y == %c) || ($gettok($strip($1-),$+(%x,-,$numtok($gettok($read(badwords.txt, %b),1,126),32)),32) == $gettok($read(badwords.txt, %b),1,126)) {
;;;;THIS PART;;;;;
mode $chan +b $address($nick,2) | kick $chan $nick BadWord Detected: $gettok($read(badwords.txt, %b),2,126)
}
inc %b
}
inc %x
}
}
}

Re: how to convert this script to twitch? [Re: cookiemac] #266417 5 hours ago
Joined: Feb 2015
Posts: 60
K
kap Offline
Babel fish
Offline
Babel fish
K
Joined: Feb 2015
Posts: 60
I have no experience with Twitch IRC servers, but I looked at the code of a friend of mine who does and I see - according to https://github.com/craze/TMI4mIRC/blob/db9fd4b92847d4aa6afd4f7232c51ed14fe0c68e/tmi4mirc.mrc#L338 - that to ban someone you use:

Code
.privmsg $chan .ban $1


...where $1 is the nickname of the person to ban...

Also, I know SReject made a set of twitch scripts for mIRC and looking at https://github.com/SReject/mTwitch/blob/master/README.md I read that there's a #mirchelp channel where you might be able to ask for more information about mIRC + Twitch.

Hope this helps somewhat!


irc://irc.mircscripts.net:+6697/chat