@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 inline ! inline @ "" instr if inline @ "
" explode count2 ! 1 index ! begin index @ count2 @ <= while inline ! fst3k @ #-1 " " strcat inline @ strcat notify_except index @ 1 + index ! repeat else fst3k @ #-1 " " strcat inline @ strcat notify_except then then TRIGGER @ count @ nextprop count ! repeat ; : get-next-line ( increment log line count ) loglib @ log-prop getpropval count ! count @ 1 + count ! ; : addline ( add new line to the log with ownership data ) get-next-line loglib @ log-propdir count @ intostr strcat ME @ int intostr "||" strcat inline @ strcat setprop loglib @ log-prop count @ setprop fst3k-notify ; : main inline ! ( grab the data to record ) ME @ prog dbcmp if exit then ( ignore any self-generated messages ) get-logname TRIGGER @ room? if ( this will only run from a room ) get-log-library TRIGGER @ "recording" getpropstr "yes" strcmp not if ( should we be recording? ) 0 count ! TRIGGER @ contents test ! ( make sure there are actual awake players ) begin test @ #-1 dbcmp not while test @ player? if test @ awake? count @ + count ! then test @ next test ! repeat count @ 0 = not if ( check for messages we want to ignore ) inline @ string? if inline @ strlen 0 > if inline @ "*has {arrived\.|left\.|connected\.|disconnected\.}" smatch inline @ "*goes home\." smatch or inline @ "*ooc[^h]*" smatch or not if ( ignore 'ooc' messages ) addline then then then else ( nobody's here, better stop recording! ) "" strcat inline ! ( stop message ) get-next-line loglib @ log-propdir count @ intostr strcat inline @ setprop loglib @ log-prop count @ setprop fst3k-notify loglib @ log-prop "/status" strcat "archive" setprop ( turn off all the recording and notification, deinstall listener ) TRIGGER @ "recording" "no" setprop TRIGGER @ "_arrive/cambot" remove_prop TRIGGER @ "_connect/cambot" remove_prop TRIGGER @ "_listen/cambot" remove_prop then then then ; . c q @set room_recorder.muf=L