Lag

By owl on Mar 06, 2010

Type /lag in any chan and it will message the chan your lag to the server.

alias lag {
  .raw PING $ticks
  .enable #pong
}
#pong off
on *:PONG:{ 
  msg $active My lag is currently $calc($ticks - $2) $+ ms
  .disable #pong
}
#pong end

Comments

Sign in to comment.
TheNitelyfe   -  Mar 11, 2010

No it isn't a coincidence. Using /echo -a does that.

hi 16 ms hi2 15 ms

More
 Respond  
owl   -  Mar 11, 2010

probably not noticeably :(

I was curious and..

hi 15 ms hi2 16 ms

coincidence? :]

More
 Respond  
TheNitelyfe   -  Mar 10, 2010

napa, I tend to not use pipes as this slows down scripts, probably not noticeably but it has to split up the line then read it, I made this script to work as fast as it could. This is something people tend to get confused about. That is only true in large snippets, not something as little as 176 bytes (napa's example with pipes). For example: load these two scripts.

alias e.me {
  var %x $ticks
  echo -a hi
  echo -a $right($calc(($ticks - %x) / 1000),2) ms
}
alias e.me2 { var %x $ticks | echo -a hi2 | echo -a $right($calc(($ticks - %x) / 1000),2) ms }

output:

hi
15 ms
hi2
15 ms

As you can see, they're both going to out put 15 ms, and this is only because /echo -a tends to slow down things. Now I'm not encouraging you to use pipes, by all means avoid them (since it's a good scripting technique anyway), but they're frowned upon MAINLY because they make your scripts look like a mess, they only slow down your script if it's a large one with a lot of pipes.

More
 Respond  
GuitarMasterx7   -  Mar 08, 2010

check out my win

(16:53:20) <@Kindfer> My lag is currently 70230.851 Sec's

More
 Respond  
Jethro   -  Mar 08, 2010

Oh yeah I must've been spaced out for a sec that I overlooked the alias...and no I ain't got no lag...:P But I do often type in the wrong channel, and people were like, wot? lol

More
 Respond  
napa182   -  Mar 08, 2010

lol jethro_ you sure would have to switch channels fast after you typed /lag unless you really lag bad

More
 Respond  
SnoooP   -  Mar 08, 2010

as I said above, wouldn't using echo just be easier?

More
 Respond  
Jethro   -  Mar 08, 2010

I think the $active identifier may return other window names... if the client running the code is not looking at the active channel when the message is transmitted. Using $chan is more fitting...

More
 Respond  
napa182   -  Mar 08, 2010

eh w/e

alias lag { 
  .raw PING $ticks 
  .enable #pong 
}
#pong off
on *:PONG:{
  haltdef 
  msg $active My lag is currently $calc(($ticks - $2) / 1000) Sec's 
  .disable #pong 
}
#pong end
More
 Respond  
owl   -  Mar 08, 2010

Ok Sunslayer

napa, I tend to not use pipes as this slows down scripts, probably not noticeably but it has to split up the line then read it, I made this script to work as fast as it could.

More
 Respond  
sunslayer   -  Mar 08, 2010

use msg # instead of say when creating a snippet

More
 Respond  
napa182   -  Mar 08, 2010
 alias lag { .raw PING $ticks | .enable #pong }
#pong off
on *:PONG:{ haltdef | msg $active My lag is currently $calc(($ticks - $2) / 1000) Sec's | .disable #pong }
#pong end
More
 Respond  
SnoooP   -  Mar 08, 2010

easy, use: /echo -a ....instead of say. say wont work in the status, echo will.

More
 Respond  
GuitarMasterx7   -  Mar 08, 2010

hm...doesn't work

  • PONG from lunar.nl.eu.SwiftIRC.net:

  • You are not on a channel (line 7, TEST)
More
 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.