diff options
author | friendica <info@friendica.com> | 2013-01-12 15:55:37 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-01-12 15:55:37 -0800 |
commit | f24ce356039e9988b25a7fa6b1e74a3ad880745a (patch) | |
tree | af561fca5ccc9198310016c7b712734b2e44ad9c /util | |
parent | 5cb970963b4c5c9d7c8169451470072e0d149f93 (diff) | |
download | volse-hubzilla-f24ce356039e9988b25a7fa6b1e74a3ad880745a.tar.gz volse-hubzilla-f24ce356039e9988b25a7fa6b1e74a3ad880745a.tar.bz2 volse-hubzilla-f24ce356039e9988b25a7fa6b1e74a3ad880745a.zip |
implement "finger" command
Diffstat (limited to 'util')
-rwxr-xr-x | util/fresh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/util/fresh b/util/fresh index 450d17464..3e9b55ae1 100755 --- a/util/fresh +++ b/util/fresh @@ -4,6 +4,7 @@ // Red cli interpreter require_once('include/cli_startup.php'); +require_once('include/zot.php'); cli_startup(); @@ -42,14 +43,38 @@ fresh_main($argc,$argv); function process_command($line) { + $a = get_app(); + // split args + $a->cmd = $line; + $a->argv = explode(' ',$line); + $a->argc = count($a->argv); + + $authenticated = false; + $channel = null; + if($line == 'version') { echo 'Fresh version 0.1'; return; } + switch(argv(0)) { + case 'finger': + if(argv(1)) { + $x = zot_finger(argv(1),$channel); + if($x['success']) + print_r(json_decode($x['body'],true)); + } + break; + + + + + default: + break; + } } |