A MUF to set your dump reason randomly from online players
Journal started
Oct 11, 2005
- @program auto-reason
- 1 10000 d
- i
- ( Ah, the excesses we devote our lives to. )
- ( auto-reason by Pandora )
- ( reverse engineered from HereLieMonsters MUCK )
- ( ...because they wouldn't show me their program. )
- ( ...and also because it's fun. )
- ( This code is [cc] by-sa )
- ( It changes the reason for dumping: dumpdeltas_mesg and dumping_mesg,
- to a random online player's random dump line, once every dump interval. )
( using sleep, program stays in memory :( but doesn't have to reload :)
- using queue, program unloads from memory :) but needs to reload :(
- )
( $def use_sleep 1 )
( d -- message|0 )
: get_save
- "savemsg" array_get_proplist
- SORTTYPE_SHUFFLE array_sort 0 array_getitem
;
: main
$ifdef use_sleep
- background begin ( loop forever... )
$endif
- online_array ( replace online ... stuff, if fb<6)
- SORTTYPE_SHUFFLE array_sort
- 0 swap
- foreach swap pop ( dbref )
- get_save dup if swap pop break else pop then
- repeat
dup not if pop
- #0 get_save ( backup save messages... )
- dup not if pop
- "The admins of this muck like, totally suck."
- then
then
"##" "yellow" textattr dup rot swap 3 array_make " " array_join
dup
"dumping_mesg" swap setsysparm
"dumpdeltas_mesg" swap setsysparm
- ( Run with a period of 1 dump interval )
- ( Offset does not matter ^.^ )
- "dump_interval" sysparm atoi
- dup not if pop "Oh noes!" .tell exit then
$ifdef use_sleep
- sleep
- repeat (loop forever...)
$else
$endif
;
.
c
q
@set auto-reason=W
@set auto-reason=A
!@tel auto-reason=$env/null
source
Comment
Index
Previous
(How to handle a sparse distributed class schedule?)
Next
(Up Late Again)
(cc) some rights reserved