# # Simple /tree command to show what servers/channels you are on. This is more # of an example for scripters to learn off of. Demonstrates how to communicate # data from all of the other server connections to your current server connection. # # Usage: /tree # alias _set { %INFO[$1] = $2-; } alias SendInfo { callInSession($1, "/_set server " . getServerHost()); callInSession($1, "/_set channels " . join(" " , getChannels())); } alias tree { for ($x = 0; $x < getTotalSessions(); $x++) { callInSession($x, "/SendInfo " . getSessionId()); echo("+ " . %INFO["server"]); foreach $temp (split(" ", %INFO["channels"])) { echo("|-- " . $temp); } } }