mIRC Home    About    Download    Register    News    Help

Print Thread
#195831 03/03/08 02:41 PM
Joined: Jun 2004
Posts: 243
G
gomp Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Jun 2004
Posts: 243
Quote:
if ($network == AccessIRC) {
server -m irc.homelien.no
join #br1
join #ddayhome
dal
}


I got it like that.

When ever I connect to AccessIRC, it automatically conneccts to the other servers as well..

Problem is, when I disconnect only from AccessIRC but stay connected in the other servers. And then want to reconnect, then all the servers pop up, even though I am already connected.

So, I am asking for someone who knows how to use a "if not connected" command, so that if I already am on 'irc.homelien.no', it will not connect again, ignoring the bold command there.

I been searching myself silly, so the answer is probably right there infront of my eyes, so I ask for your help. smile

Last edited by gomp; 03/03/08 02:45 PM.

I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
gomp #195838 03/03/08 03:58 PM
Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
If the homealien connection is always your second server connection, you could use something like
Code:
if ($scid(2).network != EFNet) { }

or
Code:
if $scid(2).server != irc.homelien.no) { }

However, the first one does not give you info on whether you're connected or not. The second one using server does not return a value if you're disconnected. So depending on whether you want to check if the server window for the EFNet server exists or if you're connected, use the first or the second one.

Disregarding all this, you could also simply make the server connecting an on START event or just use an alias to connect to the next server (but that's probably not what you want).

5618 #195841 03/03/08 08:12 PM
Joined: Jun 2004
Posts: 243
G
gomp Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Jun 2004
Posts: 243
Hum.. I do not understand.

I'll explain exactly how I use this scripting.

I type /con in a blank mIRC status. Which connect me to accessIRC.. (..and join the channels I got preset.)

Then this code takes action..

Code:
 if ($network == AccessIRC) {
server -m irc.homelien.no   <---here it connect to EfNet..
join #br1
join #ddayhome
dal <---here it connect to DalNEt.. (via the alias below..)
}


This is the alias I got in aliases:
/dal /server -m irc.dal.net

So, by typing /con .. I automatically enter everything. smile

3 servers, and a lot of channels. (Need not include the whole code, it is a mess..)

Anyways.. All I want is for the "if ($network == AccessIRC) {" script, to not trigger, if I am already connected to the other servers..

I am starting to think this is impossible though. But then again, it might just be a simple word I spell wrong, or use wrong, as usual.. laugh

Perhaps you can help me? wink


I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
gomp #195842 03/03/08 08:19 PM
Joined: Jun 2004
Posts: 243
G
gomp Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Jun 2004
Posts: 243
Code:
  if $scid(2).server != irc.homelien.no,irc.dal.net) { 
    if ($network ==  AccessIRC) {
      server -m irc.homelien.no
      join #br1 
      join #ddayhome
      timer 1 10 /windowhide
      timer 1 2 /joinacc
      dal 
    }
  }



I tested that, but that did not alter anything.

Last edited by gomp; 03/03/08 08:21 PM.

I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
gomp #195850 03/03/08 11:45 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Why not just save yourself the trouble and put all servers you want into the on START event?


Invision Support
#Invision on irc.irchighway.net
Riamus2 #195853 04/03/08 12:30 AM
Joined: Jun 2004
Posts: 243
G
gomp Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Jun 2004
Posts: 243
Interesting.. In fear of sounding petty, I do not know how..

Hum.. Mayby using the /con for all servers?

I think I get it..

I'll test it once I am sober. smile Thanks as always! wink


I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
gomp #195854 04/03/08 12:31 AM
Joined: Jun 2004
Posts: 243
G
gomp Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Jun 2004
Posts: 243
I do not get it..


I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
gomp #195867 04/03/08 02:59 AM
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031

He means something like this...

Code:

on *:START: {
  server irc.accessirc.net -jn #br1,#ddayhome
  server -m irc.homelien.no -jn #chan1,#chan2,#chan3
  server -m irc.dal.net -jn #chan1,#chan2,#chan3
}



Replace #chan1 #chan2 #chan3 with whatever you want, or remove them altogether.

/help /server

gomp #195875 04/03/08 09:56 PM
Joined: Aug 2003
Posts: 144
M
Vogon poet
Offline
Vogon poet
M
Joined: Aug 2003
Posts: 144
Humm i am not sure about your question.

But for what i could figured out you are traying to reconnect to a server when you have been disconnected and joines the proper channel etc etc etc.

Why you don´t use the options that mirc have already.

Alt + o --> Connect --> Options --> "Reconnect on disconnection"
Note:. Don´t forget to enable the connect retry out too

Them to join the channel you can use the "Channel list" icon the icon that you have on mirc.

With that you can choose to coonnect automatcaly when join a network ( choosed by you ).

Hope this can help.
If this was not what you ask for it, sorry...

good luck

Miguel_A #196098 09/03/08 02:37 PM
Joined: Jun 2004
Posts: 243
G
gomp Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Jun 2004
Posts: 243
Originally Posted By: Miguel_A
Humm i am not sure about your question.

But for what i could figured out you are traying to reconnect to a server when you have been disconnected and joines the proper channel etc etc etc.

Why you don´t use the options that mirc have already.

Alt + o --> Connect --> Options --> "Reconnect on disconnection"
Note:. Don´t forget to enable the connect retry out too

Them to join the channel you can use the "Channel list" icon the icon that you have on mirc.

With that you can choose to coonnect automatcaly when join a network ( choosed by you ).

Hope this can help.
If this was not what you ask for it, sorry...

good luck


Not what I asked for at all. But, no need to be sorry for that! At least you wanted to help. smile


I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
RoCk #196099 09/03/08 02:38 PM
Joined: Jun 2004
Posts: 243
G
gomp Offline OP
Fjord artisan
OP Offline
Fjord artisan
G
Joined: Jun 2004
Posts: 243
Originally Posted By: RoCk

He means something like this...

Code:

on *:START: {
  server irc.accessirc.net -jn #br1,#ddayhome
  server -m irc.homelien.no -jn #chan1,#chan2,#chan3
  server -m irc.dal.net -jn #chan1,#chan2,#chan3
}



Replace #chan1 #chan2 #chan3 with whatever you want, or remove them altogether.

/help /server


HEhe.. It makes perfect sense now when I read what he said..

I am not familiar with the terminology used when scripting yet. But, I should have been able to grasp that one.

Thanks a lot! That is just what I need! smile

BTW: What does the n do? Would it be OK to just use:

server -m irc.dal.net -j #chan1,#chan2,#chan3

Instead of:

server -m irc.dal.net -jn #chan1,#chan2,#chan3

?

smile

Last edited by gomp; 09/03/08 02:42 PM.

I do not speak English. I speak Norwegian. So please bear with my poor English spelling and grammar.
gomp #196101 09/03/08 03:12 PM
Joined: Jun 2007
Posts: 933
5
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
I'm not sure, but if you look at /help /join it would suggest the -n switch in that part of the /server command minimizes the channels after joining them.


Link Copied to Clipboard