mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2005
Posts: 8
W
wboss Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
W
Joined: Apr 2005
Posts: 8
if you disconnect from a server. you can't get the network name by $scon(N).network. so it would be usefull to mark a connection id.
with any text you choose by /scon -m N text and getting it by $scon(N).mark. like you can with /sockmark

Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
I like this idea. smile

You could do something along the lines of..

Code:
alias getserver {
  scon -at2 echo -s $!+($scon($cid),$chr(58)) $!gettok($gettok($window(Status Window).title,1-,41),2,44)
}


You should aim to get it a little more accurate than what I did. smile

If on your status bar it looks something like..

not connected (YourNick, the.server.name)

It'd grab 'the.server.name'.

Joined: Apr 2005
Posts: 8
W
wboss Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
W
Joined: Apr 2005
Posts: 8
Quote:
I like this idea. smile

You could do something along the lines of..

Code:
alias getserver {
  scon -at2 echo -s $!+($scon($cid),$chr(58)) $!gettok($gettok($window(Status Window).title,1-,41),2,44)
}


You should aim to get it a little more accurate than what I did. smile

If on your status bar it looks something like..

not connected (YourNick, the.server.name)

It'd grab 'the.server.name'.


that dont work.

Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Quote:
if you disconnect from a server. you can't get the network name by $scon(N).network.


Eh? Works fine here, I get $scon($cid).network just fine for disconnected servers.

If you don't get a value back, it might be because $network was never filled in the first place (that happens on servers that are not part of a network etc.)

Nevertheless, this suggestion could be useful.


Gone.
Joined: Apr 2005
Posts: 8
W
wboss Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
W
Joined: Apr 2005
Posts: 8
yes it works. if you connected to the server then disconnect. but its not when you are trying to connect for the first time. thats why $scon(N).mark would be a good idea.

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
but then .mark would have anything in it either since you havent yet connected to the network and loaded any value into it.


Link Copied to Clipboard