mIRC Homepage

lagchecker

Posted By: raZOR

lagchecker - 10/03/06 10:24 AM

i have lag checker that shows delay in titlebar
problem is that it always breaks my idle time :P

Code:
 
---------------------
REMOTE:
--------------------

on 1:CONNECT: {
/lagnow
}

on 1:DISCONNECT: {
/lagstop
}


ON ^*:OPEN:?: {
  if ($nick == $me) {
    if (%lagt = $null) return
    var %lag = $calc(($ticks -$2) /1000)
    /set %lags %lag
   haltdef
 }
}

------------------------
ALIAS:
------------------------

/lagtest if ($server = $null) { halt } | .raw -q pong $server $server | .msg $me Lagt $ticks 
/lagnow { .timerlag 0 20 lagtest }
/lagstop { .timerlag off | .timerlags off }

;where 20 is lag check delay
 


so, problem is actually that when i am away
this method breaks my idle time, so every 20 seconds
my time resets smirk
and i wold like this meter to use "native" mirc
ping->pong so it dont break any "natural time"

if you understand :P

any help?
Posted By: SoundreameR

Re: lagchecker - 10/03/06 10:53 AM

Why don't u use CTCP instead of PRIVMSG. crazy For example ctcp LAG which carries $ticks as parameter.
Posted By: raZOR

Re: lagchecker - 10/03/06 11:01 AM

give me example pls?

also, wouldnt sending ctcp's also break idle time function?
Posted By: SoundreameR

Re: lagchecker - 10/03/06 11:04 AM

here it is...
Code:
alias lagcheck {
  if ($server) {
    .!ctcp $me LAG $ticks 
  } 
}
ctcp *:LAG:*:if ($cid == $activecid) { redraw_value $calc(($ticks - $2) / 1000) } | halt
on *:connect:{
  lagcheck
  .timerlag 0 10 lagcheck
}
on *:disconnect:{
  .timerlag off
  init_lag_face
}

But I'm afraid it will also reset idle timer... crazy
Posted By: raZOR

Re: lagchecker - 10/03/06 11:11 AM

well, thats the problem =)

i want to know if there is a way of NOT breaking the
idle time timer.

but thanks for trying to help =)
Posted By: vexed

Re: lagchecker - 10/03/06 12:07 PM

have you tried..

scid $activecid .raw -q ping $ticks
Posted By: raZOR

Re: lagchecker - 10/03/06 02:11 PM

it still resets time smirk
Posted By: genius_at_work

Re: lagchecker - 10/03/06 02:41 PM

Try sending an invalid command to the server.

Seems to me I already posted this one..........

Code:
on *:CONNECT:{ titlebar | $+(.timer.lag.,$cid) 1 10  $!+ $!ticks | $+(timer.lag.,$cid) -e }
on *:DISCONNECT:$+(.timer.lag.,$cid) off
on me:*:NICK:$+(timer.lag.,$cid) 1 10  $!+ $!ticks
raw 421:& *:{ titlebar LAG: $calc(($ticks - $right($2,-1)) / 1000) $+ s | $+(.timer.lag.,$cid) 1 10  $!+ $!ticks | halt }


-genius_at_work
Posted By: vexed

Re: lagchecker - 10/03/06 02:48 PM

Very odd, i use an idle checker and check lag, it doesn't reset my idle time or mess my idle away system up.

and why not use the on ^*:PONG: { event to retrieve the lag time?
Posted By: raZOR

Re: lagchecker - 10/03/06 04:58 PM

yeah, i made it to work =)

(actually someone helped me heheh)

thanks guys for help
© 2021 mIRC Discussion Forums