mIRC Homepage
Posted By: obsessed Lagbar - 24/08/03 09:24 AM
Ive buillt a lagbar that sends a notice including ticks to yourself
when you receive the notice a timer waits 3 seconds and send another one but there is something wierd going on.
[19:19:14] -obsessed- lagchk 25896953
[19:19:17] -obsessed- lagchk 25900953
[19:19:22] -obsessed- lagchk 25904953
[19:19:25] -obsessed- lagchk 25908953
But the timer only triggers when the notice is received i dont this this is a concincidence.
Code:
alias -l lagchk {
  .notice $me lagchk $ticks
  set %t $ticks
  .timerlagcount -im 0 1 lagdisp $!round($calc(($ticks - %t ) / 1000),2)
}
on me:^*:notice:lagchk &:?:{
  .timerlagcount off
  lagdisp $round($calc(($ticks - $2) / 1000),2)
  .timerlagchk -i 1 3 lagchk
  haltdef
}
Posted By: MrPeepers Re: Lagbar - 24/08/03 09:42 AM
You could just set the timer to send to send the notice every 3 seconds instead of responding to the notice
/timerlag 0 3 /alias here
Posted By: obsessed Re: Lagbar - 24/08/03 09:53 AM
The problem with that is if I was lagging really bad i might have 3 or 4 of them queued up which would probably all return at the same time causing more lagg. I dont want to flood myself. smile
Posted By: Watchdog Re: Lagbar - 24/08/03 10:22 AM
I have a similar setup for a text based lagmeter in the titlebar, though it runs from ctcpreply instead of notices.
Code:
ON *:CTCPREPLY:LAGX*: {
  if ($nick == $me) {
    set %lag $round($calc((($ticks - $2 ) / 2) / 1000),4)
    titlebar  ··Watchdog Script V5.0···· To do the right thing is the right thing forever -- Lag: %lag seconds.
    halt
  } 
}
ON *:CONNECT: {
  .timer 0 7 lagcheck
}
alias lagcheck { 
  .ctcpreply $me LAGX $ticks 
}
It's probably a dud now because I wrote it about 3 - 4 years ago but you might be able to get an idea or two from it. Because it works, I've never bothered to update it. :tongue:
Posted By: WaNt3D Re: Lagbar - 25/08/05 12:18 AM
testing ^_^
© mIRC Discussion Forums