Sponsored Links


Topic Options
Rate This Topic
#23 - 08/01/06 01:29 AM Connection Keep Alive Open Beta
usrbingeek Administrator Offline
WyldRyde Staff

Registered: 07/31/06
Posts: 438
Loc: Burlington, VT
Originally posted by Helio

note: this code is beta, and, due to the slight increase in load, please do not use this script unless you are having frequent ping timeout problems or reconnect problems. If you experiance any issues with this script, please join #engineering and describe the problem in the channel, or, post a reply with a description.


To install:

1. Go to Tools -> Scripts Editor
2. Click the remotes tab
3. Click File -> New
4. Copy and paste the following script into the window
5. Click File -> Save As -> keepalive.mrc
6. Restart mIRC for the script to take effect
7. Enjoy!!

Edit: added experimental patch to the code to prevent infinite reconnect loops. Reconnect code is commented until this this patch is proven to work

Code:
on *:connect:{ 
  .startyline
}

alias startyline {
  .echo -s starting keep alive
  .hadd -m nets $network $+ $cid 0
  .timer $+ $network $+ $cid -o 0 30 yline
}

alias yline {
  if ($hget(nets,$network $+ $cid) == 1) { 
    .echo -s reconnecting to $server (PING TIMEOUT)
    ;.server $server 
  }
  else { 
    hadd -m nets $network $+ $cid 1
    .quote PING : $+ $ctime 
  }
}

on *:pong:{
  .hadd -m nets $network $+ $cid 0
  .halt
}

Top
Sponsored Links
Sponsored Links
Member
*****

Registered: 27/08/04
Posts: 10136
Loc: Mountain View, CA
Top


Recent Posts
Caps Warning
by tplack
09/04/08 04:51 PM
Thank You Moderators
by UncleJohn
09/03/08 08:36 PM
mIRC on <censored> notice
by Jerry
09/03/08 08:29 PM
Who uses Twitter?
by Jerry
09/03/08 08:26 PM
Happy birthday usrbingeek!
by tplack
09/03/08 08:13 PM
What do you guys think the best IRC client is?
by iPhone
09/03/08 08:05 PM
!add !edIT !del for a mIRC bot
by boredcollegekid
09/02/08 05:14 PM
Using mIRC on multiple networks
by iAlex
09/02/08 01:20 AM
Profile Settings
by usrbingeek
09/01/08 03:15 PM
MyNick
by Jonny
09/01/08 05:49 AM
How do I identify on Rooms app for iPhone?
by techman224
08/31/08 06:26 PM
Automated Ban removal
by iPhone
08/28/08 11:32 PM
Recent Pics
Old school IRC
How to use Google!
TIX
Who's Online
1 Registered (houts), 4 Guests and 4 Spiders online.
Key: Admin, Global Mod, Mod
Top Posters
usrbingeek 438
Kat 235
iPhone 99
Phil 90
Freekie 79
techman224 68
CCMike 66
Justin 61
wirelesspacket 52
tengrrl 51
Terms Of Use
Use of this community signifies your agreement to the Terms Of Service and Conditions of Use.