mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2013
Posts: 22
A
Ameglian cow
OP Offline
Ameglian cow
A
Joined: Aug 2013
Posts: 22
here the code... When I put Cap lock one first it works and when I put the link one first that one works and the cap doesn't I need help smirk

Code:
;;;;;LINK BLOCKER;;;;;
;;;;;LINK BLOCKER;;;;;
;;;;;LINK BLOCKER;;;;;
;;;;;LINK BLOCKER;;;;;
;;;;;LINK BLOCKER;;;;;



on @*:text:*:#:linkpost $1- 
on @*:action:*:#:linkpost $1- 
on @*:notice:*:#:linkpost $1- 
alias -l linkpost { 
  if ((!%p) && (!$hfind(permit,$nick))) { inc -u4 %p 
    var %purge /^!(link\so(n|ff)|(permit))\b/iS 
    var %domain com|edu|gov|mil|net|org|biz|info|name|museum|us|ca|uk
    var %link /(?<=^|\s)((?>\S{3,8}:\/\/|w{3}\56)\S+)|\56( $+ %domain $+ )\b/iS 
    if ($findtok(%chanon1,#,1,32)) && ($nick(#,$nick,vr)) && ($regex($1-,%link)) { 
      timeout # $nick | /mode # -b $nick 
      msg #  Halt $nick ! No links shall get through without permission from a mod!
      msg # /timeout $nick 1
    } 
    elseif (($regex($1-,%purge)) && ($regml(1) = permit) && ($nick isop #) && ($$2 ison #)) { 
      hadd -mz permit $v1 90 | notice $v1 You have 90 seconds to post a link. Starting now! 
      msg # Betty gave you 90 sec to post something... better HURRY!!
    } 
    elseif (($regml(1) = link on) && ($nick isop #)) { 
      goto $iif(!$istok(%chanon1,#,32),a,b) | :a | set %chanon1 $addtok(%chanon,#,32) 
      .msg # My Link Protection Is Now on in: $+($chr(2),#) 
      halt | :b | .msg # $nick $+ , my link protection is already on in $& 
        $+($chr(2),#,$chr(2)) ! 
    } 
    elseif (($regml(1) = link off) && ($nick isop #)) { 
      goto $iif($istok(%chanon1,#,32),c,d) | :c | set %chanon1 $remtok(%chanon,#,1,32) 
      .msg # My Link Protection Is Now off in: $+($chr(2),#) 
      halt | :d | .msg # $nick $+ , My link protection is already off . $& 
        ! 
    } 
  } 
}





;;;;;CAP BLOCKER;;;;;
;;;;;CAP BLOCKER;;;;;
;;;;;CAP BLOCKER;;;;;
;;;;;CAP BLOCKER;;;;;
;;;;;CAP BLOCKER;;;;;


ON @*:TEXT:*:#: {
  IF (($len($1-) < 15) || ($nick isop #)) { RETURN }
  VAR %text = $strip($remove($1-,$chr(32)))
  VAR %non.caps = $len($removecs(%text,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z))
  VAR %full.line = $len($strip($remove(%text,$chr(32))))
  VAR %percent = $calc(1 - (%non.caps / %full.line))
  IF (%percent >= 0.8) {
    msg # /timeout $nick 1 | msg # Betty hates Yelling so... DON'T YELL!!!
  }
}

Last edited by Achievements; 12/08/13 07:42 PM.
Joined: Aug 2013
Posts: 15
P
Pikka bird
Offline
Pikka bird
P
Joined: Aug 2013
Posts: 15
make it in 2 different scripts and load them both it should work like that.

its prolly because its checking 2 times for on @*:TEXT:*:#: in the same script

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
You can only have one matching event per script file. The first on text matches, so it will not do any other on text events after that. Either combine the two on text events or use two script files as mentioned above.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard