mIRC Homepage
Posted By: StirFried Connections?¿ - 15/08/05 06:34 AM
When Connectiong to a new server and joining a new channel. Is there a way of telling if a server is already open?
I have this in my perform but it opens up the networks each time the main network reconnects


/server -m %network1 6667 -j %chan1
Posted By: _DuDe_ Re: Connections?¿ - 15/08/05 06:43 AM
What are you trying to do?

I think this might require variables (or .ini if you got alot of servers & channels)

I think that you might want to have mirc log your connections, and then when you type your /server command you mentioned above, it would check and see if you have joined that server recently buy checking either the .ini file or your variables. I am sorry, but I don't have my mIRC on this computer, and I can't access the computer that has it on there at the moment.

If you really need my help, I could do a real quick download, but I hope I don't need to do that *hints to the people online that have their mIRC to post with any help/info for this dude*

~mike~
Posted By: StirFried Re: Connections?¿ - 15/08/05 08:58 AM
I have my mirc setup to auto join 3 networks on connect.
The problem is if number 1 network reconnects it opens up networks 2 and 3 even though they are all ready up and running.
Posted By: _DuDe_ Re: Connections?¿ - 15/08/05 09:00 AM
That really should not happen. Post the Auto-Connect script please.

~mike~
Posted By: Riamus2 Re: Connections?¿ - 15/08/05 01:19 PM
This is very common.

One way to do the auto-join of various networks without having it connect to the networks again from the Perform section is to use on START.

Code:
on *:start: {
  server irc.server1.net -j #chan,#chan,#chan
  server -m irc.server2.net -j #chan,#chan
  server -m irc.server3.net -j #chan
}


This will join all the networks/channels when you start mIRC and will only run when mIRC is started rather than Performs, which run whenever the server connects. There are other options as well. If you're looking for something different, please let us know.
Posted By: stefys99 Re: Connections?¿ - 15/08/05 01:57 PM
I don't understand very good what u want to say...
Code:
alias isconn {
var %i = 1
while ($scid(%i).server) {
var %a = $ifmatch
if (%a == $1) return 1
inc %i
}
return 0
}

//var %s = irc.undernet.org | if (!$isconn(%s)) server -m %s
Posted By: Othello Re: Connections?¿ - 15/08/05 08:24 PM
Hey StirFried. The code Riamus2 Posted should work for you.
The problem you have is the code you are using in your perform is activated each time mirc connects to the server
triggering the script each time it connects. Try removing the code from perform and edit this code Riamus2 posted and edit to what you need and place it in your remotes.

Code:
--------------------------------------------------------------------------------

on *:start: {
server irc.server1.net -j #chan,#chan,#chan
server -m irc.server2.net -j #chan,#chan
server -m irc.server3.net -j #chan

}

--------------------------------------------------------------------------------
Posted By: stefys99 Re: Connections?¿ - 16/08/05 12:28 AM
Quote:
Is there a way of telling if a server is already open?

I thought he wanted to check if he's already connected to that network, so I gave him an $isconn alias, but looks like I was wrong. That's not what he wanted to do. Sorry. crazy
© mIRC Discussion Forums