mIRC Home    About    Download    Register    News    Help

Topic Options
#86146 - 09/06/04 07:54 PM identifyer for a server already connected
PHM Offline
Pikka bird

Registered: 31/05/04
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?

Top
#86147 - 09/06/04 08:02 PM Re: identifyer for a server already connected
xxxYODAxxx Offline
Vogon poet

Registered: 29/03/04
Posts: 108
Loc: PA, USA
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:

Top
#86148 - 09/06/04 08:09 PM Re: identifyer for a server already connected
PHM Offline
Pikka bird

Registered: 31/05/04
Posts: 11
that worked thanks smile
took me a bit to understand but i got it smile


Edited by PHM (09/06/04 08:27 PM)

Top
#86149 - 09/06/04 08:34 PM Re: identifyer for a server already connected
qwerty Offline
Hoopy frood

Registered: 07/01/03
Posts: 2523
$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

Top
#86150 - 10/06/04 07:47 AM Re: identifyer for a server already connected
Nobodi Offline
Vogon poet

Registered: 10/12/02
Posts: 191
Loc: Australia
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.




Top
#86151 - 10/06/04 10:13 AM Re: identifyer for a server already connected
qwerty Offline
Hoopy frood

Registered: 07/01/03
Posts: 2523
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

Top
#86152 - 18/06/04 08:20 PM Re: identifyer for a server already connected
tsoglanos Offline
Vogon poet

Registered: 30/03/04
Posts: 130
Loc: Greece
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
}

_________________________
http://Ircp.tripod.com

Top