Links script

By Kranium31 on Feb 09, 2014

I need help with a link script for jtv. I modified some code i found from a few different places here. I'm trying to get it to timeout people when they post a link without permission. As it stands now it times out whether links are on or off. Can anyone help me fix the code?

on *:text:!links on:#:{
  %links = 1
  describe $chan Links Protection On.
}
on *:text:!links off:#:{
  %links = 0
  describe $chan Links Protection Off.
}

on $*:text:/\.(?=com\b|net\b|org\b|ca\b|uk\b|tv\b|name\b|www\b|http\b)/iS:#:{
  /describe # .timeout $nick Whoa! $nick $+ , Don't Post links in here without permission from a mod.. Cya in 10 mins B)
  } 

Comments

Sign in to comment.
boyley   -  Feb 10, 2014

on :text::#:linkpost $1-
on :action::#:linkpost $1-
on :notice::#:linkpost $1-
alias -l linkpost {
if ((!allow) && (!$hfind(allow,$nick))) { inc -u4 %p
var %purge /^!(links o(n|ff)|(allow))\b/iS
var %domain com|edu|gov|mil|net|org|biz|info|name|museum|us|ca|uk|tv|png|gif|jpg|(dot)
var %link /(?<=^|\s)((?>\S{2,8}:\/\/|w{2}\56)\S+)|\56( $+ %domain $+ )\b/iS
if ($findtok(%chanon,#,1,22)) && ($nick(#,$nick,vr)) && ($regex($1-,%link)) {
msg $chan /timeout $nick | timer11 1 1 msg $chan /unban $nick | describe $chan $nick no posting links moron Kappa
}
elseif (($regex($1-,%purge)) && ($regml(1) = allow) && (($nick isop #) || ($nick == boy13y)) && ($$2 ison #)) {
hadd -mz allow $2 60 | describe # $2 You have 1 minute. to post a links. Hurry!(-(_)-)
}
elseif (($regml(1) = links on) && ($nick isop #)) {
goto $iif(!$istok(%chanon,#,22),a,b) | :a | set %chanon $addtok(%chanon,#,22)
describe # Links filter on
halt | :b | describe # Links filter is on you fool.
$+($chr(2),#,$chr(2)) !
}
elseif (($regml(1) = links off) && ($nick isop #)) {
goto $iif($istok(%chanon,#,22),c,d) | :c | set %chanon $remtok(%chanon,#,1,22)
describe # Links filter off
halt | :d | describe # Links filter has been disabled post away bishes Kappa
!
}
}
}

 Respond  
boyley   -  Feb 10, 2014

copy paste that

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.