mIRC Homepage
Posted By: Uradox Multi Server problems - 02/11/04 10:59 AM
I made a bot for myself a while ago and recently expanded it to support multiservers.
But im having bad problems with disconnections and servers trying to connect in the wrong windows once disconnected etc... so i decided to write a disconnection handler to attempt to fix this problem. However it also doesnt work because i use $cid to tell which serrver window should connect. Once disconnected i guess the window doesnt have a $cid value cause it returns localhost to my script instead of the number..
Reconnection on disconnection isnt an option for this its the [censored] that first caused the problem

Startup script:
Code:
 
on 1:START:/server localhost 5050 | /server -m irc.iinet.net.au | /server -m localhost 4000
 

So you can see its very simple it creates 2 new windows...
In mirc theres a setting for preform on connect so it sets the varaibles below here %lcd %vng etc... using the $cid it obtains once connected.
Now the disconnection handler is as follows:
Code:
on 1:DISCONNECT:/checkservers

alias checkservers {
  set %servername $server
  if (%servername == server.name.here) {
    scid %lcd /server localhost 5050 
  }
  if (%servername == iinet.wa.au.austnet.org) {
    scid %cidv /server irc.iinet.net.au
  }
  if (%servername == server3.name.here) {
    scid %vng /server localhost 4000
  }
  :end
}
  


Is there a workaround for my problem?
Thanks
Posted By: xoxb10_h4z4rdxox Re: Multi Server problems - 02/11/04 03:11 PM
Have you tryed:
/server -m <server>

The -m makes it connect to the specified server in a new window
Posted By: Dr_Brom_sung_ Re: Multi Server problems - 02/11/04 04:19 PM
Why won't you configure your mIRC to reconnect on disconnection???

It seems to be the best logical idea, and it works well smile
Posted By: Uradox Re: Multi Server problems - 03/11/04 09:27 AM
the -m stuff could result in an awful llot of windows open over a period of a few days,
THe mirc reconnect seems to have some sort of bug. Sometimes the first window ends up trying to reconnect to the server the third window is. Happens kinda randonly and usaly after a while.
© mIRC Discussion Forums