$acon

By FLCL on Oct 25, 2007

$acon returns a basic $scon for all networks you are connected to. You can either specify a property ($acon(property)). The idea was developed from xDaeMoN's $sc snippet, instead of returning a single network, I just remade the snippet completely and made it grab data from all networks.

Please note. This snippet runs off of the same properties as the $scon identifier. /help $scon to get a better summary, but some of these identifiers can be: server, network, host, ip, away (if away), awaymsg (if away), me (returns your nick), anick (returns alternative nick), cid (returns connection id). Basically, any identifier that is relevant to the server itself.

Updates:
1: /dcon - Displays the actual data instead of returning it. (/dcon (property))
2: Much more explanatory on the properties

/*
$acon by FLCL
Displays status for ALL networks depending on the property you specify. You also have the option to use /dcon to echo the status for all networks based on the property you specify. Syntax: $acon(prop) or /dcon (prop)

Please note. This snippet runs off of the same properties as the $scon identifier. /help $scon to get a better summary, but some of these identifiers can be: server, network, host, ip, away (if away), awaymsg (if away), me (returns your nick), anick (returns alternative nick), cid (returns connection id). Basically, any identifier that is relevant to the server itself.

Updates:
/dcon - decided to use two seperate aliases instead 

Shoutouts:
xDaeMoN - $sc snippet being the base of this snippet. 

This snippet is NOT to be redistributed/edited. 
*/

alias acon { 
  if ($isid) { 
    if ($1) { 
      var %x = 1 
      while ($($+($,scon(%x),.,$1),2)) { 
        var %n = $addtok(%n,$v1,32)
        inc %x
      }
      return %n
    }
  }
}

alias dcon { 
  if ($1) { 
    var %x = 1 
    while ($($+($,scon(%x),.,$1),2)) { 
      var %n = $addtok(%n,- Network $+($($+($,scon(%x),.,network),2),:) $v1,32)
      inc %x
    }
    .echo $colour(info) -a %n
  }
}

Comments

Sign in to comment.
Gummo   -  Oct 26, 2007

Since it\'s your post, FLCL, you can actually copy your last post, post a new post with additions and delete your old post. ;)

 Respond  
FLCL   -  Oct 25, 2007

Sorry for the double post, but /help $scon is also helpful as well.

 Respond  
FLCL   -  Oct 25, 2007

Ah. Sorry about that. The properties are actually what the $scon properties are. Basically, properties of $scon $acon and /dcon can be any identifier, but that identifier has to be relative to the network. For example
$acon(network) would return the networks you are currently on.
$acon(server) returns each server you are on
$acon(away) would return any network that you are away on and display \'$true\'
$acon(awaymsg) if you were away, it would display the away message on the network that you are away on.
etc.

The same applies for /dcon (/dcon network for example)

Hope this helps.

 Respond  
Scakk   -  Oct 25, 2007

Need to mention what the \" property \" are for each.

I figured out the /dcon needed to be either

/dcon $server or /dcon $network ( same result though )

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.