the -o switch is handy as it prevents the timer from dying if you get disconnected. I'd simply perform an if ($server) { } check before sending a /msg.