Closed flexd closed 10 years ago
KitnIRC's approach to disconnection is to explicitly not handle reconnection, but instead guarantee that the program exits if it disconnects (assuming you're using the healthcheck plugin). Thus you can have the bot reconnect by using a daemon that restarts processes if they exit, or just run it in a shell loop:
while true; do python yourbot.py; sleep 5; done
The reason for this is that it simplifies the state model significantly - there's zero chance of running into issues where state from the previous connection sticks around, not matching the IRC server's impression of the client on the network.