Scon: Difference between revisions
need to go away, continue later on |
No edit summary |
||
Line 1: | Line 1: | ||
Changes the active connection for a script to connection id N, where N is the Nth connection. | Changes the active connection for a script to connection id N, where N is the Nth connection. | ||
/scon <-rsatM | N> [command] | /scon <-rsatM | N> [command] | ||
Line 18: | Line 16: | ||
| a || performs the command on all connection ids. | | a || performs the command on all connection ids. | ||
|- | |- | ||
| tM || limits the command to being performed only on servers with a certain connection status, where M is an or'd value of 1 = server connected, 2 = not connected, 4 = connecting, 8 = not connecting.The command is only performed if M matches the connect status of the connection id. | | tM || limits the command to being performed only on servers with a certain connection status, where M is an or'd value of 1 = server connected, 2 = not connected, 4 = connecting, 8 = not connecting. The command is only performed if M matches the connect status of the connection id. | ||
|- | |- | ||
| s || makes any called commands or identifiers show their results. | | s || makes any called commands or identifiers show their results. | ||
Line 27: | Line 25: | ||
'''Note''' that if you use a command that contains $identifiers, and you want the identifiers to be evaluated in the target connection, you must pass them as $!identifier to prevent them from being evaluated first in the current connection. | '''Note''' that if you use a command that contains $identifiers, and you want the identifiers to be evaluated in the target connection, you must pass them as $!identifier to prevent them from being evaluated first in the current connection. | ||
== Example == | |||
scon 1 [[echo]] -s My nick is $!me | |||
This would echo your nick from the connection 1 in the status window of connection 1. | |||
scon 1 echo -s My nick is $me | |||
This example would echo the nick of the currently active connection in the status window of connection 1. | |||
scon -a echo -a This is $!network | |||
This would echo all your networks in your active window. | |||
[[Category:Multi-server]] |
Latest revision as of 16:52, 17 December 2005
Changes the active connection for a script to connection id N, where N is the Nth connection.
/scon <-rsatM | N> [command]
Note that all commands after the /scon command will be performed on the new connection id.
Explanation of the switches (-a and -tM can only be used if you specify a command):
Switch | Meaning |
r | resets the connection id to the original id for that script. |
a | performs the command on all connection ids. |
tM | limits the command to being performed only on servers with a certain connection status, where M is an or'd value of 1 = server connected, 2 = not connected, 4 = connecting, 8 = not connecting. The command is only performed if M matches the connect status of the connection id. |
s | makes any called commands or identifiers show their results. |
Note that if you use a command that contains $identifiers, and you want the identifiers to be evaluated in the target connection, you must pass them as $!identifier to prevent them from being evaluated first in the current connection.
Example
scon 1 echo -s My nick is $!me
This would echo your nick from the connection 1 in the status window of connection 1.
scon 1 echo -s My nick is $me
This example would echo the nick of the currently active connection in the status window of connection 1.
scon -a echo -a This is $!network
This would echo all your networks in your active window.