mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2004
Posts: 11
P
PHM Offline OP
Pikka bird
OP Offline
Pikka bird
P
Joined: May 2004
Posts: 11
im trying to make a sniplet for somtehing like

if ($network isconnected ) { halt }

i want it to stop trying to connect to the server if its already connected
any ideas?

Joined: Mar 2004
Posts: 108
X
Vogon poet
Offline
Vogon poet
X
Joined: Mar 2004
Posts: 108
if ($network != $null)

i dont see the purpose, but i dont see any code either, hehe.. that what your looking for?

-cheers


sometimes these are as bad as quit messages :tongue:
Joined: May 2004
Posts: 11
P
PHM Offline OP
Pikka bird
OP Offline
Pikka bird
P
Joined: May 2004
Posts: 11
that worked thanks smile
took me a bit to understand but i got it smile

Last edited by PHM; 09/06/04 07:27 PM.
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
$network is not suitable for this purpose. If you add a server in Servers list and you're offline, $network returns the name for the network you specified there. Use $server instead: it returns the server name if you're connected, otherwise $null.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Dec 2002
Posts: 191
N
Vogon poet
Offline
Vogon poet
N
Joined: Dec 2002
Posts: 191
Whats wrong with $status ?

Quote:

$status
Returns server connection status.

Note: This returns closing during the on DISCONNECT event if the status window being closed is the cause of the disconnection.




Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Nothing's wrong with it, I just prefer $server because you can do
if ($server)
while with $status you must do
if ($status == connected)
which is lengthier.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Mar 2004
Posts: 130
T
Vogon poet
Offline
Vogon poet
T
Joined: Mar 2004
Posts: 130
just use the on connect event

3 explains see below

1 of 3
;just on connect perform a command ...
;perform command on specify network

on 1:CONNECT:if ($network == GRNet) { timerconnect off }

the same can be done with a server.

on 1:CONNECT:if ($server == darkness.irc.gr) { timerconnect off }

2 of 3
now the same with multi networks ~,or servers

on 1:CONNECT:{
var %s = server1 server2 server3 server4
if ($istok(%s,$server,32)) Command
}
the same now with networks

on 1:CONNECT:{
var %n = GRNet DALnet somnet
if ($istok(%n,$network,32)) Command
}



Link Copied to Clipboard