mIRC Options:
Connect > Options >
Check For Timed Out Connection (this one can be a pain, it may dc you thinking your connection timed out)
Retry Button:
Set settings as you wish.
IRC >
- Rejoin Channels on Connect
Keep Channels Open
With all of these selected it should reconnect you if you are using basic mirc to connect to the server and rooms. Rooms will stay open and you should rejoin the rooms on re-connect.
Sometimes when we have special ways to connect to the server mIRC doesn;t automatically rejoin the rooms well.
On *:Disconnect:{
$chan(0) returns total number of channels. Then a while loop will give you names. $chan(1) etc. So you can store all rooms you were in, reconnect using your reconnect alias, then join those rooms. Here is a sample while loop for this sort of situation. Note, seperate the rooms names with a comma so I can utilize the multi-room join command. /join room1,room2,room3
on *:disconnect:{
var %cx = $chan(0) | while (%cx) {
%channels = $addtok(%channels,$chan(%cx),44)
dec %cx
}
;Command to connect to your server goes here.
;Now you either set the rooms as a global variable and whatever raw or SNOTICE tells you you are connected, or the on *:connect event, is where you /join %channels
;Or you can use a timer but I prefer to be positive Im connected before joining rooms.
;I will use the Connect event. SO I need to set a variable telling the connect event that I just dc'd.
set -u5 %dc $server
}
on *:connect:{
if (%dc == $server) {
join %channels
unset %dc %channels
}
}
This is the basic idea, without testing it on your server and with your connection I cannot be sure. But this is pretty much how you do it manually.
Edited Apr 17, 2008 10:20 PM by Travis