####################################################
# by wiebe @ QuakeNet
#
# keeps the partyline / telnet session alive by
# sending a message to the user
# handy in case you are behind a firewall which closes idle connections
# .console +1 to enable it for your user
####################################################

####################################################
# keepalive
####################################################
bind time - "* * * * *" keepalive:time
proc keepalive:time { mi ho da mo ye } {
# the 3 means every 3 minutes
  if {![string equal [expr round(fmod([clock seconds] / 60,3))] 0]} { return 0 }
  putloglev 1 * "PING: .console -1 to disable"
}


set scriptdb(keepalive) {
  "provides bot sided way of keeping the connection on the partyline active, handy for users behind a firewall that closes (inactive) connections. script sends a message to all users with console mode 1 set every 3 minutes."
}

