Welcome, Guest. Please login or register.
Did you miss your activation email?
February 06, 2012, 06:04:53 am

Login with username, password and session length
Your personal info is always under protection by us, we won't sell/give it away.
Your email and MSN address are protected against SPAM bots.
625 Posts in 87 Topics by 85 Members
Latest Member: SecurityAVZ
Search:     Advanced search
+  Lostmoment
|-+  Lostmoment Services
| |-+  Lostmoment IRC Network
| | |-+  Spiritping
« previous next »
Pages: [1] Go Down Print
Author Topic: Spiritping  (Read 2112 times)
Da-Huntha
Janitor
Administrator
Rank 2/4
*
Offline Offline

Posts: 218


Moo Moo Machine


View Profile WWW
Spiritping
« on: December 17, 2004, 04:31:56 pm »

So, i was bored and made this script...

Its an advanced ping script with the packet idea.
you can sent an ammount of packages to a user and let the script Calculate the average ping time of this users (in seconds, later il make it in Mili Seconds)

I surely will improve it later when i feel like doing so

Here's the script:

Code:
©Lostmoment 2004, http://chat.lostmoment.com
removing this copyright notice is against the Terms Of Agreement.

SpiritPING V1.1

menu nicklist {
  -
  SpiritPING Advanced Ping Script
  .Ping:/pingscript $1
  .Send 3 packets (1 pack per 10 secs):/.notice $1 SpiritPING -> Sending 3 packets with 1 pack per 10 seconds to you to calculate your average ping. | /set %pinger.packet 0 | /set %pinger.packetsent 0 | /echo $active $timestamp 4PACKET -> Sending 3 packets (10sec/pack) to $1 | /pingscript $1 | /.timer 2 10 /pingscript $1 | /.timer 1 25 /pingsum $1
  .Send own given amount of packets:/set %pinger.amount $?="How much packets to send?" | /set %pinger.interval $?="At what interval of seconds you want to send the packets? $crlf $+ NOTE: An amount lower than 10 can cause an PACKET loss $crlf $+ An high amount will give the user more time to reply and will accurate the results more" | /.notice $1 PingScript -> Sending %pinger.amount packets with 1 pack per %pinger.interval seconds to you to calculate your average ping. | /set %pinger.packet 0 | /set %pinger.packetsent 0 | /echo $active $timestamp 4PACKET -> Sending %pinger.amount packets ( $+ %pinger.interval $+ /pack) to $1 | /pingscript $1 | /.timer $calc(%pinger.amount - 1) %pinger.interval /pingscript $1 | /.timer 1 $calc(((%pinger.amount - 1) * %pinger.interval) + 5) /pingsum $1
  -
}

alias pingscript {
  /inc %pinger.packetsent 1
  /echo $active $timestamp 4PING -> sent to $1
  /set %pinger.time $ctime
  /.ctcp $1 PING
}

on *:ctcpreply:PING*:{
  /inc %pinger.packet 1
  /set %pinger.pingtime $ctime
  /echo $active $timestamp 4PONG -> $nick PING time: $calc(%pinger.pingtime - %pinger.time) Seconds 4PACKET: %pinger.packet
  /inc %pinger.sumsec $calc(%pinger.pingtime - %pinger.time)
}

alias pingsum {
  /set %pinger.totsec $calc(%pinger.sumsec / %pinger.packet)
  /echo $active $timestamp 4AVR -> $1 AVERAGE PING time: %pinger.totsec Seconds with %pinger.packetsent PACKETS sent and %pinger.packet PACKETS received (loss of $calc(%pinger.packetsent - %pinger.packet) PACKETS)
  /set %pinger.packet 0
  /set %pinger.packetsent 0
  /set %pinger.sumsec 0
}
« Last Edit: December 18, 2004, 09:33:48 pm by Da-Huntha » Logged

This signature is tasty.
Catclone
I like turtles
Administrator
Rank 2/4
*
Offline Offline

Posts: 173


View Profile
Spiritping
« Reply #1 on: January 28, 2005, 10:03:58 pm »

The comment should have ; infront of them to avoid getting read O_o
And how can a ping script be advanced? ¬_¬ XD
Logged
Da-Huntha
Janitor
Administrator
Rank 2/4
*
Offline Offline

Posts: 218


Moo Moo Machine


View Profile WWW
Spiritping
« Reply #2 on: January 29, 2005, 12:20:28 am »

The script can send serveral PINGs and calculate the average time of it,
also it will always return a time if the user spoofed their ping message, by replacing them.

Thus you can call it more advanced than the normal ping function
Logged

This signature is tasty.
Catclone
I like turtles
Administrator
Rank 2/4
*
Offline Offline

Posts: 173


View Profile
Re: Spiritping
« Reply #3 on: April 15, 2005, 09:48:46 am »

Wee for uselessity  evil
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Valid XHTML 1.0! Valid CSS!
Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Design by 7dana.com