mIRC Home    About    Download    Register    News    Help

Print Thread
Connections? #127610 15/08/05 06:34 AM
Joined: Aug 2005
Posts: 2
S
StirFried Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
S
Joined: Aug 2005
Posts: 2
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

Re: Connections? #127611 15/08/05 06:43 AM
Joined: Jun 2005
Posts: 30
_
_DuDe_ Offline
Ameglian cow
Offline
Ameglian cow
_
Joined: Jun 2005
Posts: 30
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~

Re: Connections? #127612 15/08/05 08:58 AM
Joined: Aug 2005
Posts: 2
S
StirFried Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
S
Joined: Aug 2005
Posts: 2
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.

Re: Connections? #127613 15/08/05 09:00 AM
Joined: Jun 2005
Posts: 30
_
_DuDe_ Offline
Ameglian cow
Offline
Ameglian cow
_
Joined: Jun 2005
Posts: 30
That really should not happen. Post the Auto-Connect script please.

~mike~

Re: Connections? #127614 15/08/05 01:19 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
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.


Invision Support
#Invision on irc.irchighway.net
Re: Connections? #127615 15/08/05 01:57 PM
Joined: Aug 2005
Posts: 128
S
stefys99 Offline
Vogon poet
Offline
Vogon poet
S
Joined: Aug 2005
Posts: 128
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

Last edited by stefys99; 15/08/05 01:58 PM.
Re: Connections? #127616 15/08/05 08:24 PM
Joined: Dec 2002
Posts: 417
O
Othello Offline
Fjord artisan
Offline
Fjord artisan
O
Joined: Dec 2002
Posts: 417
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

}

--------------------------------------------------------------------------------

Re: Connections? #127617 16/08/05 12:28 AM
Joined: Aug 2005
Posts: 128
S
stefys99 Offline
Vogon poet
Offline
Vogon poet
S
Joined: Aug 2005
Posts: 128
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