aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xutil/fresh18
1 files changed, 17 insertions, 1 deletions
diff --git a/util/fresh b/util/fresh
index 2cbba81cd..2314796bb 100755
--- a/util/fresh
+++ b/util/fresh
@@ -92,7 +92,23 @@ function process_command($line) {
}
break;
-
+ case 'channel':
+ if(! local_user())
+ echo 'Permission denied.';
+ if(argv(1)) {
+ $r = q("select * from channel where channel_address = '%s' and channel_account_id = %d limit 1",
+ dbesc(argv(1)),
+ intval(get_account_id())
+ );
+ if($r) {
+ change_channel($r[0]['channel_id']);
+ $channel = $a->get_channel();
+ echo 'Logged in as ' . $channel['channel_name'];
+ }
+ else
+ echo 'Channel not found.';
+ }
+ break;
default:
break;