fresh: provide ability to change channels
This commit is contained in:
parent
99ff0f51a8
commit
c0c5252b57
18
util/fresh
18
util/fresh
@ -92,7 +92,23 @@ function process_command($line) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
break;
|
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:
|
default:
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user