mIRC Home    About    Download    Register    News    Help

Print Thread
D
Demolution
Demolution
D
Hey guys,

I was wondering if there's a quick and efficient way to retrieve the information without having to wait for the command to be completed.

so if you type !ping address

it'll ping and keep listing the next available output on each line, i'm sure there's a way, at this stage - the way i'm doing this is noobie style, i got it set to a certain timer, once it's finished.

Code:
on *:TEXT:!ping:#:{
  $pingrun($2)
  set %ping.inuse true
}

alias pingrun {
  set %ini ping.txt
  if ( %ping.inuse == true ) {
    msg # Sorry $nick $+ , someone has already requested for ping response.
    halt
  }
  if ( $2- == $null ||  127.0.0.1 isin $2- || localhost isin $2- ) { 
    msg # $nick $+ , please enter ip/hostname.
  }
  else {
    msg # Please wait, Pinging: $1
    run -n ping.bat $1
    timerpingnig 1 12 pingrun2
    timerremoveping 1 15 .remove %ini
    timerpinguse 1 16 unset %ping.inuse
  }
}

alias pingrun2 {
  set %ini ping.txt
  var %x = 1
  while ( %x < $lines(%ini) ) { 
    msg # $read(%ini,%x) $crlf
    inc %x
  }
}

Joined: Oct 2003
Posts: 3,641
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,641
Are you aware that you can control how many times ping.exe pings the remote server? Just set it to ping once, and you'll get your result right away.

D
Demolution
Demolution
D
quite aware of that

however, just prefer to let it go with 5 results... trying to make this script awesome smile

D
Demolution
Demolution
D
hey guys,

just letting you know figured out a quick way of doing this.

it's not what i wanted, however it'll do.

thanks for reading this post.

smile

Joined: Aug 2004
Posts: 7,168
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,168
Kindly relay how you did this, so that others can take advantage of the work that you've already done.

D
Demolution
Demolution
D
using a different ping external command to do quicker


Link Copied to Clipboard