mIRC Home    About    Download    Register    News    Help

Print Thread
#259205 16/10/16 07:31 AM
Joined: Oct 2016
Posts: 1
B
bixbe Offline OP
Mostly harmless
OP Offline
Mostly harmless
B
Joined: Oct 2016
Posts: 1
me and my friend were working on a script with mIRC to blacklist words out of a twitch chat you would be banned for using them. we came up with a code like this.

1:connect:{ /TWITCHCLIENT 3 }

on *:TEXT:*!blacklist add*:#dimmu_borgir75: {
if ($nick isop #) {
set %blacklist. $+ $3 $+ . $+ $chan On
msg # $3 Has been added to my blacklist, anyone using $3 will be timed out for 10 minutes.
}
else {
msg # Sorry $nick $+ , you do not have permission to add words to the blacklist
}
}

on *:TEXT:*!blacklist del*:#dimmu_borgir75: {
if ($nick isop #) {
unset %blacklist. $+ $3 $+ . $+ $chan On
msg # $3 Has been removed from the blacklist
}
else {
msg # Sorry $nick $+ , you do not have permission to remove words from my blacklist
}
}

on *:TEXT:**:#dimmu_borgir75: {
if ($nick isop #) return
var %i = 1
while (%i <= $0) {
if ($($+(%,blacklist.,$gettok($1-,%i,32),.,#),2)) {
msg # $nick --> Do not use Blacklisted Words. (Timeout)
msg # .timeout $nick 600
break
}
inc %i
}
}

the problem his works adding words and banning people but mine keeps repeating i dont have permission to add words.

Joined: May 2015
Posts: 133
K
Vogon poet
Offline
Vogon poet
K
Joined: May 2015
Posts: 133
Pretty sure twitchclient 3 is deprecated and no longer used at all.

Also, make sure you wait for your OP status to be identified by mIRC. You may want to switch it to check for isop in $msgtags.

Code:
(user-type=mod isin $msgtags)


and request the following capabilities.

raw CAP REQ :twitch.tv/membership
raw CAP REQ :twitch.tv/tags
raw CAP REQ :twitch.tv/commands


twitter @keyeslol

Link Copied to Clipboard