@edit room_recorder.muf
1 99999 d
1 i
( Room_recorder.muf 04/01/01 by BoingDragon
part of the cambot system, only to be set by cambot_action.muf
This is the listener for the log recording and fst3k broadcast
system. It is set on the room's _listen/cambot property when
'startlog' is initiated and removed with 'stoplog'.
If it detects an event when nobody is awake in the room, it will
generate an autostop entry in the active log and remove itself
and other related notification and status settings from the room.
)
( local variables to use because I hate using the stack )
lvar inline
lvar test
lvar count
lvar count2
lvar index
lvar logname
lvar loglib
lvar fst3k
lvar channel
: get-logname ( load the name of the current log )
TRIGGER @ "logname" getpropstr logname !
;
: log-prop ( build full property name for log )
"logs/" logname @ strcat
;
: log-propdir ( build full propdir name for log )
log-prop "/" strcat
;
: get-log-library ( get the dbref for the log library object )
TRIGGER @ "library" envprop swap #-1 dbcmp not if loglib ! then ( check for library property )
loglib @ string? if
loglib @ strlen if
loglib @ atoi dbref loglib ! ( use library prop if valid dbref )
else
TRIGGER @ loglib ! ( else use current room )
then
else
TRIGGER @ loglib ! ( use current room if no library set )
then
;
: fst3k-notify ( echo messages to any FST3K rooms that are tuned to this log )
TRIGGER @ "fst3k/" nextprop count !
begin
count @ strlen 0 > while ( cycle through all fst3k room references )
TRIGGER @ count @ getpropstr dup strlen if
atoi dbref fst3k !
fst3k @ "ch" getpropstr channel !
inline @
"
" "
" subst
"I>" "i>" subst
"B>" "b>" subst
"U>" "u>" subst
"/" "" subst
"*" "" subst
"_" "" subst
"/" "" subst
"*" "" subst
"_" "" subst
"[ " "" subst
" ]" "
" subst
inline !
inline @ "