mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2003
Posts: 282
S
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Feb 2003
Posts: 282
I'm working on a script, and in a part of it, I wanna tell mIRC to connect to a server/network. Lets asume that the server is irc.ircchat.net

Asuming I'm already connected to several servers at the same time, and don't want to close any of the connections, I would like to do the following:

1) If I'm not connected to irc.ircchat.net, connect to this server while opening a new window (I belive that /server -m irc.irccaht.net will do the job)

2) if I'm already connected to irc.ircchat.net, mIRC will write, you are already connected to that server

The problem I have is that I can't find out if I'm connected to a server or not.

Also, if I'm already connected, I would like to join some channels (like #chat, and #help). The problem I have is that in a script, I can't tell it in which network to do the join (asuming I'm connected to several networks).

If I wasn't connected to irc.ircchat.net then I could use:
on 1:connect: {
if ($server == irc.ircchat.net) {
join #chat
join #help
}
}


But since I'm already connected to that server, I can't use "On 1:connect"


Also, How can I tell mIRC to close a status window??

Please help.

Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
/help Multi-Server


Code:
//if ( khaled isgod ) echo yes | else echo no
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
Quote:
1) If I'm not connected to irc.ircchat.net, connect to this server while opening a new window (I belive that /server -m irc.irccaht.net will do the job)

2) if I'm already connected to irc.ircchat.net, mIRC will write, you are already connected to that server
Code:
  var %a
  scon -at1 if ( $1 == $!server ) || ( $1 == $!network ) { var $eval(%a = $cid,0) }
  if !%a { server -m $1 }
  else echo -a * You already are connected to $1!
Quote:
Also, How can I tell mIRC to close a status window?
window -c "status window"

Joined: Feb 2003
Posts: 282
S
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Feb 2003
Posts: 282
Nimue, your suggestion works.
I looks at the help which comes with mIRC, but it doesn't explains much about SCON, and I need to understand it better, so I could intergrate it in the script in a better way, and maybe use it with other functions.

Do you know where I can get help or docs about this command?

Joined: Feb 2003
Posts: 282
S
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Feb 2003
Posts: 282
Also, why did you use the $eval??
I don't know what $eval does, and I don't know why something should be evaluated more that once:
$eval(%a,5)

Can someone help me?


Link Copied to Clipboard