Guide
Basically put the script somewhere in your path and load it into teknap, I
put a load ~/.TekNap/scripts/relink in my ~/.teknaprc for this,
but your installation might differ slightly, and if you're on Windows you'll
just have to give it a shot.
Edit the script to assign where the relink stats and awol logs are kept, and
possibly alter the timings on the relinks. The variables are documented at
the top of the script. You shouldn't need to go any further than this to
make changes unless you're fixing a bug or adding a new feature. If so,
let me know and I'll incorporate your changes.
If you use the script, do me a favor and let me know!
Feature list
- Relinks a server N minutes after departing, if it doesn't relink it retries twice (17 minutes later each time by default).
- Gives a 20 second warning when a server is about to be relinked, in case it needs to be canceled.
- If server rejoins because of the script or by a manual relink the script removes stale relink attempts..
- Relinks can be canceled at any time, and is also able to cancel a specific server from relinking.
- Keeps track of how many times each server has unlinked. Saves to file, so it's persistent.
- Tracks servers that have been seen, but have not returned. Again, saved to file and is persistent.
- Shows a list of pending server relinks.
Todo
- Unless I think of anything more or get any suggestions I don't plan on adding any new features.
Known Bugs
- God knows what I've buggered up :)
Change Log
- 0.6 to 0.6.1b
- FINALLY got around to putting references on the timers and deleting them when they're stale.
So no more 'out or order' relinkings when a server has unlinked often.
- Sometimes on the 20 second relink timer the $server and timer 20 {$server} were different! Still not
sure why, but this has been worked around.
- 0.5.8b to 0.6
- If the relinker is disabled and a server leaves, it's not accounted for as being AWOL, nor were stats collected. Fixed.
- 0.5.7b to 0.5.8b
- Lowered the time on the whoiscmd from 10 to 3 seconds, 10 was a bit long.
- Fixed a !cancel bug that apparently shows a slight difference in TekNap 1.3 and TekNap 1.4
- 0.5.6b to 0.5.7b
- Fixed a bug with slow or remote servers with msg commands, whoiscmd var delete timeout was too low, changed from 1 to 10 seconds.
- 0.5.5b to 0.5.6b
- Minor bug fix in the Server Link Failed trigger
- 0.5.4b to 0.5.5b
- Fixed a nasty bug where someone could send !cancel $someteknapvariable and it'd msg them with it, creating a security issue.
- Removed a load of evals that weren't necessary
- 0.5.3b to 0.5.4b
- Fixed canceled variable, it wasn't getting reset so if you cancled once it mixed things up later on the delayed relinks
- Added RELINKDELAY timer to make it easier to adjust initial relink delay.
- 0.4.7b to 0.5.3b
- Lots of little bug fixes and additions.
- Server unlink statistics are counted and saved
- Missing servers are kept track of and saved
- Canceling a relink on one server doesn't affect other server relinks
- Initial timer simplified, easier to set first relink time (default 120s)