mIRC Home    About    Download    Register    News    Help

Print Thread
#41305 12/08/03 07:12 PM
Joined: Feb 2003
Posts: 282
S
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Feb 2003
Posts: 282
I need to create a script which checks if the user is connected to the server while being pinged.
(For example, I found a server that pings the user as soon as he tries to connect, even before the server has sent the Network name to the user).

I would like that the script will write the network name.
I used:

//scid 7 scon -at1 echo $!network

(Considering that the cid of the window that I'm working on is 7)



It does echoes the network name, but it write it in all the status windows (For example, if I have 6 status windows, then I will get the network name of the CID 7 in all of them).

I would like that the command will be executed only on CID 7 and only if its connected .

How can I do that?

#41306 12/08/03 07:15 PM
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
//scid 7 if ( $!network ) echo $!network

maybe?


Code:
//if ( khaled isgod ) echo yes | else echo no
#41307 12/08/03 07:17 PM
Joined: Feb 2003
Posts: 282
S
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Feb 2003
Posts: 282
What about
//scid -t1 7 echo $!network

It should work to, I think.

Thanks. I will try your solution.

#41308 12/08/03 07:31 PM
Joined: Feb 2003
Posts: 282
S
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Feb 2003
Posts: 282
If I want to know that a server exists in the server list, I can use: $server(server_name)

How can I find if the Network (Group) exists in the server list?

#41309 12/08/03 07:49 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
$Server(0) Returns the total number of servers in your server list.
$Server(N).desc Returns the description of a server in your list.
$Server(N).group Returns the group of server N.
$Server(N).port Returns the port of server N.
$Server(N).pass Returns the pass of server N (if you entered a password in the field).
From the help file..
If you specify an irc server address and it is in your servers list, it returns its associated info.

#41310 12/08/03 08:14 PM
Joined: Feb 2003
Posts: 282
S
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Feb 2003
Posts: 282
Still you didn't answer my question.

I already know all of what you wrote from the help file.

Is there a way to know if a Network is in the servers list:

For example: The network is Saragani
I don't know which servers belong to Saragani, so I can't use
$server(irc.saragani.net).group cause I don't know irc.saragani.net

#41311 13/08/03 09:15 AM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
$server can't do that (this has been a feature suggestion afair; imo it definitely needs additional functionality), but you can read from the servers.ini file:
Code:
alias isgroup if $read(servers.ini,nw,*GROUP: $+ $1) { return $true } | return $false
Eg. $isgroup($network)


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
#41312 13/08/03 12:34 PM
Joined: Feb 2003
Posts: 282
S
Fjord artisan
OP Offline
Fjord artisan
S
Joined: Feb 2003
Posts: 282
Thanks.


Link Copied to Clipboard