mIRC Home    About    Download    Register    News    Help

Print Thread
#101911 02/11/04 10:59 AM
Joined: Jun 2004
Posts: 10
U
Uradox Offline OP
Pikka bird
OP Offline
Pikka bird
U
Joined: Jun 2004
Posts: 10
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

#101912 02/11/04 03:11 PM
Joined: Nov 2004
Posts: 1
X
Mostly harmless
Offline
Mostly harmless
X
Joined: Nov 2004
Posts: 1
Have you tryed:
/server -m <server>

The -m makes it connect to the specified server in a new window

#101913 02/11/04 04:19 PM
Joined: Nov 2004
Posts: 148
D
Vogon poet
Offline
Vogon poet
D
Joined: Nov 2004
Posts: 148
Why won't you configure your mIRC to reconnect on disconnection???

It seems to be the best logical idea, and it works well smile

#101914 03/11/04 09:27 AM
Joined: Jun 2004
Posts: 10
U
Uradox Offline OP
Pikka bird
OP Offline
Pikka bird
U
Joined: Jun 2004
Posts: 10
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.


Link Copied to Clipboard