WorldDMT commented on a Page, CTCP PING and VERSION Script - With Flood Protection  -  Apr 13, 2010

hi
you can combine the two together and no need to use for all /set u can use /var for some variable so u can do it like this if u want

on *:text:*:#:{
  if $istok(!ping.!version,$strip($1),46) {
    tokenize 32 $strip($1-)
    var % $+ $1 $calc($ctime - $+(%,w,$1))
    if $($+(%,$1),2) >= 10 {
      set $+(%,w,$1) $ctime
      set %Wchan #
      if ($1 == !ping) set %P.S $ticks
      ctcp $nick $iif($1 == !ping,ping,version)
      halt
    }
    else notice $nick From # $+ : Please wait $calc(10 - $+(%,$1)) seconds
  }
}

on *:ctcpreply:ping*:{
  var %ping.ticks $calc($ticks - %P.S)
  msg %Wchan $nick $+ 's Ping Response Time is $calc(%ping.ticks / 1000) seconds
  unset %P.S,%Wchan
  halt
}
on *:ctcpreply:version*:{
  msg %Wchan $nick is using: $2-
  halt
}

P.S: the code is not tested

 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.