########################################
## Penthux Anti-Ping Timeout TCL v1.1 ##
##         by Phil (Penthux)          ##
##         admin@penthux.net          ##
##           2nd June 2004            ##
##                                    ##
## The Anti-Ping Timeout function     ##
## ensures you never miss a pong. It  ## 
## pings the server, instead of a     ##
## user/bot/yourself with a raw cmd.  ##
########################################

;alias to turn ping on/off
alias ping.status {
  set %ping.status $iif(%ping.status,0,1)
}

;channel popup menu
menu channel,status {
  -
  Anti Ping Timeout
  .$iif(%ping.status,$style(1)) &Attiva:ping.status
}  
## Set the pingtimer to the duration (in minutes) you desire ##

set pingtimer 12

## No don't need to modify anything else below, ##
## unless you want to... feel free!             ##

if {(ping.status == 1 )}
if {![info exists pingtimer]} {set pingtimer 12}
if {[info exists pingtimer]} {timer $pingtimer pingserver}

proc pingserver {} {
  	global botnick server pingtimer
  	putquick "PRIVMSG $botnick :RAW -q PING $server"
  	timer $pingtimer pingserver
}

putlog "Anti-Ping Timeout TCL by Penthux.net - Loaded!"

#
#
