You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
syndicate_actor_tox/tox.config-example.pr

60 lines
1.6 KiB

<require-service <daemon tox_bot>>
<daemon tox_bot {
argv: [
"/home/repo/syndicate/syndicate_actor_tox/syndicate_actor_tox"
"--save-file:/home/emery/lib/syndicate/tox.save"
"--local-discovery:true"
]
protocol: text/syndicate
clearEnv: #t
}>
<require-service <daemon tox_eris_ingester>>
<daemon tox_eris_ingester {
argv: [ "/home/repo/syndicate/syndicate_actor_tox/tox_eris_ingester" ]
protocol: text/syndicate
clearEnv: #t
}>
; wait for the tox_bot to come up and announce itself
? <service-object <daemon tox_bot> ?tox> [
$tox <bootstrap "6EF679EBD205E8DF9B6975D21CD157D046287700CADDF86F94B7ED243DC26A30" "192.168.144.1" 33445>
; wait for the core capability to be announced
$tox ? <tox ?pk ?core> $core [
; log the address of the core
? <address ?addr> $log ! <log "-" { line: ["tox address" $addr] }>
; notify on friend request
? <request ?pk ?msg> [
; auto-accept
<accept $pk>
]
; wait for capability to a friend
? <friend ?pk ?friend> $friend [
; get the friend name
? <name ?name> [
; get the status message
? <status-message ?msg> [ $log ! <log "-" { line: [$name $msg]}> ]
?? <msg ?body ?kind> [
$log ! <log "-" { line: [$name $kind $body]}>
]
]
? <transfer ?kind ?size ?filename ?transfer> [
$log ! <log "-" { line: [$kind $size $filename $transfer]}>
$config ? <service-object <daemon tox_eris_ingester> ?ingester> [
$log ! <log "-" { line: ["ingester is up at " $ingester] }>
$ingester <transfer $kind $size $filename $transfer>
]
]
]
]
]