@prog untamo.muf 1 999 d 1 i : setd prog "d" set ; : unsetd prog "!d" set ; : max over over < if swap then pop ; : dontboot? prog "_dontboot" prop-exists? ; : maybetell (tellcon bootcon -- ) over condbref dup if dup wizard? swap dup "o" flag? swap "f" flag? or and then not if pop pop exit then dup condbref dup if name " (on %d from %h)" strcat else pop "An unconnected descriptor (%d from %h)" then over intostr "%d" subst over conhost "%h" subst swap pop " is being booted for idling." strcat dontboot? if " [not really]" strcat then connotify ; : bootit connections 1 + 2 -1 for pick maybetell loop dontboot? if pop else dup "Booted due to idle time" connotify conboot then ; : boot-idlers connections prog "conidle" getpropstr atoi 60 max prog "unconidle" getpropstr atoi 30 max rot 1 -1 for pop rot ( conidle unconidle con ) dup condbref dup if ( conidle unconidle con dbref ) over conidle swap ( conidle unconidle con idle dbref ) wizard? if pop else 4 pick >= if dup bootit then then else ( conidle unconidle con #-1 ) pop dup contime 3 pick >= if dup bootit then then pop ( conidle unconidle ) loop pop pop ; : main 1 sleep fork dup if "Daemon is #" swap intostr strcat "." strcat me @ swap (setd) notify else do boot-idlers prog "delay" getpropstr atoi 60 max sleep loop then ; . c q