It all depends on what types you are indeed getting disconnected with if its being klined then you can have a ON NOTICE event pop in and if text is in then perform /timer 0 10 /connect where it tries to connect every 10 seconds to server until you stop the timer which...
ON *:CONNECT:timers off
just for example and as far as the mIRC internal tries you can edit those for a larger amount.