Jump to content

CTCP


maria

Recommended Posts

ctcp *:*:*: {
  if ($nick == $me) Halt
  echo $active 04 $str($chr(160),10) You were $1 checked by $nick to ignore CTCP for type /ictcp and to remove /uctcp
}

 

/ignore -t *!*@*

/ignore -r *!*@*

 

 

How could i put all that together so if someone CTCP you after say 5 times it would ignore CTCP's ?

Link to comment
Share on other sites

ctcp *:*:*: {
  if ($nick == $me) return
  inc -u30 %ctcp. [ $+ [ $server ] $+ . [ $nick ] ]
  if (%ctcp. [ $+ [ $server ] $+ . [ $nick ] ] == 5) {
    ignore -t *!*@* 
    ignore -r *!*@*
    echo $active 04 $str($chr(160),10) $nick has requested to many ctcp requests in 1 go. He has now been ignored.
    return
  }
  elseif (%ctcp. [ $+ [ $server ] $+ . [ $nick ] ] < 5) echo $active 04 $str($chr(160),10) You were $1 checked by $nick to ignore CTCP for type /ictcp and to remove /uctcp
}

 

I believe this is what you want.

Link to comment
Share on other sites

  • 2 weeks later...

ctcp *:*:*:{
 if ($nick == $me) return
 hinc -mu30 ctcpflood $+ $cid $wildsite
 if ($hget(ctcpflood $+ $cid,$wildsite) == 5) {
   echo 04 -a $str($chr(160),10) $nick has requested 5 ctcps from you in 30 seconds. Ignoring all ctcps... Type /uctcp to remove ignores.
   .ictcp
   hfree ctcpflood $+ $cid
 }  
 else echo 04 -a $str($chr(160),10) You were $1 checked by $nick $+ . To ignore CTCPs type /ictcp and to remove /uctcp
}
alias ictcp ignore -tw *!*@*
alias uctcp ignore -rw *!*@*

 

This will allow 5 ctcps in 30 seconds. To change the no. of seconds change "hinc -mu30" to "hinc -mu<number of seconds>". To change the no. of allowed ctcps change "if ($hget(ctcpflood $+ $cid,$wildsite) == 5)" to "if ($hget(ctcpflood $+ $cid,$wildsite) == <number of seconds>)"

Edited by hixxy
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...