84 1431 0 4 2 70 37 39 #0 The System Object 24 2 -1 -1 -1 1 -1 5 6 do_login_command 2 173 -1 server_started 2 173 -1 core_objects 2 173 -1 init_for_core 2 165 -1 user_created user_connected 2 165 -1 user_disconnected user_client_disconnected 2 165 -1 103 builder login last_huh guest_log last_restart_time biglist big_mail_recipient limbo registration_db new_player_log verb_help core_help prog_help wiz_help shutdown_task wiz_utils site_db math_utils set_utils builtin_function_help new_prog_log generic_help guest spell seq_utils quota_log you max_seconds max_ticks hacker generic_db shutdown_message shutdown_time no_one player_db class_registry player_class gender_utils trig_utils time_utils editor_help mail_recipient mail_agent mail_editor note_editor verb_editor generic_editor match_utils object_utils lock_utils gripe_recipients letter dump_interval list_utils command_utils player wiz prog code_utils help nothing failed_match ambiguous_match perm_utils building_utils string_utils news note container thing exit room player_start root_class recycler garbage mail_options edit_options display_options generic_options maxint minint error newt_log toad_log site_log housekeeper network generic_biglist_home feature local gopher nntp prog_options build_options mail_name_db generic_utils quota_utils paranoid_db no_connect_message sysobj byte_quota_utils object_quota_utils 107 1 4 2 5 1 10 2 1 1 12 2 1 1 13 2 1 0 781044941 2 5 1 14 2 5 1 15 2 5 1 16 2 5 1 17 2 5 1 18 2 5 1 19 2 5 1 22 2 5 1 23 2 5 1 24 2 5 3 0 2 5 1 25 2 5 1 26 2 5 1 27 2 5 1 28 2 5 1 29 2 5 1 30 2 5 1 31 2 5 1 32 2 1 1 33 2 5 1 34 2 5 1 35 2 5 1 36 37 1 0 5 2 5 0 30000 2 5 1 37 2 5 1 38 2 5 2 Wizard (#2): THIS TIME FOR SURE 2 5 0 780274958 2 5 1 39 2 1 1 40 2 1 4 2 4 3 2 generics 2 Generic objects intended for use as the parents of new objects 4 13 1 3 1 7 1 5 1 9 1 54 1 8 1 1 1 6 1 58 1 57 1 50 1 45 1 46 4 3 2 utilities 2 Objects holding useful general-purpose verbs 4 12 1 20 1 41 1 27 1 43 1 51 1 52 1 53 1 55 1 56 1 59 1 42 1 21 2 5 1 6 2 5 1 41 2 1 1 27 2 5 1 43 2 5 1 44 2 5 1 45 2 5 1 46 2 5 1 47 2 5 1 48 2 5 1 49 2 5 1 50 2 5 1 51 2 5 1 52 2 5 1 53 2 5 4 1 1 2 2 5 1 54 2 5 0 3600 2 5 1 55 2 5 1 56 2 5 1 6 2 5 1 57 2 5 1 58 2 5 1 59 2 5 1 60 2 5 1 -1 2 5 1 -3 2 5 1 -2 2 5 1 42 2 5 1 21 2 5 1 20 2 5 1 61 2 5 1 9 2 5 1 8 2 5 1 5 2 5 1 7 2 5 1 3 2 5 1 11 2 5 1 1 2 5 1 62 2 5 1 63 2 5 1 64 2 5 1 65 2 5 1 66 2 5 1 67 2 5 0 2147483647 2 5 0 -2147483648 2 5 1 68 2 5 1 69 2 5 1 69 2 5 1 69 2 5 1 70 2 5 1 71 2 5 1 72 2 1 1 73 2 5 1 -1 2 5 1 74 2 1 1 75 2 5 1 76 2 5 1 77 2 5 1 78 2 5 1 79 2 5 1 83 2 5 1 82 2 1 0 0 2 5 1 0 2 1 1 80 2 5 1 83 2 5 5 2 4 4 3 2 The 2 Known 2 Universe 2 5 2 The known universe. 2 5 4 2 0 7435 0 780209007 37 1 #1 Root Class 152 2 -1 -1 -1 -1 3 -1 38 initialize 2 165 -1 recycle 2 165 -1 set_name 2 165 -1 title 2 173 -1 titlec 2 173 -1 set_aliases 2 165 -1 match 2 173 -1 match_object 2 173 -1 set_description 2 173 -1 description 2 173 -1 look_self 2 173 -1 examine(really_old) 2 37 -1 notify 2 173 -1 tell 2 173 -1 tell_lines 2 173 -1 accept 2 173 -1 moveto 2 165 -1 eject eject_nice eject_basic 2 165 -1 is_unlocked_for 2 173 -1 huh 2 173 -1 set_message 2 165 -1 do_examine 2 165 -1 examine_key 2 173 -1 examine_names 2 173 -1 examine_desc 2 173 -1 examine_contents 2 165 -1 examine_verbs 2 165 -1 get_message 2 165 -1 room_announce*_all_but 2 165 -1 init_for_core 2 173 -1 contents 37 173 -1 examine_verb_ok 2 165 -1 is_listening 2 173 -1 hidden_verbs 2 165 -1 examine_owner 2 173 -1 announce*_all_but 2 173 -1 tell_lines_suspended 2 173 -1 acceptable 2 173 -1 4 key aliases description object_size 4 0 0 2 4 4 0 2 5 2 2 5 4 2 0 16931 0 780209008 37 1 #2 Wizard 7 2 11 -1 -1 57 -1 -1 0 0 73 2 2 5 2 %n @newts %d (%[#d]) 2 5 1 -1 2 5 2 %d is now a programmer. 2 5 2 You are now a programmer. 2 5 2 Have a nice life... 2 5 2 %n @toads %d (%[#d]) 2 5 1 -1 2 4 4 0 37 1 0 0 2 5 2 2 5 4 0 2 5 4 0 2 5 4 0 37 1 5 2 0 4 0 2 5 2 2 0 5 2 1 0 0 2 5 2 *** More *** %n lines left. Do @more [rest|flush] for more. 2 5 4 2 0 0 0 0 37 1 0 0 37 1 4 0 37 0 0 0 37 1 0 0 2 5 4 30 1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 12 1 13 1 16 1 20 1 21 1 23 1 25 1 42 1 52 1 53 1 54 1 56 1 57 1 58 1 63 1 68 1 71 1 74 1 79 2 1 0 -79 37 1 5 2 4 5 2 0 5 2 0 4 0 2 5 4 0 2 4 0 0 2 5 4 0 2 4 0 0 2 4 2 %N is not currently logged in. 2 5 2 its 2 5 2 Its 2 5 2 You sense that %n is looking for you in %l. 2 5 2 Your message has been sent. 2 5 4 0 2 5 4 0 2 5 4 0 2 5 4 0 2 5 5 2 4 4 0 2 4 5 2 1 0 70 37 0 2 neuter 2 5 2 Itself 2 5 2 Its 2 5 2 It 2 5 2 It 2 5 2 itself 2 5 2 its 2 5 2 it 2 5 2 it 2 5 1 11 2 5 0 0 2 0 4 0 2 5 0 0 2 5 4 0 2 5 4 0 2 5 5 2 1 0 0 2 5 4 0 2 5 4 4 0 50000 0 713273 0 780209007 0 100 37 0 0 0 2 0 0 0 2 0 0 0 2 4 4 1 2 Wizard 2 1 5 2 5 4 2 0 2201 0 781044975 37 1 #3 generic room 152 2 -1 -1 -1 1 50 0 44 confunc 2 173 -1 disfunc 2 173 -1 say 2 85 -2 emote 2 93 -2 announce 2 173 -1 match_exit 2 173 -1 add_exit 2 165 -1 tell_contents 2 173 -1 @exits 2 5 -1 look_self 2 173 -1 acceptable 2 165 -1 add_entrance 2 165 -1 bless_for_entry 2 173 -1 @entrances 2 1 -1 go 2 93 -2 l*ook 2 93 -2 announce_all 2 173 -1 announce_all_but 2 173 -1 enterfunc 2 173 -1 exitfunc 2 173 -1 remove_exit 2 173 -1 remove_entrance 2 173 -1 @add-exit 2 17 -1 @add-entrance 2 17 -1 recycle 2 165 -1 e east w west s south n north ne northeast nw northwest se southeast sw southwest u up d down 2 13 -1 @eject @eject! @eject!! 2 25 -1 ejection_msg oejection_msg victim_ejection_msg 37 173 -1 accept_for_abode 2 173 -1 @resident*s 2 25 -1 match 2 173 -1 @remove-exit 2 25 -1 @remove-entrance 2 25 -1 moveto 2 173 -1 who_location_msg 2 173 -1 exits entrances 2 173 -1 obvious_exits obvious_entrances 2 165 -1 here_huh 2 173 -1 room_announce*_all_but 2 173 -1 examine_commands_ok 2 173 -1 examine_key 2 173 -1 examine_contents 2 165 -1 free_entry 37 173 -1 dark 2 173 -1 13 who_location_msg free_home victim_ejection_msg ejection_msg oejection_msg residents free_entry entrances blessed_object blessed_task exits dark ctype 17 2 %T 2 5 0 0 2 5 2 You have been expelled from %i by %n. 2 5 2 You expel %d from %i. 2 5 2 %D is unceremoniously expelled from %i by %n. 2 5 4 0 2 5 0 1 2 5 4 0 2 4 1 -1 2 5 0 0 2 5 4 0 2 4 0 0 2 5 0 3 2 5 5 2 4 4 1 2 generic room 2 5 5 2 5 4 2 0 21673 0 780209016 37 1 #4 generic builder 144 2 -1 -1 -1 6 58 -1 32 @quota 2 17 -1 @create 2 81 -2 @recycle 2 17 -1 @recreate 2 89 13 @dig 2 81 -2 @audit 2 89 -2 @count 2 25 -1 @countDB 2 25 -1 @sort-owned*-objects 2 25 -1 @add-owned 2 25 -1 @verify-owned 2 9 -1 @unlock 2 17 -1 @lock 2 89 0 @newmess*age 2 81 -2 @unmess*age 2 81 -2 _messagify 2 173 -1 @kids 2 29 -1 @contents 2 25 -1 @par*ents 2 25 -1 @location*s 2 25 -1 @cl*asses 2 89 -2 classes_2 2 173 -1 _create 2 173 -1 _recycle 2 173 -1 @chparent 2 81 1 @check-chp*arent 2 89 1 @set*prop 2 89 1 build_option 2 173 -1 set_build_option 2 173 -1 @build-o*ptions @buildo*ptions @builder-o*ptions @buildero*ptions 2 89 -2 _chparent 2 165 -1 @measure 37 89 -2 1 build_options 61 4 0 2 5 5 37 1 5 2 0 5 2 5 5 2 0 5 2 1 0 0 2 5 5 2 5 5 37 1 5 37 1 5 37 0 5 37 1 5 2 5 5 2 1 5 37 1 5 2 4 5 2 0 5 2 0 5 2 5 5 2 4 5 2 5 5 2 4 5 2 4 5 2 5 5 2 5 5 2 5 5 2 5 5 2 5 5 2 5 5 2 5 5 2 5 5 2 5 5 2 4 5 2 4 5 2 1 0 0 37 0 5 2 5 5 2 5 5 2 5 5 2 5 5 2 5 5 2 5 5 2 5 5 2 5 5 2 5 1 11 2 5 5 2 0 5 2 5 5 2 5 5 2 5 5 2 5 5 2 1 5 2 5 5 2 5 5 37 0 5 2 0 5 2 0 5 2 4 4 1 2 generic builder 2 1 2 You see a player who should type '@describe me as ...'. 2 5 4 2 0 33322 0 780209021 37 1 #5 generic thing 152 2 -1 -1 -1 1 8 6 6 g*et t*ake 2 45 -1 d*rop th*row 2 45 -1 moveto 2 173 -1 take_failed_msg take_succeeded_msg otake_failed_msg otake_succeeded_msg drop_failed_msg drop_succeeded_msg odrop_failed_msg odrop_succeeded_msg 2 173 -1 gi*ve ha*nd 2 109 1 examine_key 2 173 -1 8 drop_failed_msg drop_succeeded_msg odrop_failed_msg odrop_succeeded_msg otake_succeeded_msg otake_failed_msg take_succeeded_msg take_failed_msg 12 2 You can't seem to drop %t here. 2 5 2 You drop %t. 2 5 2 tries to drop %t but fails! 2 5 2 drops %t. 2 5 2 picks up %t. 2 5 2 2 5 2 You take %t. 2 5 2 You can't pick that up. 2 5 5 2 4 4 1 2 generic thing 2 5 5 2 5 4 2 0 4369 0 780209021 37 1 #6 generic player 152 2 -1 -1 -1 1 39 7 141 init_for_core 2 173 -1 confunc 2 173 -1 disfunc 2 173 -1 initialize 2 173 -1 recycle 2 173 -1 acceptable 2 173 -1 my_huh 2 165 -1 last_huh 2 173 -1 my_match_object 2 173 -1 tell_contents 2 173 -1 titlec 2 173 -1 notify 2 173 -1 notify_lines 2 173 -1 linesplit 2 173 -1 linelen 37 173 -1 @more 2 25 -1 @wrap 37 1 -2 @linelen*gth 37 17 -1 @pagelen*gth 2 17 -1 tell 2 165 -1 gag_p 2 173 -1 set_gaglist 2 173 -1 @gag*! 2 89 -2 @listgag @gaglist 2 21 -1 @ungag 2 29 -1 whodunnit 2 173 -1 @ch*eck-full 2 89 -2 @paranoid 2 89 -2 @sw*eep 2 9 -1 wh*isper 2 157 1 page 2 93 -2 receive_page 2 173 -1 page_origin_msg page_echo_msg page_absent_msg 37 165 -1 i inv*entory 2 9 -1 look_self 2 173 -1 home 2 9 -1 @sethome 2 9 -1 g*et take 2 45 -1 @move @teleport 2 93 1 @eject @eject! @eject!! 2 89 5 where*is @where*is 2 93 -2 @who 2 85 -2 @wizards 2 29 -1 ?* help info*rmation @help 2 85 -2 mail_forward mail_notify 2 173 -1 receive_message 2 173 -1 display_message 2 173 -1 parse_message_seq from_msg_seq %from_msg_seq to_msg_seq %to_msg_seq subject_msg_seq body_msg_seq kept_msg_seq unkept_msg_seq display_seq_headers display_seq_full messages_in_seq list_rmm new_message_num length_num_le length_date_le length_date_gt length_all_msgs exists_num_eq msg_seq_to_msg_num_list msg_seq_to_msg_num_string rm_message_seq undo_rmm expunge_rmm renumber keep_message_seq 2 173 -1 msg_summary_line 37 173 -1 msg_text 2 173 -1 notify_mail 2 173 -1 __fix 2 173 -1 current_message 2 173 -1 get_current_message 2 173 -1 set_current_message 2 173 -1 make_current_message 2 173 -1 kill_current_message 2 173 -1 current_folder 2 173 -1 set_current_folder 2 173 -1 parse_folder_spec 2 173 -1 parse_mailread_cmd 2 173 -1 @mail 2 85 -2 @read @peek 2 93 -2 @next @prev 2 89 -2 @rmm*ail 2 89 -2 @renumber 2 25 -1 @unrmm*ail 2 89 -2 @send 2 93 -2 @answer @repl*y 2 89 -2 @forward 2 93 -2 @gripe 2 89 -2 @typo @bug @suggest*ion @idea @comment 2 89 -2 @skip 2 89 -2 @subscribe @unsubscribed 2 89 -2 mail_catch_up 2 173 -1 @rn check_mail_lists @subscribed 2 5 -1 mail_option 2 173 -1 display_option 2 173 -1 edit_option 2 173 -1 set_mail_option set_edit_option set_display_option 2 173 -1 @mailo*ptions @mail-o*ptions @edito*ptions @edit-o*ptions @displayo*ptions @display-o*ptions 2 89 -2 set_name 2 173 -1 set_aliases 2 173 -1 @rename 2 81 1 @addalias @add-alias 2 81 1 @rmalias 2 81 5 @desc*ribe 2 89 13 @mess*ages 2 17 -1 @notedit 37 25 -1 @password 2 89 -2 @last-c*onnection 2 29 -1 set_gender 2 173 -1 @gender 2 25 -1 set_brief 2 173 -1 @mode 2 81 -2 @exam*ine 2 29 -1 exam*ine 2 25 -1 add_feature 37 165 -1 remove_feature 37 165 -1 @add-feature @addfeature 2 25 -1 @remove-feature @rmfeature 2 25 -1 @features 2 85 11 @features 2 17 -1 @memory 37 9 -1 @version 37 9 -1 @uptime 37 9 -1 @quit 2 9 -1 examine_commands_ok 2 173 -1 is_listening 2 165 -1 moveto 2 173 -1 announce*_all_but 2 165 -1 linewrap 37 173 -1 @set-note-string @set-note-text 2 17 -1 verb_sub 2 165 -1 ownership_quota 2 173 -1 tell_lines 2 173 -1 @lastlog 2 29 -1 set_linelength 2 173 -1 set_pagelength 2 165 -1 set_home 2 165 -1 @unsub*scribe 2 89 -2 @registerme 2 89 -2 ctime 2 173 -1 send_self_netmail 2 173 -1 @netforw*ard 2 93 -2 @@sendmail 2 89 -2 @keep-m*ail @keepm*ail 2 89 -2 my_match_recipient 2 173 -1 expire_old_messages 2 173 -1 @age 2 25 -1 news 2 29 -1 news(new) 2 169 -1 @edit 37 89 -2 erase_paranoid_data 2 173 -1 @move-new 2 89 -2 set_owned_objects 2 173 -1 msg_full_text 2 173 -1 notify_lines_suspended 2 173 -1 @resend 2 89 -2 _chparent 2 165 -1 @users 37 13 -1 56 features previous_connection mail_lists email_address last_disconnect_time help more_msg linetask linesleft linebuffer pagelen _mail_task owned_objects linelen current_folder all_connect_places last_connect_place dict messages_going brief responsible lines page_absent_msg pq pqc page_origin_msg page_echo_msg mail_notify mail_forward edit_options mail_options current_message messages last_connect_time ownership_quota gender prc ppc poc psc pr pp po ps home password gaglist paranoid display_options verb_subs first_connect_time message_keep_date messages_kept size_quota last_password_time last_connect_attempt 60 4 0 37 1 0 0 2 0 4 0 2 5 2 2 0 0 0 2 1 0 0 2 5 2 *** More *** %n lines left. Do @more [rest|flush] for more. 2 5 4 2 0 0 0 0 37 1 0 0 37 1 4 0 37 0 0 0 37 1 0 0 2 5 4 0 2 1 0 -79 37 1 0 1 2 4 4 0 2 0 2 ? 2 0 4 0 2 5 4 0 2 4 0 0 2 5 4 0 2 4 0 0 2 4 2 %N is not currently logged in. 2 5 2 its 2 5 2 Its 2 5 2 You sense that %n is looking for you in %l. 2 5 2 Your message has been sent. 2 5 4 0 2 5 4 0 2 5 4 0 2 5 4 0 2 5 4 2 0 0 0 0 2 4 4 0 2 4 0 0 2 1 0 0 37 0 2 neuter 2 5 2 Itself 2 5 2 Its 2 5 2 It 2 5 2 It 2 5 2 itself 2 5 2 its 2 5 2 it 2 5 2 it 2 5 1 11 2 5 2 impossible password to type 2 0 4 0 2 5 0 0 2 5 4 0 2 5 4 0 2 5 0 2147483647 2 1 0 0 2 5 4 0 2 5 4 0 37 0 0 0 2 0 0 0 2 0 5 2 4 4 1 2 generic player 2 1 2 You see a player who should type '@describe me as ...'. 2 5 4 2 0 145358 0 780209046 37 1 #7 generic exit 152 2 -1 -1 -1 1 -1 46 11 invoke 2 173 -1 move 2 173 -1 recycle 2 165 -1 leave_msg oleave_msg arrive_msg oarrive_msg nogo_msg onogo_msg 2 173 -1 set_name 2 173 -1 set_aliases 2 173 -1 announce_all_but 2 173 -1 defaulting_oleave_msg 2 173 -1 moveto 2 173 -1 examine_key 2 173 -1 announce_msg 2 173 -1 9 obvious source dest nogo_msg onogo_msg arrive_msg oarrive_msg oleave_msg leave_msg 13 0 1 2 5 1 -1 2 5 1 -1 2 5 0 0 2 5 0 0 2 5 0 0 2 5 0 0 2 5 0 0 2 5 0 0 2 5 5 2 4 4 1 2 generic exit 2 5 5 2 5 4 2 0 5848 0 780209048 37 1 #8 generic container 152 2 -1 -1 -1 5 -1 9 15 p*ut in*sert d*rop 2 157 3 re*move ta*ke g*et 2 157 5 look_self 2 173 -1 acceptable 2 173 -1 open 2 45 -1 @lock_for_open 2 105 0 is_openable_by 2 173 -1 close 2 45 -1 @unlock_for_open 2 41 -1 tell_contents 2 173 -1 set_opened 2 165 -1 @opacity 2 97 12 set_opaque 2 165 -1 oclose_msg close_msg oopen_msg open_msg oput_fail_msg put_fail_msg oremove_fail_msg oremove_msg remove_fail_msg remove_msg oput_msg put_msg oopen_fail_msg open_fail_msg empty_msg 37 165 -1 dark 2 173 -1 19 oclose_msg close_msg oopen_msg open_msg oput_fail_msg put_fail_msg opaque dark oremove_fail_msg oremove_msg remove_fail_msg remove_msg oput_msg put_msg oopen_fail_msg open_fail_msg empty_msg opened open_key 31 2 closes %d. 2 5 2 You close %d. 2 5 2 opens %d. 2 5 2 You open %d. 2 5 2 2 5 2 You can't put %d in that. 2 5 0 1 2 1 0 1 2 1 2 2 5 2 removes %d from %i. 2 5 2 You can't remove that. 2 5 2 You remove %d from %i. 2 5 2 puts %d in %i. 2 5 2 You put %d in %i. 2 5 2 2 5 2 You can't open that. 2 5 2 It is empty. 2 5 0 0 2 1 0 0 2 4 5 2 5 5 2 5 5 2 5 5 2 5 5 2 5 5 2 5 5 2 5 5 2 5 5 2 4 4 1 2 generic container 2 5 5 2 5 4 2 0 7518 0 780209049 37 1 #9 generic note 152 2 -1 -1 -1 5 54 62 11 r*ead 2 45 -1 er*ase 2 45 -1 wr*ite 2 157 4 del*ete rem*ove 2 153 5 encrypt 2 97 0 decrypt 2 33 -1 text 2 173 -1 is_readable_by 2 173 -1 set_text 2 173 -1 is_writable_by 2 173 -1 mailme @mailme 2 41 -1 3 writers encryption_key text 15 4 0 2 5 0 0 2 4 4 0 2 4 5 2 5 5 2 5 5 2 5 5 2 5 5 2 5 5 2 5 5 2 5 5 2 5 5 2 4 4 1 2 generic note 2 5 2 There appears to be some writing on the note ... 2 5 4 2 0 4776 0 780209051 37 1 #10 Login Commands 16 2 -1 -1 -1 1 -1 67 35 ? 2 93 -1 wel*come @wel*come 2 93 -1 w*ho @w*ho 2 93 -1 co*nnect @co*nnect 2 93 -1 cr*eate @cr*eate 2 93 -1 q*uit @q*uit 2 93 -1 up*time @up*time 2 93 -1 v*ersion @v*ersion 2 93 -1 parse_command 2 165 -1 check_for_shutdown 2 173 -1 check_player_db 2 173 -1 _match_player 2 165 -1 notify 2 165 -1 tell 37 173 -1 player_creation_enabled 2 173 -1 newt_registration_string registration_string 2 173 -1 init_for_core 2 173 -1 special_action 2 164 -1 blacklisted graylisted redlisted spooflisted 2 165 -1 blacklist_add graylist_add redlist_add spooflist_add 2 173 -1 blacklist_remove graylist_remove redlist_remove spooflist_remove 2 173 -1 listname 2 173 -1 who(vanilla) 2 173 -1 record_connection 2 173 -1 sample_lag 2 173 -1 is_lagging 2 173 -1 max_connections 2 173 -1 request_character 2 173 -1 req*uest @req*uest 2 93 -1 h*elp @h*elp 2 93 -1 maybe_print_lag 2 173 -1 current_lag 2 173 -1 maybe_limit_commands 2 165 -1 server_started 2 173 -1 uptime_since 2 173 -1 32 welcome_message newt_registration_string registration_string registration_address create_enabled bogus_command blank_command graylist blacklist redlist who_masks_wizards max_player_name spooflist ignored max_connections connection_limit_msg lag_samples request_enabled help_message last_lag_sample lag_sample_interval boot_exceptions boot_process lag_cutoff lag_exemptions newted current_connections current_numcommands max_numcommands temporary_newts downtimes print_lag 36 4 5 2 Welcome to the LambdaCore database. 2 2 Type 'connect wizard' to log in. 2 2 You will probably want to change this text and the output of the `help' command, which are stored in $login.welcome_message and $login.help_message, respectively. 2 5 2 Your character is temporarily hosed. 2 5 2 Character creation is disabled. 2 5 2 2 5 0 1 2 5 2 ? 2 1 2 welcome 2 1 4 2 4 0 4 0 2 0 4 2 4 0 4 0 2 0 4 2 4 0 4 0 2 0 0 0 2 0 0 40 2 5 4 2 4 0 4 0 2 0 4 0 2 5 0 99999 37 5 2 *** The MOO is too busy! The current lag is %l; there are %n connected. WAIT FIVE MINUTES BEFORE TRYING AGAIN. 37 1 4 5 0 0 0 0 0 0 0 0 0 0 2 5 0 0 2 5 4 1 2 Sorry, but there's no help here yet. Type `?' for a list of commands. 2 5 0 0 2 5 0 15 2 5 4 3 1 50 1 64259 1 62717 2 5 0 0 2 5 0 5 2 5 4 0 2 5 4 0 2 0 4 1 1 -2 2 5 4 1 0 6 2 5 0 20 2 5 4 0 2 5 4 7 4 2 0 780119579 0 780113251 4 2 0 780112586 0 780055196 4 2 0 779776817 0 779773421 4 2 0 779331480 0 779328121 4 2 0 778912530 0 778909320 4 2 0 778263721 0 778240788 4 2 0 778135979 0 778133005 2 5 0 0 2 5 5 2 4 4 1 2 Login Commands 2 5 2 This provides everything needed by #0:do_login_command. See `help $login' on $core_help for details. 2 5 4 2 0 30614 0 780209056 37 1 #11 The First Room 16 37 -1 2 -1 3 -1 -1 5 keep_clean 2 173 -1 disfunc 2 173 -1 enterfunc 2 173 -1 match 37 173 -1 init_for_core 2 173 -1 0 17 5 37 5 5 37 5 5 37 5 5 37 5 5 37 5 5 37 5 5 37 5 4 0 37 4 5 37 5 5 37 5 4 0 37 4 5 37 5 5 37 5 5 37 4 4 0 37 5 2 This is all there is right now. 37 5 4 2 0 3104 0 780209056 37 1 #12 Player Last_huh Verbs 16 2 -1 -1 -1 1 -1 10 4 @* 2 165 -1 give hand 2 173 -1 get take 2 173 -1 drop throw 2 173 -1 0 4 5 2 4 4 1 2 Player Last_huh Verbs 2 5 2 A repository of last-resort player verbs to be called by $player:last_huh 2 5 4 2 0 5157 0 780209056 37 1 #13 Guest Log 0 2 -1 -1 -1 1 -1 12 4 enter 2 173 -1 last 2 173 -1 init_for_core 2 173 -1 find 2 173 -1 2 connections max_entries 6 4 0 2 0 0 199 2 0 5 2 4 4 1 2 Guest Log 2 5 5 2 5 4 2 0 3837 0 780209058 37 1 #14 Generic BigList Utilities 144 37 -1 -1 -1 79 -1 75 25 length 37 173 -1 find_nth 37 173 -1 find_ord 37 173 -1 set_nth 37 173 -1 kill 37 173 -1 insert_after insert_before 37 173 -1 extract_range 37 173 -1 delete_range 37 173 -1 keep_range 37 173 -1 insert_last 37 173 -1 start 37 173 -1 next 37 173 -1 _find_nth 37 173 -1 _find_ord 37 173 -1 _set_nth 37 173 -1 _skill 37 173 -1 _extract 37 173 -1 _merge 37 173 -1 _smerge 37 173 -1 _split 37 173 -1 _rmerge 37 173 -1 _scrunch 37 173 -1 _listfind_nth 37 173 -1 _insertfirst 37 173 -1 debug 37 173 -1 2 about maxfanout 7 4 15 2 Implementation notes 2 -------------------- 2 Each biglist is actually a tree (a kind of B-tree, actually). 2 The routines above pass around handles of the form 2 2 {root_node, size, leftmost_ord} 2 2 where root_node is the (string) name of a property that holds the root of the tree, size is the number of leaves in the tree, and leftmost_ord is the :_ord value of the leftmost element of the list (i.e., the leftmost leaf). 2 Each node property has a value of the form 2 2 {height,list of subtrees}. 2 2 where the each of the subtrees is itself a 3-element list as above unless 2 the height is 0, in which case the subtrees are actually biglist elements of the arbitrary form determined by the home object. 2 At every level, each node except the rightmost has between this.maxfanout/2 and this.maxfanout subtrees; the rightmost is allowed to have as few as 1 subtree. 37 5 0 7 37 5 4 73 2 Generic BigList Utilities 2 ---------------------------- 2 This is a package for maintaining huge persistent (sorted) lists in a format that is less likely to spam the server (which runs into a certain amount of trouble dealing with long ordinary lists --- btw we use `biglist' to refer to the huge data structure we're about to describe and `list' to refer to ordinary MOO lists {...}). The biglist in question lives on a particular object, to which we will refer in the discussion below as the `home' object, and its various elements appear as leaves of a tree whose nodes are kept in properties of the home object. It should be noted that the home object does not need to be (and in fact should *not* be) a descendant of this one; this object merely provides utilities for manipulating the properties on the home object that are used in a particular biglist manipulation. 2 2 All of the utilities below refer to `caller' to locate the home object. Thus verbs to manipulate a given biglist must be located on or inherited by its home object itself. The home object needs to define the following verbs 2 2 :_make(@args) => new property on home object with value args 2 :_kill(prop) delete a given property that was created by :_make 2 :_get(prop) => home.prop 2 :_put(prop,@args) set home.prop = args 2 :_ord(element) given something that is of the form of a biglist element 2 return the corresponding ordinal (for sorting purposes). 2 If you never intend to use :find_ord, then this can be a 2 routine that always returns 0 or some other random value. 2 2 See #5546 (Generic Biglist Resident) or $big_mail_recipient 2 for examples. 2 2 Those of the following routines that take a biglist argument are expecting 2 either {} (empty biglist) or some biglist returned by one of the other routines 2 2 :length(biglist) => length(biglist) (i.e., number of elements) 2 :find_nth(biglist,n) => biglist[n] 2 :find_ord(biglist,k,comp) => n where n is 2 the largest such that home:(comp)(k,home:_ord(biglist[n])) is false, or 2 the smallest such that home:(comp)(k,home:_ord(biglist[n+1])) is true. 2 Always returns a value between 0 and length(biglist) inclusive. 2 This assumes biglist to be sorted in order of increasing :_ord values 2 with respect to home:(comp)(). 2 Standard situation is :_ord returns a number and comp is a < verb. 2 2 :start(biglist,s,e) => {biglist[s..?],@handle} or {} 2 :next(@handle) => {biglist[?+1..??],@newhandle} or {} 2 These two are used for iterating over a range of elements of a biglist 2 The canonical incantation for doing 2 for elt in (biglist[first..last]) 2 ... 2 endfor 2 is 2 handle = :start(biglist,first,last); 2 while(handle) 2 for elt in (handle[1]) 2 ... 2 endfor 2 handle = :next(@listdelete(handle,1)); 2 endwhile 2 2 The following all destructively modify their biglist argument(s) L (and M). 2 2 :set_nth(L,n,value) => L[n] = value 2 replaces the indicated element 2 2 :insert_before(L,M,n) => {@L[1..n-1],@M,@L[n..length(L)]} 2 :insert_after (L,M,n) => {@L[1..n], @M,@L[n+1..length(L)]} 2 takes two distinct biglists, inserts one into the other at the given point 2 returns the resulting consolidated biglist 2 2 :extract_range(L,m,n) => {{@L[1..m-1],@L[n+1..]}, L[m..n]} 2 breaks the given biglist into two distinct biglists. 2 2 :delete_range(L,m,n[,leafkiller]) => {@L[1..m-1],@L[n+1..]} 2 :keep_range (L,m,n[,leafkiller]) => L[m..n] 2 like extract_range only we destroy what we don't want. 2 2 :insertlast(L,value) => {@L,value} 2 inserts a new element at the end of biglist. 2 If find_ord is to continue to work properly, it is assumed that the 2 home:_ord(elt) is greater (comp-wise) than all of the :_ord values 2 of elements currently in the biglist. 2 2 :kill(L[,leafkiller]) 2 destroys all nodes used by biglist. 2 Calls home:leafkiller on each element. 37 5 5 37 4 4 2 2 ghblu 2 biglist_utils 37 1 4 1 2 This is the Generic BigList Utilities utility package. See `help $biglist' for more details. 37 5 4 2 0 25066 0 780209061 37 1 #15 Generic Large-Capacity Mail Recipient 144 37 -1 -1 -1 45 18 69 40 _genprop 37 173 -1 _make 2 173 -1 _kill 2 165 -1 _get 37 165 -1 _put 37 173 -1 _ord 37 173 -1 _makemsg 37 173 -1 _killmsg 37 173 -1 _message_num 37 173 -1 _message_date 37 173 -1 _message_hdr 37 173 -1 _message_text 37 173 -1 _lt_msgnum 37 173 -1 _lt_msgdate 37 173 -1 receive_batch 37 173 -1 receive_message 37 173 -1 messages_in_seq 37 173 -1 display_seq_headers 37 173 -1 display_seq_full 37 173 -1 list_rmm 37 173 -1 undo_rmm 37 173 -1 expunge_rmm 37 173 -1 rm_message_seq 37 165 -1 renumber 37 173 -1 length_all_msgs 37 173 -1 length_num_le 37 173 -1 length_date_le 37 173 -1 exists_num_eq 37 173 -1 new_message_num 37 173 -1 from_msg_seq 37 173 -1 %from_msg_seq 37 173 -1 to_msg_seq 37 173 -1 %to_msg_seq 37 173 -1 subject_msg_seq 37 173 -1 body_msg_seq 37 173 -1 date_sort 37 173 -1 _fix_last_msg_date 37 173 -1 __fix 37 173 -1 init_for_core 2 173 -1 length_date_gt 37 173 -1 4 summary_uses_body _mgr mowner _genprop 25 0 0 37 5 1 14 37 5 1 37 37 1 2 37 1 5 37 5 0 0 37 1 4 0 37 0 5 37 5 5 37 5 5 37 5 5 37 5 5 37 1 5 37 1 5 37 5 5 37 1 5 37 0 5 37 5 5 37 5 5 37 1 5 37 5 5 37 1 5 37 4 4 1 2 Generic Large-Capacity Mail Recipient 37 1 4 24 2 Generic Large Capacity Mail Recipient 2 ------------------------------------- 2 Since any modifications to large lists entail copying the entire list 2 over, operations on ordinary mail recipients having large numbers of 2 messages, that actually change the content of .messages will take 2 inordinately long. Thus we have this version which makes use of the 2 $biglist package, scattering the messages onto numerous properties so 2 that write operations involving only a few messages will not require 2 recopying of the entire list. 2 2 In nearly all respects it behaves as the ordinary Mail Recipient, 2 except that it is faster for certain kinds of operations. 2 2 Certain unimplemented verbs, like :date_sort(), and :messages() 2 currently return E_VERBNF. 2 2 To convert an existing $mail_recipient-child (call it #MR) into a 2 $big_mail_recipient-child the basic procedure is 2 2 ;;something.foo= #MR:messages(); 2 @rmm 1-$ from #MR 2 @unrmm expunge 2 @chparent #MR to $big_mail_recipient 2 ;#MR:receive_batch(@something.foo); 37 5 4 2 0 24452 0 780209066 37 1 #16 Limbo 16 2 -1 -1 -1 1 -1 72 4 acceptable 2 173 -1 confunc 2 173 -1 who_location_msg 37 173 -1 moveto 37 173 -1 0 4 5 2 4 4 1 2 The Body Bag 2 5 5 2 5 4 2 0 641 0 780209066 37 1 #17 Registration Database 0 37 -1 -1 -1 38 -1 33 6 find* _only 37 173 -1 add 37 173 -1 init_for_core 37 173 -1 suspicious_address 2 173 -1 suspicious_userid 2 173 -1 describe_registration 2 173 -1 1 registrar 8 1 2 37 5 2 37 5 5 37 1 4 4 2 2 4 0 4 0 37 0 5 37 4 4 1 2 Registration Database 37 5 5 37 5 4 2 0 3916 0 780209066 37 1 #18 Player-Creation-Log 0 37 46 -1 35 15 -1 -1 4 display_seq_headers 2 173 -1 msg_summary_line 2 173 -1 init_for_core 2 173 -1 is_usable_by 37 165 -1 0 25 0 1 37 5 1 14 37 5 1 37 37 1 2 37 1 5 37 5 0 780045305 37 1 4 0 37 0 0 1 37 5 2 %n (%#) can't send to moderated list %t (%[#t]) directly. 37 5 4 0 37 5 4 0 37 5 4 1 1 2 37 1 4 2 1 2 1 18 37 1 0 2592000 37 5 0 0 37 1 4 0 37 0 5 37 5 5 37 5 4 4 4 2 1 7240 2 Players 4 2 1 7299 2 Player-Creation-Log 4 2 1 7299 2 Player_Creation_Log 4 2 1 7299 2 PCL 37 1 5 37 5 4 0 37 1 5 37 4 4 3 2 Player-Creation-Log 2 Player_Creation_Log 2 PCL 37 1 2 Log of player creations. 37 5 4 2 0 2937 0 780209068 37 1 #19 Verb Help DB 16 37 -1 -1 -1 1 -1 13 3 find_topics 37 173 -1 get_topic 2 173 -1 dump_topic 2 173 -1 0 4 5 37 4 4 2 2 verbhelp 2 vh 37 5 2 A `help database' that knows about all of the documented verbs. 37 5 4 2 0 2482 0 780209068 37 1 #20 string utilities 24 2 -1 -1 -1 79 -1 55 69 space 37 173 -1 left 37 173 -1 right 37 173 -1 centre center 37 173 -1 columnize columnise 37 173 -1 from_list 37 173 -1 english_list 37 173 -1 names_of 37 173 -1 from_seconds 37 173 -1 trim 37 173 -1 triml 37 173 -1 trimr 37 173 -1 strip_chars 37 173 -1 strip_all_but 37 173 -1 uppercase lowercase 37 173 -1 capitalize capitalise 37 173 -1 literal_object 37 173 -1 match 37 165 -1 match_str*ing 37 173 -1 match_object 37 173 -1 match_player 37 173 -1 match_player_or_object 37 173 -1 find_prefix 37 173 -1 index_d*elimited 37 165 -1 is_numeric 37 173 -1 ordinal 37 173 -1 group_number 37 173 -1 english_number 2 173 -1 english_ordinal 37 173 -1 english_ones 37 173 -1 english_tens 37 173 -1 subst*itute 37 173 -1 substitute_d*elimited 2 13 -1 _cap_property 2 165 -1 pronoun_sub 2 173 -1 pronoun_sub_secure 37 173 -1 pronoun_quote 37 173 -1 alt_pronoun_sub 2 13 -1 explode 37 173 -1 words 37 173 -1 word_start 37 173 -1 to_value 37 173 -1 prefix_to_value 37 173 -1 _tolist 37 173 -1 _unquote 37 173 -1 _toscalar 37 173 -1 parse_command 2 173 -1 from_value 2 173 -1 print 37 173 -1 print_suspended 2 173 -1 reverse 37 173 -1 char_list 37 173 -1 regexp_quote 37 173 -1 connection_hostname_bsd 37 173 -1 connection_hostname 37 173 -1 from_value_suspended 2 173 -1 end_expression 37 173 -1 first_word 37 173 -1 common 37 173 -1 title_list*c list_title*c 37 173 -1 name_and_number nn name_and_number_list nn_list 37 173 -1 columnize_suspended columnise_suspended 37 173 -1 a_or_an 37 173 -1 index_all 37 173 -1 match_stringlist match_string_list 37 165 -1 from_ASCII 37 173 -1 to_ASCII 37 173 -1 abbreviated_value 37 173 -1 _abbreviated_value 37 173 -1 6 digits ascii alphabet use_article_a use_article_an tab 11 2 0123456789 2 5 2 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ 2 5 2 abcdefghijklmnopqrstuvwxyz 2 5 4 5 2 unit 2 unix 2 one 2 once 2 utility 37 1 4 0 37 1 2 2 5 4 95 2 For a complete description of a given verb, do `help $string_utils:verbname' 2 2 Conversion routines: 2 2 :from_list (list [,sep]) => "foo1foo2foo3" 2 :english_list (str-list[,none-str[,and-str[, sep]]]) => "foo1, foo2, and foo3" 2 :title_list*c (obj-list[,none-str[,and-str[, sep]]]) => "foo1, foo2, and foo3" 2 or => "Foo1, foo2, and foo3" 2 :from_value (value [,quoteflag [,maxlistdepth]]) => "{foo1, foo2, foo3}" 2 :print (value) => value in string 2 :abbreviated_list (value, options) => short value in string 2 2 :to_value (string) => {success?, value or error message} 2 :prefix_to_value(string) => {rest of string, value} or {0, error message} 2 2 :english_number(42) => "forty-two" 2 :english_ordinal(42) => "forty-second" 2 :ordinal(42) => "42nd" 2 :group_number(42135 [,sep]) => "42,135" 2 :from_ASCII(65) => "A" 2 :to_ASCII("A") => 65 2 :from_seconds(number) => string of rough time passed in large increments 2 2 :name_and_number(obj [,sep]) => "ObjectName (#obj)" 2 :name_and_number_list({obj1,obj2} [,sep]) 2 => "ObjectName1 (#obj1) and ObjectName2 (#obj2)" 2 :nn is an alias for :name_and_number. 2 :nn_list is an alias for :name_and_number_list. 2 2 Type checking: 2 2 :is_numeric (string) => return true if string is composed entirely of digits 2 2 Parsing: 2 2 :explode (string,char) -- string => list of words delimited by char 2 :words (string) -- string => list of words (as with command line parser) 2 :word_start (string) -- string => list of start-end pairs. 2 :first_word (string) -- string => list {first word, rest of string} or {} 2 :char_list (string) -- string => list of characters in string 2 2 :parse_command (cmd_line [,player] => mimics action of builtin parser 2 2 Matching: 2 2 :find_prefix (prefix, string-list)=>list index of element starting with prefix 2 :index_delimited(string,target[,case]) =>index of delimited string occurrence 2 :index_all (string, target string) => list of all matched positions 2 :common (first string, second string) => length of longest common prefix 2 :match (string, [obj-list, prop-name]+) => matching object 2 :match_player (string-list[,me-object]) => list of matching players 2 :match_object (string, location) => default object match... 2 :match_player_or_object (string, location) => object then player matching 2 :literal_object (string) => match against #xxx, $foo 2 :match_stringlist (string, targets) => match against static strings 2 :match_string (string, wildcard target,options)=> match against a wildcard 2 2 Pretty printing: 2 2 :space (n/string[,filler]) => n spaces 2 :left (string,width[,filler]) => left justified string in field 2 :right (string,width[,filler]) => right justified string in field 2 :center/re (string,width[,lfiller[,rfiller]]) => centered string in field 2 :columnize/se (list,n[,width]) => list of strings in n columns 2 2 Substitutions 2 2 :substitute (string,subst_list [,case]) -- general substitutions. 2 :substitute_delimited (string,subst_list [,case]) 2 -- like subst, but uses index_delim 2 :pronoun_sub (string/list[,who[,thing[,location]]]) 2 -- pronoun substitutions. 2 :pronoun_sub_secure (string[,who[,thing[,location]]],default) 2 -- substitute and check for names. 2 :pronoun_quote (string/list/subst_list) -- quoting for pronoun substitutions. 2 2 Miscellaneous string munging: 2 2 :trim (string) => string with outside whitespace removed. 2 :triml (string) => string with leading whitespace removed. 2 :trimr (string) => string with trailing whitespace removed. 2 :strip_chars (string,chars) => string with all chars in `chars' removed. 2 :strip_all_but(string,chars) => string with all chars not in `chars' removed. 2 :capitalize/se(string) => string with first letter capitalized. 2 :uppercase/lowercase(string) => string with all letters upper or lowercase. 2 :names_of (list of OBJ) => string with names and object numbers of items. 2 :a_or_an (word) => "a" or "an" as appropriate for that word. 2 :reverse (string) => "gnirts" 2 2 A useful property: 2 2 .alphabet => "abcdefghijklmnopqrstuvwxyz" 2 2 Suspended versions (with _suspended at end of name) for 2 :print :from_value :columnize/se 2 5 5 2 4 4 2 2 string 2 utils 2 5 4 1 2 This is the string utilities utility package. See `help $string_utils' for more details. 2 5 4 2 0 80673 0 780209080 37 1 #21 building utilities 24 2 -1 -1 -1 79 -1 34 10 make_exit 2 173 -1 set_names 2 165 -1 recreate 2 173 -1 transfer_ownership(useless) 2 169 -1 parse_names 2 173 -1 audit_object_category 2 173 -1 object_audit_string 2 165 -1 do_audit do_prospectus 2 173 -1 do_audit_item 2 165 -1 size_string 2 173 -1 0 5 4 13 2 Verbs useful for building. For a complete description of a given verb, do `help $building_utils:verbname'. 2 2 make_exit(spec,source,dest[,don't-really-create]) => a new exit 2 spec is an exit-spec as described in `help @dig' 2 2 set_names(object, spec) - sets name and aliases for an object 2 parse_names(spec) => list of {name, aliases} 2 in both of these, spec is of the form 2 [[,:],,...] 2 (as described in `help @rename') 2 2 recreate(object, newparent) - effectively recycle and recreate object 2 as a child of newparent 2 5 5 2 4 4 2 2 building 2 utils 2 5 4 1 2 This is the building utilities utility package. See `help $building_utils' for more details. 2 5 4 2 0 13313 0 780209083 37 1 #22 Core Utility Help 16 37 -1 -1 -1 31 -1 -1 3 find_topics 37 165 -1 get_topic 37 173 -1 dump_topic 2 173 -1 33 $login $container $mail_agent MR-subscribing MR-naming MR-access $mail_recipient receiving-mail mail-format mail-resolve sending-mail mail-system $player_db core-index object-matching $no_one $exit $room $help $generic_db $generic_editor $generic_help $generic_options MR-sequences MR-reading MR-writing MR-searching $housekeeper $recycler $error $biglist $guest_log mail-resolution 38 4 70 2 $login 2 ------ 2 This object manages command parsing for unconnected players and governs the initiation of an actual connection. There are verbs pertaining to registration, controlling player creation, and doing site-locks (see `help blacklist' on $wiz_help). 2 2 COMMANDS FOR UNCONNECTED PLAYERS 2 2 Recall that for each line that an unconnected player types, the server parses that line into words (the same way normal commands are parsed into a list of words that is then assigned to `args') and then #0:do_login_command is called. 2 2 :parse_command (@args) => {verb, @args} 2 given the sequence of arguments that were fed to #0:do_login_command 2 this returns the name of a verb on $login to be called together with a 2 list of arguments to be passed to it. 2 2 By default this just returns args iff args[1] names an actual verb on $login that is +x and has args {"any","none","any"}. Otherwise, it returns one of 2 2 .blank_command -- verb to call if command line is empty 2 .bogus_command -- verb to call if command line otherwise unintelligible 2 2 In both cases :parse_command returns a verbname followed by the entire args list passed to it (including the would-be verb at the beginning if any). 2 2 Currently the following verbs are availabe to non-connected players 2 2 h*elp @h*elp -- print .welcome_message 2 ? -- print a short list of available commands 2 w*ho @w*ho -- print a list of logged in players (excluding wizards) 2 co*nnect @co*nnect -- connect to an existing player 2 cr*eate @cr*eate -- create a new player 2 up*time @up*time -- tell how long the server has been running 2 version @version -- tell which version of the server is running 2 q*uit @q*uit -- logoff 2 2 Adding a new command is fairly straightforward; just create a verb on $login, making sure a previous verb doesn't already match the name you want to give it. Then give it args of "any" "none "any" and make sure it is +x. Such a verb should begin with `if (caller != #0) return E_PERM; ...' so as to prevent anyone other from a not-logged-in player from making use of it. 2 2 CUSTOMIZATIONS 2 2 .welcome_message 2 -- the message for "help" to print. 2 .create_enabled 2 == 0 => @create prints .registration_string if one tries to use it 2 == 1 => anyone from a non-blacklisted site (see `help blacklist') 2 may use @create to make a new player 2 2 .registration_address 2 -- an email address for character creation requests 2 .registration_string 2 -- string to print to players to give them information about how to get 2 a character created for them, .registration_address is substituted 2 for %e, % for %% 2 .newt_registration_string 2 -- string to print to @newted players (see `help @newt'). 2 same substitutions as for .registration_string. 2 2 Other verbs 2 :registration_string() => .registration_string with substitutions 2 :newt_registration_string() => .newt_registration_string with substitutions 2 :player_creation_enabled(connection) 2 decides whether someone on connection should be allowed to create 2 a player. If you decide this shouldn't depend strictly on the blacklist 2 and on the value of .create_enabled, here's where the extra code can go. 2 :check_for_shutdown() 2 prints a warning message to append to the login banner in the event 2 that the server will be going down soon. 2 :check_player_db() 2 prints a warning message to append to the login banner in the event 2 that $player_db is being reloaded to warn players that their character 2 names might not be recognized. 2 2 SITE LOCKS 2 see `help blacklist' 2 37 5 4 29 2 The Generic Container (for programmers) 2 2 In addition to the command verbs described under `help containers' 2 and the _msg properties described in `help container-messages', 2 the following verbs and properties are available for use within programs 2 2 .opened == TRUE iff the container is open 2 .dark == TRUE iff the contents of the container may be seen 2 .opaque -- describes the correlation between .open and .dark 2 == 0 container is always !dark 2 == 1 container is dark iff it is closed 2 == 2 container is always dark 2 2 :set_opaque(newvalue) 2 changes the .opaque value for the container 2 => newvalue or E_PERM or E_INVARG 2 2 :set_opened(newvalue) 2 opens/closes the container (updates .open and .dark) according to newvalue 2 => newvalue or E_PERM 2 2 :is_openable_by(player) 2 what the :open command uses to test whether the player should be able to open 2 the container. By default this refers to .open_key (set by 2 @(un)lock_for_open), but the object owner is free to customize this. 2 2 N.B.: There is no way to directly set .dark; .dark can be changed only by 2 changing one of .opaque or .opened. Use :set_opaque(0) and :set_opaque(2) 2 to have .dark change independently of the value of .opened. 37 5 4 68 2 $mail_agent 2 2 This object contains a two distinct sets of routines: 2 2 1. utilities for performing basic mailsystem functions, e.g., 2 matching on recipient names, resolving mail forwarding, 2 formatting messages, sending messages 2 2 Recipient Matching 2 2 match - match on a $mail_recipient 2 match_recipient - match on either a $mail_recipient or a player 2 match_failed - print angry messages to the user for $failed/ambiguous_match 2 2 look_self - provides a list of available $mail_recipients 2 check_names 2 touch 2 accept 2 2 Message Format 2 2 make_message - produces a message in the canonical transmission format 2 name - single recipient => string for address field 2 name_list - list of recipients => string for address field 2 parse_address_field - address field string => object list 2 2 Sending Messages 2 2 send_message - advertised message sending routine. 2 raw_send - raw message sending routine 2 (only called by $mail_editor:send and this:send_message) 2 resolve_addr - converts a given list recipients into a list of actual 2 recipients and objects to be notified. 2 sends_to - Does X forward (transitively) to Y 2 2 Mail Options 2 2 option 2 option_verbose 2 2 2. canonical versions of mail_recipient verbs 2 2 Ideally, the verbs to perform operations on a given mail recipient would be located on the recipient itself, except for the fact that these verbs also need to be located on players, which for various reasons, shouldn't be children of $mail_recipient. Multiple inheritance would solve our problems, but we don't have it yet. Ergo, both $mail_recipient and $player refer to the following verbs here: 2 2 display_seq_full print entire text of messages (@read) 2 display_seq_headers print headers of messages (@mail) 2 rm_message_seq remove messages (@rmm) 2 undo_rmm undo last rm_message_seq (@unrmm) 2 expunge_rmm flush removed messages (@unrmm expunge) 2 list_rmm list removed messages (@unrmm list) 2 renumber renumber messages (@renumber) 2 msg_summary_line msg header => display_seq_headers/list_rmm summary line 2 2 parse_message_seq command line msg sequence spec => message sequence 2 new_message_num => message number of next new message 2 length_all_msgs => number of messages (total) 2 length_num_le => number of messages numbered <= some number 2 length_date_le => number of messages dated <= some date 2 exists_num_eq => true iff there exists a messsage with the given number 2 from_msg_seq => message sequence of msgs from given sender(s) 2 to_msg_seq => message sequence of msgs to given recipient(s) 2 subject_msg_seq => message sequence of msgs with subjects containing text 2 body_msg_seq => message sequence of msgs with bodies containing text 2 messages_in_seq => list of {message number, message} pairs 2 2 messages == :messages_in_seq(1,:length_all_msgs()+1) (obsolete) 2 2 The $mail_agent versions of these verbs are set_task_perms(caller_perms()) and perform their operations on caller, which in turn is assumed to have done any necessary security checks. 37 5 4 38 2 Subscribing to Mail Recipients 2 ------------------------------ 2 There are two notions of being "subscribed" to a mailing list/recipient. 2 2 (1) Hard subscribed == being on the recipient's .mail_forward list so that mail sent to this list is forwarded to one's own .messages as well (see `help mail-forwarding'). 2 2 (2) Soft subscribed == keeping track of a current message for this recipient and (optionally) being on the recipient's .mail_notify list. 2 2 2 Each player has a .current_message property that contains, for each recipient the player cares to keep track of, a current message number and a last read date. 2 2 player:current_message(rcpt) (somewhat obsolete) 2 => player's current message number for rcpt 2 2 player:get_current_message(rcpt) 2 => player's {current message number for rcpt, last-read-date for rcpt} 2 2 player:make_current_message(rcpt) 2 => adds a current_message entry for rcpt (NOOP if rcpt == player) 2 2 player:set_current_message(rcpt,n|E_NONE,[,date]) 2 => sets player's current message number for rcpt to n iff n!=E_NONE 2 updates the last-read-date for rcpt to date iff date > last-read-date 2 2 player:kill_current_message(rcpt) 2 => removes current-message info for rcpt (NOOP if rcpt == player) 2 2 2 On $mail_recipient, .mail_forward and .mail_notify are -c so one needs to use the following verbs to actually modify them. 2 2 :add_forward(@new_recipients) 2 :delete_forward(@recpients) 2 :add_notify(@new_notifiees) 2 :delete_notify(@notifiees) 2 2 A recipient's owner is, of course, allowed to make arbitrary changes to .mail_forward and .mail_notify. However, the default versions of these verbs also allow any player to add him/herself to a recipient's .mail_forward or .mail_notify if the recipient is readable (see `help MR-access') by him/her. 2 2 Likewise any player may use the :delete* verbs to delete him/herself from any .mail_forward/.mail_notify list, regardless of his actual access to the list. 37 5 4 15 2 One may always refer to a list by its object number. In order to refer to it by name, it must be contained in $mail_agent, which holds all mailing lists, i.e., those that you want others to be able to refer to by name. 2 2 The .aliases field holds the names by which one may refer to the list, but only those names not containing spaces actually count for anything. As with certain other types of objects (e.g., players), set_aliases() needs to be called in order to change the .aliases field. 2 2 $mail_agent:match(name) 2 is the canonical way to obtain the objectid of a mailing list 2 given the name ("*" is assumed; an initial "*" will be dropped). 2 2 $mail_agent:match_recipient(name) 2 is the canonical way to obtain the objectid of a list or player 2 matching the given name. An initial "*" indicates that this is 2 supposed to be a list. 2 2 $mail_agent:match_failed(objid,name) 2 is the mail_recipient counterpart to $command_utils:object_match_failed 37 5 4 32 2 Controlling Access to Mail Recipients 2 ------------------------------------- 2 :is_writable_by(one) - one may alter/add/remove saved messages 2 :is_readable_by(one) - one may read messages. 2 :is_usable_by(one) - one may send to this list 2 2 By default, these verbs refer to the following properties: 2 2 writers - list of players other from the owner who can do anything 2 readers - if == 1, indicates a public mailing list. 2 list of additional readers (by default anyone who receives mail 2 sent to the list can read the saved messages). 2 moderated - if false, indicates a normal mail recipient everyone can send to. 2 otherwise this should be a list of approved senders. 2 2 Terminology: 2 A mailing list is "public" if everyone can read it. 2 A mailing list is "moderated" if not everyone can send to it. 2 2 Note that while being able to write to a recipient implies being able to read from it or send to it, neither of read-ability or send-ability implies the other. 2 2 It is highly recommended that if you are creating custom mail recipients with variable reader/sender lists, i.e., you find you need to write your own :is_readable/usable/writabe_by verbs, you are best off if such verbs are of the form 2 2 return pass(@args) || << your_test(args[1]) >> 2 2 and have .writers == .readers == {} and .moderated == 1. This will ensure 2 (1) wizards having write access 2 --- necessary in order for :receive_message to work 2 (2) writers being able to read and send (the converse being a ludicrous 2 situation), 2 (3) persons on the mail_forward list of someone with reader access will also 2 have read access (convenient). 37 5 4 19 2 Generic Mail Recipient 2 ---------------------- 2 A "mail recipient" is, by definition, an object that can be sent mail. 2 Mail recipients must either be players or descendants of $mail_recipient. 2 2 One source of confusion is that the terms "mail recipient", "mail folder", "mailing list", and "mail collection" really all refer to the same kind of object. It so happens that $mail_recipient serve several distinct functions and we tend to use whatever term happens to best match the application under discussion, e.g., it's a "mailing list" if we're playing with its .mail_forward property but it's also a "mail folder" if we're examining the messages that have been saved in it. 2 2 Note that, by default, a freshly created recipient is accessibly only by you. If you wish to make a publically accessible recipient, set .readers=1. Furthermore, if you want to allow a message on your recipient to be removed by its sender without your intervention, set .rmm_own_msgs=1. Finally, in order for other players to be able to refer to your recipient by name, the object must reside in $mail_agent. $mail_agent will not accept the object unless it has an actual description and a name distinct from all other mail recipient names/aliases. 2 2 Topics: 2 2 MR-access -- controlling read, write and send access to a recipient 2 MR-naming -- naming conventions and how to match on recipient names 2 MR-sequences -- message sequence arguments to $mail_recipient verbs 2 MR-reading -- reading messages/headers on recipients 2 MR-searching -- searching message lists for patterns in certain fields 2 MR-writing -- removing and renumbering messages 2 MR-subscribing -- updating .mail_forward, .mail_notify 2 and the story of .current_message 37 5 4 24 2 Receiving Mail 2 -------------- 2 By definition a recipient "receives" a mail message when its :receive_message verb is called with that message as an argument. 2 2 :new_message_num() 2 => number that will be assigned to the next incoming message. 2 By default this returns the maximum of the message numbers appearing in 2 messages or .messages_going, incremented by 1. If the recipient is a player 2 then the value returned will be 1 higher if it conflicts with the player's 2 current message number for him/herself. 2 2 :receive_message(msg,sender) 2 By default this first calls this:new_message_num to obtain a message number to assign to the incoming message and then appends {num,msg} to this.messages. 2 `sender', the original sender, is supplied in case one wants different 2 action depending on who is sending the message (e.g., mail-gagging). 2 The return value should be an error or string if :receive_message is considered to have failed in some way. Otherwise, a number should be returned --- this number is given to any :notify_mail routines that are called and is expected to either be 0 or the number assigned to the incoming message. 2 2 Note that :receive_message can do arbitrary things, including resending the same message to a new destination. Hacking :receive_message to resend messages is different from using .mail_forward in the following respects 2 (1) the resent message is considered to be a distinct message having this 2 object as its "author" --- i.e., the From: line will necessarily be 2 different. 2 (2) since this "forwarding" is invisible to the mailsystem, 2 there is no protection against loops and multiple copies. 2 37 5 4 34 2 Mail Transmission Format 2 ------------------------ 2 There is a standard message format used for transmitting messages. This is the format that $mail_editor:make_message produces, and that :receive_message verbs on players and $mail_recipients expect to see. The (currently experimental) @refile and @copym commands also use this format to transfer messages. 2 2 This *transmission* format is distinct from the *storage* format, though, for convenience this same format is often used as well for storing messages in player collections and ordinary $mail_recipient children though, in general, there is no requirement that this be the case. 2 2 A transmitted message is a list in the following form 2 2 date (number), 2 the time() value at the time the message was sent. 2 from (string), 2 the sending object (address list form) 2 if this is not a player, an additional header will indicate the 2 current ownership of the object. 2 to (string), 2 recipients (address list form) which can either be players 2 or $mail_recipient descendents. 2 subject (string), 2 subject of the message, or " " if there is no subject, 2 @additional optional headers (list of strings), 2 each header has the form ": text" where : 2 is padded out to a width of 10 columns for the convenience of 2 :display_message. Currently "Reply-to:
" is the only 2 additional header in use, 2 "", 2 @body of message (list of strings) 2 2 Note that the from, to and subject lines do *not* include a header name like "From:", "To:", or "Subject:". The @'s indicate that the lists in question get spliced in (as usual), thus the entire message is a list whose first element is a number and the rest are strings. 2 2 The address lists that appear in the from and to lines is a string in the form a sequence of object ids, each enclosed in parentheses and preceded by optional text, e.g., 2 2 "*Core-DB-Issues (#8175), Rog (#4292), and Haakon (#2)" 2 2 The text is intended to give the current name of each object for the benefit of human readers, but is actually ignored by all header parsing routines. The convention is that the text is either a player name or a * followed by a mailing list name. 37 5 4 52 2 Resolving Mail Forwarding & Notification 2 ---------------------------------------- 2 For each recipient of a given mail message, the following two verbs are called to determine where the message should actually go and who should be notified about it: 2 2 :mail_forward([from]) 2 should return either 2 . a list of objects (either players or $mail_recipients) 2 to which mail for this recipient will be redirected. 2 . a string error message to be printed to the player sending the message. 2 If this recipient is one of the original destinations (i.e., not the 2 result of a previous forwarding), no mail is actually sent. 2 2 If :mail_forward returns a nonempty list, the recipient itself will *not* 2 actually receive the mail message unless it is included in the list. 2 #-1 is allowed to be on the list; it is ignored but does make the list 2 nonempty. Thus, having :mail_forward() return {#-1} is the canonical way 2 to have arriving mail disappear without being kept or forwarded. 2 2 :mail_notify([from]) 2 should return a list of objects that are to be told about any mail sent 2 to this recipient (whether or not the recipient actually receives it). 2 Said objects must have a :notify_mail verb, but other from that, there 2 is no restriction on what these can be. 2 2 object:notify_mail is called with the arguments 2 (sender,recipients,msgnumbers) where 2 recipients == list of recipients including object in .mail_notify 2 msgsnumbers == corresponding list of :receive_message return values 2 (or 0 if :receive_message is not actually called, which 2 will be the case if the recipient forwards without keeping) 2 2 When called as part of a mail send, the `from' argument is the immediate predecessor on the forwarding chain. The default versions of these verbs return the values of .mail_forward and .mail_notify respectively (pronoun_subbing if the value is a string), unless this is a moderated mailing list and `from' is an unapproved sender (see `help MR-access') in which case the following verbs are called instead: 2 2 :moderator_forward(from) 2 what :mail_forward should return for mail coming from unapproved senders 2 This returns .moderator_forward (pronoun_subbed if a string) by default. 2 2 :moderator_notify(from) 2 what :mail_notify should return for mail coming from unapproved senders 2 This returns .moderator_notify (pronoun_subbed if a string) by default. 2 2 Since the :mail_forward verbs only see the previous sender in the forwarding chain, if, e.g, B is moderated but A can send to B (i.e., B:mail_forward(A) returns an actual list), then any mail sent to A goes to B even if the original sender isn't normally allowed to send to B directly. 2 2 These verbs should all allow `from' to be omitted in which case they should return as if `from' were a generic approved sender (e.g., wizard). 2 2 It should rarely be necessary to actually modify any of :*_forward/*_notify verbs, since one has a fair amount of control over their behavior via the following properties 2 2 .mail_forward 2 .mail_notify 2 .moderated (see `help MR-access') 2 .moderator_forward 2 .moderator_notify 37 5 4 24 2 Sending Mail 2 ------------ 2 $mail_agent:send_message(from,recipients,headers,body) 2 from: sender of the message 2 (this must be you or something you own; otherwise => E_PERM) 2 recipients: object or list of objects (must all be players or 2 $mail_recipient descendants) 2 headers: either a string (contents of the Subject: line) 2 or a list {subject,replytos} replytos is a list 2 of objects designated to receive replies. 2 Use {"",replytos} to have a Reply-to: without a Subject: 2 2 This is the canonical way to send a mail message from a program. 2 This calls $mail_agent:make_message to format the arguments into an actual message (see `help mail-format') and then $mail_agent:raw_send to do the actual sending which goes as follows: 2 2 (1) Call :mail_forward on all recipients add any new recipients thus obtained to final recipient list, keep calling mail:forward on the new recipients until we obtain no additional recipients. If one of the initial recipients is invalid, is not a player or $mail_recipient, or has its mail_forward return a string error, then we print the error message and abort at this point with no mail being sent. If one of the later recipients bombs similarly, error messages are printed, but in this case mail still goes out to the other recipients. 2 2 (2) Call :mail_notify on all recipients encountered in stage (1) to get a list of objects to notify. 2 2 (3) All final recipients receive the message (see `help receive-mail') 2 (4) All notifications are delivered (using :notify_mail()) 2 2 We return {0, @failed_recipients} if we bombed out at step 1. 2 Otherwise return {1, @actual_rcpts} indicating what mail was sent. 37 5 4 13 2 Mail System 2 ----------- 2 The following topics describe the guts of the LambdaCore mail system 2 2 sending-mail -- how to send mail from a program; what happens. 2 mail-forwarding -- how to do mail forwarding/notification (the simple version) 2 mail-resolve -- how mail forwarding/notification works, in gory detail 2 receiving-mail -- what :receive_message should do 2 mail-format -- format of transmitted messages 2 mail-command-parsing (TODO) -- routines for parsing mail commands 2 2 $mail_recipient -- generic non-player mail recipient 2 $mail_agent -- mail utility object 37 5 4 34 2 2 Database of Players 2 ------------------- 2 This is an instance of the Generic Database ($generic_db) that 2 holds the {name/alias,#objectid} pairs for every 2 name and alias of every player in the MOO. 2 2 Verbs supplied include 2 2 :find(string) => player or $ambiguous_match or $failed_match 2 :find_exact(string) => player or $failed_match (does not do partial matches) 2 :find_all(string) => list of all matching players 2 2 :insert(string,player) 2 records that string is now a name or alias of player 2 :delete(string) 2 removes string from the db 2 :available(string) 2 returns 1 if string is available as a player name or alias, 2 an object if string is in use, or 0 if string is otherwise unavailable. 2 :load() 2 resets the db, inserting all current player names and aliases. 2 2 The internal representation and all of the above verbs (except :load() and 2 :available()) are as described for $generic_db. 2 2 It should be noted that for any application that involves resolving a player name from a command line, you should be using $string_utils:match_player() rather than $player_db:find(), since the former will deal correctly with other ways of referring to players apart from their names and aliases (e.g., literal object numbers, "me", "$no_one"...). 2 2 :load() needs to be done periodically as it is possible for the player db 2 to get out of synch with reality. In particular, there is currently no way 2 to block someone writing his own player :recycle() verb that neglects to 2 remove his names from the player db. 2 2 While a :load() is in progress the .frozen property is set to 1 to indicate that any results of :find*() are not to be trusted. 37 5 4 2 2 *index* 2 Core Utility Help Topics 37 5 4 64 2 2 Which :match...() Verb Do I Call? 2 --------------------------------- 2 There are many situations where one wishes to obtain an object from a room or a player's .contents whose name/aliases matches a particular string. There are four main verbs available for this and it is important to understand the distinctions between them and how they are supposed to be used. 2 2 (*) LOC:match("X") 2 -- what you get looking for something that is inside LOC and named "X". 2 By default, this looks through LOC.contents to find a unique object 2 having a name or alias that has "X" as a prefix. 2 2 Essentially, you can think of :match as a contents-matching verb, though, e.g., for rooms you also get matches on exits as well. 2 2 (*) LOC:match_object("X", YOU) [YOU defaults to player] 2 (*) YOU:my_match_object("X", LOC) [LOC defaults to player.location] 2 -- what YOU get being located at LOC and looking for something named "X". 2 By default these both return $string_utils:match_object("X",LOC,YOU) 2 2 (*) $string_utils:match_object("X", LOC, YOU) 2 -- what you *would* get *if* YOU were a typical player, YOU were inside LOC, 2 YOU were looking for something named "X", *and* LOC were a typical place. 2 2 In other words, $string_utils:match_object describes the :match_object() algorithm for "typical places" and the :my_match_object for "typical players": 2 2 (1) check for "X" being one of "", "me", "here", "$something", or "#n" 2 (2) try YOU:match("X") i.e., something in your inventory (maybe) 2 (3) try LOC:match("X") i.e., some object in the room (maybe) 2 2 The distinction between these location:match_object and player:my_match_object has to do with whether the player or the location should determine what the matching algorithm is. Which one you should use depends on the command that you are writing. If you are writing a command with a virtual-reality flavor, then you should be respecting the room owner's idea of which objects you can "see" and thus the command should be calling the location's :match_object verb. If you are writing a building/programming command where it is appropriate for the player to determine the matching algorithm --- whether because the current location is irrelevant, not to be trusted, or both --- then the player's :my_match_object verb should be called. 2 2 Examples: 2 2 `look diamond in box' 2 calls box:match("diamond"). This is a match on the contents of box. 2 2 `take ball', 2 calls player.location:match_object("ball") 2 to determine which "ball" to take. Note that if the room is dark, 2 we might not be able to find any "ball". 2 2 `@program widget:foo', 2 calls player:my_match_object("widget") to get the player's own idea 2 of what "widget" should be. Note that if I were carrying something 2 named "widget" and expecting to be programming a :foo() verb on it, 2 it would be potentially disastrous should the room where I am decide 2 for me to be programming something else (not even necessarily 2 called "widget"). 2 2 Object Matching Failures 2 ------------------------ 2 As with other matching routines, one gets back 2 2 $failed_match in the case of no matching object 2 $ambiguous_match in the case of more than one matching object 2 $nothing in the case of a blank string argument 2 2 or an object-id. In these first 3 cases, one usually wants to translate these nonresults to the player; this is what $command_utils:object_match_failed. The standard idiom to mimic what the builtin parser does, say, with the direct object is 2 2 dobj = foo:match_???(dobjstr); 2 if($command_utils:object_match_failed(dobj, dobjstr)) 2 "...give up. nothing to do. error message has already printed..."; 2 else 2 "...dobj is something useful. Continue..."; 2 ... 2 endif 37 5 4 15 2 $no_one 2 ------- 2 ..is a powerless player. He owns no objects, not even himself; nor does he own any verbs. He is, however, a programmer and thus may use eval(). 2 In fact his sole purpose is to evaluate questionable code. 2 `questionable' could be in either or both of the following senses 2 2 (1) Its origin is sufficiently uncertain so that there is no obvious way of deciding whose permissions it should run under. 2 (2) The code itself is potentially malicious, i.e., to the extent that one does not want to be evaluating it using one's own permissions. 2 2 set_task_perms($no_one); is thus the canonical idiom in wizard code for rendering anything that follows mostly harmless. For use by ordinary programmers, we have: 2 2 $no_one:eval(string) 2 2 which attempts to evaluate an arbitrary string using $no_one's permissions. 2 string is either an expression or ";" followed by one or more statements, of which the final semicolon may be omitted. return values are what eval() would return (either {1,value} or {0,@error_messages}). 37 5 4 19 2 Exits 2 ----- 2 An exit can be renamed by either the owner of the exit or the owner of its source. 2 2 The standard verbs that are called in exit movement are: 2 2 :move(object) - moves the object via this exit 2 :invoke() - equivalent to :move(player) 2 2 When an exit is invoked on a particular object (via exit:move(object)), the following occurs. 2 2 (1) The exit may be locked against the object, in which case we print the 2 nogo messages and quit. 2 2 (2) (room=exit.dest):bless_for_entry(object) is called. Assuming that exit is recognized by room as being a legitimate entrance (i.e., is in room.entrances), this will enable room:accept(object) to return true. 2 2 (3) object:moveto(room) is called and the various messages (see `help exit-messages') are :announced/:told. Note that this, in accordance with the way the builtin move() (and hence the default :moveto()) works, we get a call to room:accept(object) which checks for the room itself being locked against the object, and otherwise returns true if the blessing in the previous step worked. The move is performed, here:exitfunc(object) and room:enterfunc(object) are called. In particular, room:enterfunc clears the blessing bestowed in (2) now that it is no longer needed. 2 2 In general, the move may fail, in which case we :announce the (o)nogo_msgs. 37 5 4 81 2 The Generic Room ($room) 2 ---------------- 2 2 (1) Announcements 2 2 :announce (@text) => broadcasts to all except player 2 :announce_all (@text) => broadcasts to all 2 :announce_all_but (objects,@text) => broadcasts to all except those in objects 2 2 say, emote 2 2 2 (2) Command recovery 2 2 :huh (verb,args) - server hook: last chance to make sense of verb 2 :here_huh (verb,args) - room's last attempt to parse something 2 :here_explain_syntax (this,verb,args) - attempts to explain usage of verb 2 2 2 (3) Residency 2 2 free_home - true => @sethome allows anyone to set his .home to be here 2 residents - objects on this list may teleport in and/or set their homes here. 2 2 :accept_for_abode(player) 2 => true iff player should be allowed to set .home to this room. 2 2 @resident*s 2 2 2 (4) Looking 2 2 dark - true => contents are not visible 2 ctype - 1..4 for four different styles of .contents lists 2 2 :match (string) => exit or object in room's .contents 2 :tell_contents (objects,ctype) - format objects according to ctype, tell player 2 2 l*ook 2 2 2 (5) Entrance and exit. 2 2 :accept (object) - Called by move() and :moveto() before an object enters a room, if false is returned, movement is prevented. Protocol permits this verb to make noise (though this is discouraged) as this is the only place the room will learn the object's original location. 2 2 :acceptable (object) - Called by verbs which wish to check whether movement will be possible. Protocol prohibits this verb from making noise and requires it to return the same value as :accept would for the same arguments. 2 2 :is_unlocked_for (object) - interface with the @lock protocol. Returns true or false depending on the state of locks for the object with the room. Other things may prevent entrance even if this returns true. Protocol prohibits this verb from making noise. 2 2 :enterfunc (object) - called after entrance has succeeded. Noise is fine. 2 2 :exitfunc (object) - called after an object has successfully left. Noisemaking is fine. 2 2 (6) Topology and Movement via Exits 2 2 See `help $exit' for an explanation of how the generic $exit works. 2 2 free_entry - true => `teleporting' in is allowed 2 false => only residents may teleport in 2 exits - list of invokable exits leading from this room 2 entrances - list of recognized exits leading to this room 2 blessed_object - object currently entering via an exit 2 blessed_task - task_id for entering object 2 2 :match_exit (string) => exit whose name matches string 2 :bless_for_entry (object) - set up room to accept object arriving from entrance 2 :add_exit (exit) 2 :add_entrance (exit) 2 :remove_exit (exit) 2 :remove_entrance (exit) 2 2 e/east/w/west/s/south/n/north/ne/northeast/nw/northwest/se/southeast/sw/southwest/u/up/d/down, go, @add-exit, @add-entrance, @remove-exit, @remove-entrance, @exits, @entrances 2 2 2 (7) Ejection 2 2 victim_ejection_msg/oejection_msg/ejection_msg 2 :*_msg() messages 2 2 @eject 2 37 5 4 2 2 *forward* 2 $generic_help 37 5 4 79 2 Generic Database 2 ---------------- 2 This holds a collection of {string key, datum} pairs, where datum can be anything. At most one datum may be associated with any given string. Data may be anything (lists, strings, numbers, objectids). If you like, you can think of this as an array indexed by strings. 2 Verbs supplied include 2 2 :find(string) => datum, $ambiguous_match or $failed_match 2 :find_key(string) => full string key, $ambiguous_match or $failed_match 2 :find_exact(string) => datum or $failed_match (no partial matches) 2 :find_all(string) => list of all data corresponding to matching strings 2 :find_all_keys(string) => list of all matching strings 2 2 :insert(string,datum) 2 if the string is already present in the db, 2 changes the associated datum and returns {old_datum}; 2 otherwise enters a new {string,datum} pair and return 0. 2 :delete(string) 2 if there is a datum associated with string, 2 remove this association and return {datum}; otherwise return 0. 2 :delete2(string,datum) 2 if the given datum is associated with string, 2 removes that association and return {datum}, 2 if some other datum is associated with string, just return {other datum} 2 otherwise return 0. 2 :clearall([4|3]) 2 removes all associations from the database. 2 optional argument changes the type of the database 2 (4 is normal, 3 is a kludge for when the data are simply boolean flags 2 i.e., this is a set of strings rather than a string-indexed array; 2 more on this below) 2 2 count [entries|chars] in this 2 provide some vague statistics about how big this thing is. 2 2 N.B. As entries get made, properties belonging to $generic_db.owner will be created on the db object itself. These properties will be created having flags as specified by .node_perms, which by default is "r", but can be changed to "" should you want to ensure that randoms don't have access to the raw information. 2 2 Implementation notes 2 - - - - - - - - - - 2 The representation is as a `trie', a tree in which each internal node corresponds to a prefix shared by two or more strings in the db. 2 Each internal node is kept in a property named " "+, where is a prefix shared by all strings in the subtree under this node. 2 The property value is a 4 element list 2 2 this.(" "+)[1] = 2 maximal continuation shared by all strings beginning with prefix 2 i.e., all these names actually begin with + 2 2 this.(" "+)[2] = 2 string of all characters that can follow + for which 2 there is more than one string in the db beginning with ++ 2 2 this.(" "+)[3] = 2 list of all strings in this subtree for which 2 the character (or lack thereof) following the + substring 2 suffices to determine the string. 2 2 this.(" "+)[4] = 2 list of data corresponding to the strings in [3]. 2 2 Child nodes are this.(" "+++) 2 for all in this.(" "+)[2]. 2 The root node is this.(" "). 2 If, e.g., there are 2 or more strings in the db beginning with a, 2 there will be a node this.(" a"). 2 If all of these strings actually begin with "ani", then this.(" a")[1]=="ni". 2 The db consisting of the 5 correspondences 2 2 {"animal", #1} 2 {"anime", #2} 2 {"anil", #3} 2 {"anile", #4} 2 {"banal", #5} 2 2 would be represented 2 2 this.(" ") =={"", "a", {"banal"}, {#5}} 2 this.(" a") =={"ni","lm", {}, {}} 2 this.(" anim")=={"", "", {"animal","anime"},{#1,#2}} 2 this.(" anil")=={"", "", {"anil","anile"}, {#3,#4}} 2 2 In some cases one may merely wish to hold a collection of strings without trying to associate a particular datum with each string. One may then instead set up a db without the fourth field on each of the properties. In this case the datum is taken to be the found string itself and that is what gets returned by :find*() in the event of a successful search. :find and :find_key are then equivalent as are :find_all and :find_all_keys. To setup the db this way, do a :clearall(3). :clearall(4) reverts to the above described type of db with a separately kept datum. Note that you can't change the type without emptying the db. 3 and 4 are currently the only db types allowed. 37 5 4 201 2 The Generic Editor enables a player to edit a list of strings. While one might contrive to use it directly, it is rather intended as a parent for some actual editor. It supplies the following commands: 2 2 say w*hat 2 emote abort 2 lis*t [] [nonum] q*uit,done,pause 2 ins*ert [] ["] 2 n*ext,p*rev [n] ["] 2 del*ete [] 2 f*ind /[/[c][]] 2 s*ubst //[/[g][c][]] 2 m*ove,c*opy [] to 2 join*l [] 2 fill [] [@] 2 2 $editor_help.(cmdname) descrbes cmdname 2 $editor_help.insert descrbes insertion points () 2 $editor_help.ranges descrbes range specifications () 2 2 You'll notice that nowhere does it say how to load in a given list of strings or how and where one may save said list away when one is done editing. These commands are supplied by the child editor object. The generic editor contains only the code for editing lines, though it defines additional functions for use by the children: 2 2 :loaded(player) 2 returns the index (player in this.active) iff text has been loaded 2 from somewhere, otherwise returns 0. 2 2 Note that, by default, there is a difference between 2 2 having nothing loaded (:text(who)==0) and 2 having loaded something with no text (:text(who)=={}). 2 2 If you don't care about this distinction in a particular case, 2 just do (player in this.active) instead of this:loaded(player). 2 If you don't want your editor to make this distinction at all, do 2 2 @stateprop texts={} for 2 2 which changes the initial value of :text() to {} 2 2 In all functions below, 'who' is the index returned by :loaded(player) 2 2 BTW, be careful about using 'player' in non-user (i.e., +x this-none-this) verbs --- much better to have the user verb get the index with :loaded() and then pass that around. 2 2 Also be careful about suspend() and verbs that call suspend(). In particular, the player's index in the .active list can change during the suspend interval, so you must be sure to obtain the index (e.g., using :loaded()) again after the suspend() returns. 2 2 For your non-user verbs, we have 2 2 :ok(who) 2 returns E_PERM if the caller is not an editor verb and E_RANGE 2 if 'who' does not point to a valid session. 2 2 which should take care of the more egregious security holes (but maybe not the less egregious ones). For getting and loading text, we have 2 2 :text(who) 2 the current text string list or 0 if nothing loaded yet. 2 :load(who,text) 2 loads the given list of strings as the text to be edited. 2 this also resets the 'changed' flag and pushes the insertion 2 point to the end. 2 2 and various flags and properties (all of the set_* routines return E_PERM when not called from an editor verb, E_RANGE if who is out of bounds, E_INVARG if something is wrong with the 2nd arg, or the new value, which may not necessarily be the same as the 2nd arg (e.g., set_insertion(..,37) on a 5 line text buffer returns 6). 2 2 :changed(who) 2 has the text been altered since the last save/load? 2 (the child editor gets to define what "save" means). 2 :set_changed(who,value) 2 Any child editor command that is considered to save the text should do a 2 :set_changed(who,0). 2 Note that if the changed flag is 0, the session will be flushed when 2 the player leaves the editor, so you may also want certain commands to 2 do set_changed(who,1)... 2 2 :origin(who) 2 room where the player came from. 2 :set_origin(who,room) 2 can be used to change the room the player will return to when finished 2 editing. Since origin gets set even in cases where the player teleports 2 into the editor you probably won't usually need to do this. 2 2 :insertion(who) 2 current insertion point. 2 :set_insertion(who,linenumber) 2 linenumber needs to be a positive integer and will get 2 2 :readable(who) 2 whether the current editing session has been made globally readable. 2 :set_readable(who,boolean) 2 change the readability of the current editing session. 2 This is used by the publish/perish verbs. 2 2 We also provide 2 2 :invoke(...) 2 If the player has a previous unsaved (i.e., :changed()!=0) 2 session, we return to it, moving the player to the editor. 2 If the player is already in the editor, this has no effect other 2 than to print a few nasty messages. In any case a :changed() 2 session must be aborted or set_changed(,0) before anything else 2 can be started 2 2 Otherwise, we pass the arguments (which are assumed to be the 2 result of some munging of the command line) to :parse_invoke(), 2 move the player to the editor and load whatever parse_invoke() 2 specified. The only interpretation the generic editor makes on 2 the arguments is that if the boolean value of the first is true, 2 this indicates that the player wanted to load something as 2 opposed to resume a previous session. Usually a command calling 2 :invoke will have a true (i.e., nonzero number, nonempty list or 2 string) first arg iff the command line is nonempty, in which case 2 'args' works fine for this purpose. 2 2 If the command parses sucessfully (:parse_invoke() returns a list), 2 we move the player to the editor if necessary and then call 2 :init_session() to set things up. 2 2 The child editor is assumed to provide 2 2 :parse_invoke(...) 2 given :invoke()'s arguments, determines what the player wants to edit. 2 It either returns 0 and reports syntax errors to player, 2 or it returns some list that :init_session() will understand. 2 2 :init_session(who,@spec) 2 where spec is something that was returned by :parse_invoke(). 2 Loads the text and sets the stateprops (below) to indicate that 2 we are working on whatever it is we're suppose to be working on. 2 2 :working_on(who) 2 returns a string X as in "You are working on X." 2 This is called by the 'w*hat' command, among other things. 2 2 Child editors may have their own properties giving state information for the various editing sessions. The value of each such property will be a list giving a value for each player in the editor. For each such property, you should, once the editor object has been created, initialize the property to {} and do one of 2 2 @stateprop for 2 @stateprop = for 2 (0 is the default ) 2 2 Henceforth, adding and deleting new editing sessions will amend the list held by the given property. The value of the property for a given session can be obtained via this.[player in this.active] and can be changed with a corresponding listset() call. The usual idiom for an editor command is 2 2 if(!(who=this:loaded(player))) 2 player:tell(nothing_loaded_msg()); 2 else 2 ... various references to this.[who] ... 2 endif 2 2 To remove such a property from the list of such state properties: 2 2 @rmstateprop from 2 2 Note that you can only do this with properties defined on the child editor itself. 2 2 Sometimes you may wish to @stateprop a new property on an editor where active editing sessions exist. @stateprop will fail if the property in question does not hold a list of the correct length (== length(editor.active); one value for each editing session). You need to either give the @flush command to clear out all sessions and boot all players currently in the editor or somehow manually initialize the property to a list of appropriate values and pray that nobody enters/exits the editor between the property initialization and the @stateprop command --- this problem can be avoided by doing an eval() that does all of the initializations (beware of suspends()) and calls :set_stateprops directly. 2 2 Incidentally, the @flush command may be used at any time to clean out the editor or to remove all sessions older than a given date. 2 2 There are also numerous _msg properties that may be customized 2 2 @depart announced at the origin when :invoke() is called. 2 @return announced at the origin the player is returned there. 2 @nothing_loaded printed when user attempts editing 2 before anything has been loaded. 2 @no_text response to 'list' when :text()=={} 2 @no_change printed by 'what' when :changed()==0 2 @change printed by 'what' when :changed()==1 2 @no_littering printed upon leaving the editor with :changed()==1. 2 @previous_session printed by :invoke() when player tries to start a 2 new session without aborting or saving the old one 2 2 The general procedure for creating a child editor: 2 2 . @create $generic_editor named 2 2 . define additional verbs/properties 2 At the very least you need 'edit' and 'save' commands. 2 Usually you can get away with just having 'edit' call :invoke(); 2 Presumably, you'll need at least a command to load text from somewhere 2 as well as a command to save it back out. 2 2 . define a verb (somewhere) to invoke the editor 2 This could be just a one-liner that calls :invoke(args,verb). 2 Either that or 2 . you have to set up an exit somewhere whose destination is 2 . you have to advertise the object number so that people can 2 teleport to it. 2 2 . @stateprop x for 2 2 . if you want the 'abort' command to boot the player from the editor do 2 .exit_on_abort = 1; 2 2 . set .commands to be the list of additional commands defined 2 by . 2 Each element of the list is itself a list of the form {name,args}. 2 set .commands2 to be the list of commands that should appear 2 in the `look' listing, and should be a list of strings appearing 2 as names in .commands on either or some editor ancestor. 2 look at $verb_editor or $note_editor for an example. 2 2 . If you want to have help text for new verbs you define, create a child of 2 $generic_help and add properties to this object for each of the topics 2 that you want to provide help text. 2 Finally, set .help = {this object} so that the help system 2 knows to consult this object. 37 5 4 84 2 The Help System 2 --------------- 2 When a player types help, the following list of objects is consulted for .help properties: the player itself, all ancestors of player up to and including $player, and, if the current location is a room, the current location together with all ancestors of the current location back to and including $room. Each help property should have as value either an object or a list of objects (otherwise we just ignore it). These objects are then strung together as a list of `help databases' to be searched in order for the requested topic. 2 2 A help database (in the sense of anything that is usable by $player:help()) is any object having the following three verbs: 2 2 :find_topics([string]) 2 where string is a supposed help topic, returns a list of strings, 2 i.e., actual help topics that this db knows about, or some boolean 2 false value in the event that this db is clueless... 2 If no arguments are given, this should return a list of all topics 2 in the db 2 2 :get_topic(string) 2 given one of the strings returned by :find_topics this either 2 returns a list of strings (text to be spewed to the player) or 2 returns 1 to indicate that it has already taken care of printing 2 information to the player. 2 2 :dump_topic(string) 2 like get_topic, but instead returns the raw text of a help topic 2 as a (download/upload) script 2 2 In short if :find_topic reports that a particular db knows about a given topic 2 it returns the full topic name, so that :get_topic may be called on it later. 2 :dump_topic is used by maintainers (see $wiz:@gethelp) to edit help topics. 2 2 $generic_help and $help 2 ----------------------- 2 The Generic Help Database, $generic_help, is the parent class of a particular kind of help database of which $help is an instance. On help databases of this type, every help topic has a corresponding property, interpreted as follows: 2 2 this.(topic) = string 2 one-line help text. 2 2 this.(topic) = {"**",@args} 2 call this:(args,dblist) to get text where dblist is the list of 2 help objects that would have been consulted had the topic not been found 2 on this object. 2 2 this.(topic) = other list of strings 2 multi-line help text 2 2 For the {"**",...} form, the current verbs available are 2 2 {"*forward*", topic, @rest} 2 - get help text for topic and then append the lines of `rest'. 2 rest may, in turn, begin with a "**"... 2 2 {"*pass*", topic, @rest} 2 - get help text for topic from the first help database after this one 2 that actually has help text for topic, and then append lines of `rest'. 2 As with "*forward*" rest may, in turn, begin with a "**"... 2 2 {"*subst*", @lines} 2 - All occurences of %[exp] in lines are replaced with the value of exp 2 which is assumed to evaluate to a string. 2 All lines beginning with %;exp are replaced with the value of exp 2 which is assumed to evaluate to a list of strings. 2 Evaluation is done using $no_one's permissions so exp in either case 2 can only refer to public information. 2 2 {"*index*", title} 2 - returns a list of all topics in this database, arranged in columns. 2 title is used as a heading for this index. 2 2 {"*objectdoc*", object} 2 - gets the documentation for the given object (i.e., object:help_msg()) 2 N.B. as with all other *verb* arguments, object must be a string. 2 2 {"*verbdoc*", object, verbname} 2 - gets the documentation for the named verb on the given object 2 (i.e., any strings at the beginning of said verbcode) 2 2 Individual help dbs are free to define additional verbs that may be used in this context. $help itself defines the following additional such verbs: 2 2 {"*index_list*"} 2 - returns a list of all index topics in all databases in the search list. 2 An index topic is one whose actual text is {"*index*", something}. 2 When creating a help db, you should be sure to make an index topic. 2 2 {"*full_index*"} 2 - prints indices for all help databases in the search list. 2 2 It should be noted (once again) that help databases need not be children of $generic_help, so long as they have :find_topics/:get_topic/:dump_topic working as specified above. 37 5 4 62 2 Generic Option Package 2 ---------------------- 2 It occasionally happens that one has a command or set of commands for which one wishes to provide several options/flags that a player can set to customize the command's behavior for him/herself. Making each option a separate property is a bit expensive, especially when the option in question is merely a boolean flag that gets set to false in most cases. This package provides an alternative, as well as providing a uniform set of commands for setting these flags/options and checking that the values given are of appropriate types. 2 2 Instead of needing several properties, only one is required to store a list containing values for all of the options. An "option package" (pkg, below) is then an object of this class, which provides routines for manipulating such lists. 2 2 The set of option names is divided into a set of "real" options, those whose names will actually appear in a given list, and "extras" which are either synonyms for or represent combinations of real options. 2 2 pkg:add_name(name) adds name to .names (remove it from .extras if there) 2 pkg:add_name(name,1) adds name to .extras (remove it from .names if there) 2 => 1 - ok, 0 - already added, E_INVARG - illegal name, E_PERM 2 2 pkg:remove_name(name) remove name from either .names or .extras 2 => 1 - ok, 0 - not present, E_PERM 2 2 For setting or retrieving values we have 2 2 pkg:get(options,name) 2 => value (or 0 if name isn't a real option) 2 pkg:set(options,name,value) 2 => revised options (or string error message if something goes wrong) 2 2 By default, a given option can only be a boolean flag, having one of the values 0 (absent from the list), or 1 (present in the list). :set translates 0/""/{} to 0 and any other non-object value to 1. 2 2 One may however designate a wider range of possible values for an option "foo" by either installing one of 2 2 pkg.type_foo 2 -- list of allowed types, 2 e.g., {NUM,STR} => must be a number or a string 2 e.g., {OBJ,{OBJ}} => must be an object or a list of objects 2 for anything fancier use: 2 2 pkg:check_foo(value) 2 => string error message or {value munged as desired} 2 2 In general, the only restriction on option values is that 0 is the only false value; setting an option to "" or {} sets it to 0. Every option defaults to 0, and no matter what you install as .type_foo or :check_foo(), 0 will always be a legal value for option "foo". 2 2 When presented with an option that is in .extras, :set will typecheck the value as described, however, then :actual(name, value) will be called to obtain a list of {name-of-real-option, value} pairs indicating which combination of real options should be set. 2 2 Other verbs 2 pkg:parse(args,...) 2 parses the command line arguments of a @whatever_option command 2 => {optionname, value} if the player wants to set an option 2 => {optionname} if the player wants to view an option 2 => string error message otherwise 2 2 one may install pkg:parse_foo to parse arguments for option "foo" 2 !foo => {"foo",0} (:parse_foo not called) 2 foo= => {"foo",0} (:parse_foo not called) 2 -foo => {"foo",0} (:parse_foo not called) 2 +foo => pkg:parse_foo("foo",1) 2 foo=word => pkg:parse_foo("foo","word") 2 foo word1 word2 => pkg:parse_foo("foo",{"word1","word2"}) 2 foo is word1 word2 => pkg:parse_foo("foo",{"word1","word2"}) 2 2 pkg:show(options,name|list of names) 2 => list of strings describing the current value of the named option(s). 2 calls pkg:show_foo(options,list of names) or 2 refers to pkg.show_foo 2 to describe option "foo" 2 2 (see sources for details... at some point I'll finish writing this... --Rog) 37 5 4 24 2 Message Sequences 2 ----------------- 2 A "message sequence" is a handle by which one may refer to a particular subset of a mail recipient's (player or $mail_recipient-descendant) saved messages. Routines like rcpt:display_seq_headers or rcpt:display_seq_full need to be supplied with message-sequence arguments to deterimine which headers or full-messages to display. 2 2 Message sequences can in turn be obtained from routines like rcpt:parse_message_seq, which takes a command-line description of a message sequence on that particular recipient and returns the corresponding message sequence handle. 2 2 The actual form of a message sequence (though you shouldn't actually need to make use of this) is that of a set of integers in the format used by $seq_utils (see `help $seq_utils'). It should however be noted that these integers are *not* themselves message numbers, but rather indices into the list of saved messages. For example, if a particular recipient holds 5 messages numbered 1,3,5,7,9. Then the message sequence handle representing messages 3,5,7 collectively, would be {2,5} which is $seq_utils-ese for the range 2..4, namely the second, third and fourth messages saved on that recipient. 2 2 The following verbs are available for obtaining indices to use in message sequences 2 2 :length_all_msgs() => total number of messages, or equivalently, 2 => index of last message 2 :length_num_le(n) => number of messages numbered <= n, or equivalently, 2 => index of highest numbered message <= n 2 :exists_num_eq(n) => 0 unless there exists a message numbered n in which 2 case we return the index of that message. 2 :length_date_le(date) => number of messages dated <= date, or equivalently, 2 => index of most recent message dated <= date 2 2 :length_date_gt(date) => number of messages dated > date 2 2 Note that r:length_date_gt(date) == r:length_all_msgs()-r:length_date_le(date). 2 The only reason :length_date_gt is provided as a separate routine is in order 2 to do quick checks for the existence of new mail (as @rn needs to do). 37 5 4 24 2 Read verbs 2 ---------- 2 The following verbs may be used to extract headers/messages from readable mail recipients/players; 2 2 :display_seq_headers (message sequence, current message number, last_read_date) 2 Does a @mail listing of the given message sequence. If current message 2 number is given and the sequence includes it, we mark it with a `>'. 2 Likewise if the sequence includes any new messages (i.e., dated after 2 last_read_date), these are also indicated as such. 2 2 display_seq_full (message sequence, preamble) 2 Does a @read listing of the given message sequence. Each message is preceded 2 by preamble. 2 => {new current message number, new last_read_date} 2 2 :messages_in_seq (index) 2 => {n, msg} 2 :messages_in_seq (message sequence) 2 => {{n_1,msg_1},{n_2,msg_2},...} 2 where the n_i are message numbers and the msg_i are messages in transmission 2 format (see `help mail-format') 2 2 :list_rmm () 2 Does an `@unrmm list' listing of messages in .messages_going 37 5 4 17 2 Write verbs 2 ----------- 2 The following verbs can be used to manipulate writable mail recipients/players: 2 2 :rm_message_seq (message sequence) 2 Does an @rmmail. Messages in message sequence are removed from this 2 recipient's saved .messages and written to .messages_going. 2 2 :undo_rmm () 2 Does an @unrmm. Messages in .messages_going are copied back to .messages. 2 2 :expunge_rmm () 2 Does an @unrmm expunge. Blows away .messages_going. 2 2 :renumber () 2 Does a @renumber. 2 37 5 4 25 2 Search verbs 2 ------------ 2 The following verbs can be used on a readable mail-recipient/player to search for messages with fields matching a given pattern. 2 2 from_msg_seq (objectid or list [,mask]) 2 => message sequence: messages from (one of) the given objectid(s) 2 2 %from_msg_seq (string or list [,mask]) 2 => message sequence: messages with (one of) the given string(s) 2 in the From: line 2 2 to_msg_seq (objectid or list [,mask]) 2 => message sequence: messages to (one of) the given objectid(s) 2 2 %to_msg_seq (string or list [,mask]) 2 => message sequence: messages with (one of) the given string(s) 2 in the To: line 2 2 subject_msg_seq (string [,mask]) 2 => message sequence: messages with given string occurring in Subject: 2 2 body_msg_seq (string [,mask]) 2 => message sequence: messages with given string occurring in body of message 2 2 In all cases `mask' is a message sequence which one may supply to limit the range of the search. One way of looking at it is that the message sequence to be returned is first intersected with mask. 37 5 4 43 2 The housekeeper is an object that can help keep other objects where they belong. New MOOs may want to add their own user interface for the housekeeper; here is some information that may be helpful. 2 2 To indicate what objects should be cleaned: 2 2 :add_cleanup(object[, requestor[, where]]) 2 Ask the housekeeper to clean 'object' for 'requestor' to 'where'. 2 Requestor defaults to 'player'. 2 Where defaults to object.location. 2 2 :remove_cleanup(what[, requestor]) 2 Remove 'what' from the cleanup list at 'requestor's request. 2 Will remove it only if 'requestor' made the original request and owns 2 the object or the destination. 2 2 To actually get the housekeeper to clean stuff up: 2 2 :cleanup([insist]) 2 Clean up player's objects. Argument is 'up' or 'up!' for manually 2 requested cleanups. 'up!' means to clean things even if it's against 2 the housekeeper's better judgement. 2 2 :replace(object[, insist]) 2 Clean up the indicated object. 'insist' is as in :cleanup. 2 2 :continuous() 2 Starts the housekeeper cleaning continuously, killing any previous 2 continuous task. This should be called only when starting up a new MOO, 2 or if something has gone wrong, as normally it will just keep going 2 without any help. 2 2 :litterbug() 2 Clean up all the places in housekeeper.public_places by getting rid of 2 all contents not in their .residents lists. This is called by 2 :continuous, so it doesn't need to be called directly. 2 2 To find out what's being cleaned to where for whom: 2 2 :cleanup_list([whom]) 2 Show 'player' the personal cleanup list for 'whom', or the housekeeper's 2 complete list if no argument is given. 2 2 :clean_status() 2 Show 'player' a brief summary of eir personal cleanup list. 37 5 4 28 2 $recycler 2 ========= 2 2 Rather than having the server built-in recycle() and create() functions handle the creation and destruction of objects, a recycling center has been created to simulate these actions by changing objects that would have been recycled into children of $garbage (The Generic Garbage Object) and making them owned by Hacker, and then when they're needed again, to avoid a raw create() command, those objects are given to whoever's asking for them. 2 2 Most Useful Verbs 2 ----------------- 2 2 $recycler:_recycle( object ) 2 This will effectively recycle an object. (As a point of fact, it changes ownership of the object to Hacker and makes the object a child of $garbage.) It handles .ownership_quota and .owned_objects properly. Generally, use this instead of a recycle() in your verbs. 2 2 $recycler:_create( parent object [ , new owner object ] ) 2 This effectively creates an object (with the specified parent, if possible, and with the specified owner, if possible; these are the same restrictions as on the server create() builtin). This is what should generally be used instead of create() in your programming. 2 2 $recycler:valid ( object ) 2 This is a variant of the server built-in valid() except that it handles the $garbage objects as well. It returns a 1 if the object specified -is- valid and is -not- a $garbage object. 2 2 Other Notes 2 ----------- 2 2 request from 2 This is not an internal verb (it's !x). It is, however, a command-line verb that can be used to request a specific object from the recycler. It's also useful for the creation of objects like a Magic Number Repository. When the object is removed from the recycler, the .announce_removal_msg is announced to the room if it's set (it's piped through $string_utils for pronoun substitution). 2 2 show-history 2 This is a wizardly verb which allows wizards to check the `history list' of the recycler. The history maintains the latest ($recycler.nhist) entries. 2 2 $recycler.orphans 2 This maintains a list of objects for which the recreation process got mangled. It ought to be checked every once in a while to see what's up. 2 1 4 10 2 $error 2 ====== 2 2 The Error Generator, $error, may be used to automatically generate errors. This is particularly useful if you are working in a !d verb but have occasion to -want- to crash with traceback. To raise a specific error, use $error:raise(error type) -- for example, $error:raise(E_PERM) will produce traceback resulting from a Permission Denied error. 2 2 Random notes about $error: 2 2 + The complete list of errors is stored in $error.names. 2 + The seemingly useless :accept() verb on $error is so that $error:E_RECMOVE and $error:E_NACC will be guaranteed success (success meaning, of course, a termination by traceback). 2 + There is, unfortunately, no way to raise the error E_NONE. 2 1 4 72 2 Generic BigList Utilities 2 ---------------------------- 2 $biglist is a collection of routines for maintaining huge persistent (sorted) lists in a format that is less likely to spam the server (which runs into a certain amount of trouble dealing with long ordinary lists --- btw we use `biglist' to refer to the huge data structure we're about to describe and `list' to refer to ordinary MOO lists {...}). The biglist in question lives on a particular object, to which we will refer in the discussion below as the `home' object, and its various elements appear as leaves of a tree whose nodes are kept in properties of the home object. It should be noted that the home object does not need to be (and in fact should *not* be) a descendant of $biglist one; $biglist merely provides utilities for manipulating the properties on the home object that are used in a particular biglist manipulation. 2 2 All of the utilities below refer to `caller' to locate the home object. Thus verbs to manipulate a given biglist must be located on or inherited by its home object itself. The home object needs to define the following verbs 2 2 :_make(@args) => new property on home object with value args 2 :_kill(prop) delete a given property that was created by :_make 2 :_get(prop) => home.prop 2 :_put(prop,@args) set home.prop = args 2 :_ord(element) given something that is of the form of a biglist element 2 return the corresponding ordinal (for sorting purposes). 2 If you never intend to use :find_ord, then this can be a 2 routine that always returns 0 or some other random value. 2 2 See $generic_biglist_home or $big_mail_recipient for examples. 2 2 Those of the following routines that take a biglist argument are expecting 2 either {} (empty biglist) or some biglist returned by one of the other routines 2 2 :length(biglist) => length(biglist) (i.e., number of elements) 2 :find_nth(biglist,n) => biglist[n] 2 :find_ord(biglist,k,comp) => n where n is 2 the largest such that home:(comp)(k,home:_ord(biglist[n])) is false, or 2 the smallest such that home:(comp)(k,home:_ord(biglist[n+1])) is true. 2 Always returns a value between 0 and length(biglist) inclusive. 2 This assumes biglist to be sorted in order of increasing :_ord values 2 with respect to home:(comp)(). 2 Standard situation is :_ord returns a number and comp is a < verb. 2 2 :start(biglist,s,e) => {biglist[s..?],@handle} or {} 2 :next(@handle) => {biglist[?+1..??],@newhandle} or {} 2 These two are used for iterating over a range of elements of a biglist 2 The canonical incantation for doing 2 for elt in (biglist[first..last]) 2 ... 2 endfor 2 is 2 handle = :start(biglist,first,last); 2 while(handle) 2 for elt in (handle[1]) 2 ... 2 endfor 2 handle = :next(@listdelete(handle,1)); 2 endwhile 2 2 The following all destructively modify their biglist argument(s) L (and M). 2 2 :set_nth(L,n,value) => L[n] = value 2 replaces the indicated element 2 2 :insert_before(L,M,n) => {@L[1..n-1],@M,@L[n..length(L)]} 2 :insert_after (L,M,n) => {@L[1..n], @M,@L[n+1..length(L)]} 2 takes two distinct biglists, inserts one into the other at the given point 2 returns the resulting consolidated biglist 2 2 :extract_range(L,m,n) => {{@L[1..m-1],@L[n+1..]}, L[m..n]} 2 breaks the given biglist into two distinct biglists. 2 2 :delete_range(L,m,n[,leafkiller]) => {@L[1..m-1],@L[n+1..]} 2 :keep_range (L,m,n[,leafkiller]) => L[m..n] 2 like extract_range only we destroy what we don't want. 2 2 :insertlast(L,value) => {@L,value} 2 inserts a new element at the end of biglist. 2 If find_ord is to continue to work properly, it is assumed that the 2 home:_ord(elt) is greater (comp-wise) than all of the :_ord values 2 of elements currently in the biglist. 2 2 :kill(L[,leafkiller]) 2 destroys all nodes used by biglist. 2 Calls home:leafkiller on each element. 37 1 4 17 2 $guest_log 2 2 records guest connect/disconnect events. 2 2 .max_events -- maximum number of connect/disconnect events kept 2 .connections -- actual list of events, the most recent ones first 2 each element is of the form 2 {object, is_connect, time, site} 2 object is the particular guest that (dis)connected 2 is_connect 1 or 0 according as this is a connect or not. 2 2 :find(who,when) 2 => site name of WHO at the particular time 2 (or 0 if WHO was not logged in then) 2 2 :last(n) 2 prints a listing of the last n events 37 5 4 2 2 *forward* 2 mail-resolve 37 5 5 37 5 5 37 4 4 1 2 Core Utility Help 37 5 2 Help database for LambdaCore utility objects and generics. 37 5 4 2 0 85172 0 780209092 37 1 #23 Programmer Help 16 2 -1 -1 -1 31 -1 22 2 errors 2 173 -1 prepositions 2 165 -1 57 @check-property @check-chparent @egrep regular-expressions @show @grep prog-index help prepositions ; utilities truth tasks statements programming precedence language functions expressions eval errors @verb @setenv @rmverb @rmproperty @prospectus @property @program @list @kill @kids @forked @display @dbsize @copy @chparent @chmod @args .program @clearproperty @disown @disinherit @displayoptions @display-options @add-feature @remove-feature features examine mail # @programmer-options @programmeroptions @progoptions @prog-options options utils @measure 62 4 2 2 *forward* 2 @check-chparent 2 5 4 10 2 Syntax: @check-property . 2 @check-chparent to 2 2 You cannot add a new property to an object if an ancestor or a descendant already defines a property with the same name. @check-property will give you the list of all descendants of that that define .. 2 2 Likewise you cannot chparent an object to a new parent if the new parent has a property that is also defined on the object or some descendant. Use @check-chparent to find out all instances of conflicting properties that would interfere with @chparent in this manner. 2 2 Note that @check-property requires either that you own the object or that it be writeable, the same conditions that need to hold if you are to create new properties on the object. Similarly, @check-chparent requires that you own the object and that the new parent is either fertile or likewise owned by you. 2 2 For objects with large numbers of descendants, these commands can be time-consuming. 2 5 4 2 2 *forward* 2 @grep 2 5 4 162 2 Regular expression matching allows you to test whether a string fits into a specific syntactic shape. You can also search a string for a substring that fits a pattern. See also the built-in function match()/rmatch(). 2 2 A regular expression describes a set of strings. The simplest case is one that describes a particular string; for example, the string `foo' when regarded as a regular expression matches `foo' and nothing else. Nontrivial regular expressions use certain special constructs so that they can match more than one string. For example, the regular expression `foo%|bar' matches either the string `foo' or the string `bar'; the regular expression `c[ad]*r' matches any of the strings `cr', `car', `cdr', `caar', `cadddar' and all other such strings with any number of `a''s and `d''s. 2 2 Regular expressions have a syntax in which a few characters are special constructs and the rest are "ordinary". An ordinary character is a simple regular expression that matches that character and nothing else. The special characters are `$', `^', `.', `*', `+', `?', `[', `]' and `%'. Any other character appearing in a regular expression is ordinary, unless a `%' precedes it. 2 2 For example, `f' is not a special character, so it is ordinary, and therefore `f' is a regular expression that matches the string `f' and no other string. (It does *not*, for example, match the string `ff'.) Likewise, `o' is a regular expression that matches only `o'. 2 2 Any two regular expressions A and B can be concatenated. The result is a regular expression which matches a string if A matches some amount of the beginning of that string and B matches the rest of the string. 2 2 As a simple example, we can concatenate the regular expressions `f' and `o' to get the regular expression `fo', which matches only the string `fo'. Still trivial. 2 2 The following are the characters and character sequences that have special meaning within regular expressions. Any character not mentioned here is not special; it stands for exactly itself for the purposes of searching and matching. 2 2 `.' is a special character that matches any single character. Using 2 concatenation, we can make regular expressions like `a.b', which matches 2 any three-character string that begins with `a' and ends with `b'. 2 2 `*' is not a construct by itself; it is a suffix that means that the preceding 2 regular expression is to be repeated as many times as possible. In `fo*', 2 the `*' applies to the `o', so `fo*' matches `f' followed by any number of 2 `o''s. 2 2 The case of zero `o''s is allowed: `fo*' does match `f'. 2 2 `*' always applies to the *smallest* possible preceding expression. Thus, 2 `fo*' has a repeating `o', not a repeating `fo'. 2 2 The matcher processes a `*' construct by matching, immediately, as many 2 repetitions as can be found. Then it continues with the rest of the 2 pattern. If that fails, it backtracks, discarding some of the matches of 2 the `*''d construct in case that makes it possible to match the rest of 2 the pattern. For example, matching `c[ad]*ar' against the string 2 `caddaar', the `[ad]*' first matches `addaa', but this does not allow the 2 next `a' in the pattern to match. So the last of the matches of `[ad]' is 2 undone and the following `a' is tried again. Now it succeeds. 2 2 `+' is like `*' except that at least one match for the preceding pattern is 2 required for `+'. Thus, `c[ad]+r' does not match `cr' but does match 2 anything else that `c[ad]*r' would match. 2 2 `?' is like `*' except that it allows either zero or one match for the 2 preceding pattern. Thus, `c[ad]?r' matches `cr' or `car' or `cdr', and 2 nothing else. 2 2 `[ ... ]' 2 `[' begins a "character set", which is terminated by a `]'. In the 2 simplest case, the characters between the two brackets form the set. 2 Thus, `[ad]' matches either `a' or `d', and `[ad]*' matches any string of 2 `a''s and `d''s (including the empty string), from which it follows that 2 `c[ad]*r' matches `car', etc. 2 2 Character ranges can also be included in a character set, by writing two 2 characters with a `-' between them. Thus, `[a-z]' matches any lower-case 2 letter. Ranges may be intermixed freely with individual characters, as in 2 `[a-z$%.]', which matches any lower case letter or `$', `%' or period. 2 2 Note that the usual special characters are not special any more inside a 2 character set. A completely different set of special characters exists 2 inside character sets: `]', `-' and `^'. 2 2 To include a `]' in a character set, you must make it the first character. 2 For example, `[]a]' matches `]' or `a'. To include a `-', you must use it 2 in a context where it cannot possibly indicate a range: that is, as the 2 first character, or immediately after a range. 2 2 `[^ ... ]' 2 `[^' begins a "complement character set", which matches any character 2 except the ones specified. Thus, `[^a-z0-9A-Z]' matches all characters 2 *except* letters and digits. 2 2 `^' is not special in a character set unless it is the first character. 2 The character following the `^' is treated as if it were first (it may be 2 a `-' or a `]'). 2 2 `^' is a special character that matches the empty string -- but only if at the 2 beginning of the string being matched. Otherwise it fails to match 2 anything. Thus, `^foo' matches a `foo' which occurs at the beginning of 2 the string. 2 2 `$' is similar to `^' but matches only at the *end* of the string. Thus, 2 `xx*$' matches a string of one or more `x''s at the end of the string. 2 2 `%' has two functions: it quotes the above special characters (including `%'), 2 and it introduces additional special constructs. 2 2 Because `%' quotes special characters, `%$' is a regular expression that 2 matches only `$', and `%[' is a regular expression that matches only `[', 2 and so on. 2 2 For the most part, `%' followed by any character matches only that 2 character. However, there are several exceptions: characters that, when 2 preceded by `%', are special constructs. Such characters are always 2 ordinary when encountered on their own. 2 2 No new special characters will ever be defined. All extensions to the 2 regular expression syntax are made by defining new two-character 2 constructs that begin with `%'. 2 2 `%|' specifies an alternative. Two regular expressions A and B with `%|' in 2 between form an expression that matches anything that either A or B will 2 match. 2 2 Thus, `foo%|bar' matches either `foo' or `bar' but no other string. 2 2 `%|' applies to the largest possible surrounding expressions. Only a 2 surrounding `%( ... %)' grouping can limit the grouping power of `%|'. 2 2 Full backtracking capability exists for when multiple `%|''s are used. 2 2 `%( ... %)' 2 is a grouping construct that serves three purposes: 2 2 1. To enclose a set of `%|' alternatives for other operations. Thus, 2 `%(foo%|bar%)x' matches either `foox' or `barx'. 2 2 2. To enclose a complicated expression for a following `*', `+', or `?' 2 to operate on. Thus, `ba%(na%)*' matches `bananana', etc., with any 2 number of `na''s, including none. 2 2 3. To mark a matched substring for future reference. 2 2 This last application is not a consequence of the idea of a parenthetical 2 grouping; it is a separate feature that happens to be assigned as a second 2 meaning to the same `%( ... %)' construct because there is no conflict in 2 practice between the two meanings. Here is an explanation of this 2 feature: 2 2 `%DIGIT' 2 After the end of a `%( ... %)' construct, the matcher remembers the 2 beginning and end of the text matched by that construct. Then, later on 2 in the regular expression, you can use `%' followed by DIGIT to mean 2 "match the same text matched by the DIGIT'th `%( ... %)' construct in the 2 pattern." The `%( ... %)' constructs are numbered in the order that their 2 `%(''s appear in the pattern. 2 2 The strings matching the first nine `%( ... %)' constructs appearing in a 2 regular expression are assigned numbers 1 through 9 in order of their 2 beginnings. `%1' through `%9' may be used to refer to the text matched by 2 the corresponding `%( ... %)' construct. 2 2 For example, `%(.*%)%1' matches any string that is composed of two 2 identical halves. The `%(.*%)' matches the first half, which may be 2 anything, but the `%1' that follows must match the same exact text. 2 2 `%b' matches the empty string, but only if it is at the beginning or end of a 2 word. Thus, `%bfoo%b' matches any occurrence of `foo' as a separate word. 2 `%bball%(s%|%)%b' matches `ball' or `balls' as a separate word. 2 2 For the purposes of this construct and the five that follow, a word is 2 defined to be a sequence of letters and/or digits. 2 2 `%B' matches the empty string, provided it is *not* at the beginning or end of 2 a word. 2 2 `%<' matches the empty string, but only if it is at the beginning of a word. 2 2 `%>' matches the empty string, but only if it is at the end of a word. 2 2 `%w' matches any word-constituent character (i.e., any letter or digit). 2 2 `%W' matches any character that is not a word constituent. 2 5 4 7 2 Syntax: @show 2 @show . 2 @show : 2 2 Displays quite detailed information about an object, property or verb, including its name, owner, permission bits, etc. The information displayed for an object can be quite long. 2 2 See also @display, which displays different information and is controlled differently. 2 5 4 9 2 Syntax: @grep in 2 @grep in {} 2 2 @egrep in 2 @egrep in {} 2 2 These are named for the corresponding unix utilities. 2 @grep searches the given object(s) for verbs whose verbcode contains the given string as a substring of one of its lines. 2 @egrep searches the given object(s) for verbs whose verbcode contains a substring matching the given regular expression (see `help regular-expressions'). 2 5 4 2 2 *index* 2 Programmer Help Topics 2 5 4 15 2 *pass* 2 help 2 2 For programmers, the help system provides the following additional forms: 2 2 help object:verbname -- prints any documentation strings that are present 2 at the beginning of the program for that verb. 2 help $_utils -- prints general information about one of the 2 $..._utils objects (e.g., $string_utils, 2 $list_utils, etc...), which are all libraries 2 of generally used verbs. 2 help builtin() -- prints documentation from the programmers manual 2 about the named primitive, for example length() 2 2 For information about how the help system itself works and about how to associate local help databases with specific rooms or player classes, see `help $help'. 2 5 4 3 2 *prepositions* 2 The complete list of prepositions recognized by the command-line parser: 2 2 5 4 2 2 *forward* 2 eval 37 1 4 17 2 The core database has a number of objects serving as libraries of useful verbs. 2 More detailed information can be obtained for (some of) these, via `help $whatever_utils' 2 2 $building_utils -- 2 $code_utils -- parsing and manipulating verb code 2 $command_utils -- reporting matching errors to the player 2 $gender_utils -- managing gendered objects 2 $list_utils -- list manipulation 2 $set_utils -- set manipulation 2 $lock_utils -- key expression manipulation 2 $match_utils -- 2 $object_utils -- object information 2 (inheritance/location hierarchy, verb/property lists) 2 $perm_utils -- permissions 2 $string_utils -- string manipulation 2 $time_utils -- time (numeric and verbal) manipulation 2 $trig_utils -- trigonometric and other numerical utilities 2 5 4 5 2 Several kinds of statements, expressions, and functions in the MOO programming language use a notion that some MOO values are 'true' and others 'false'. 2 2 The only values that are considered true are non-zero numbers, non-empty strings, and non-empty lists. 2 2 All other values (i.e., 0, "", {}, objects, and errors) are considered false. 37 1 4 17 2 A task is an execution of a MOO program. There are five ways for tasks to be created in LambdaMOO: 2 + Every time a player types a command, a task is created to execute that command; we call these 'command tasks'. 2 + Whenever a player connects or disconnects from the MOO, the server starts a task to do whatever processing is necessary, such as printing out 'Munchkin has connected' to all of the players in the same room; these are called 'server tasks'. 2 + The FORK statement in the programming language creates a task whose execution is delayed for at least some given number of seconds; these are 'forked tasks'. 2 + The suspend() function suspends the execution of the current task. A snapshot is taken of whole state of the execution, and the execution will be resumed later. These are called `suspended tasks'. 2 + The read() function also suspends the execution of the current task, in this case waiting for the player to type a line of input. When the line is received, the task resumes with the read() function returning the input line as result. These are called `reading tasks'. 2 2 The last three kinds of tasks above are collectively known as `queued tasks' or `waiting tasks', since they may not run immediately. 2 2 To prevent a maliciously- or incorrectly-written MOO program from running forever and monopolizing the server, limits are placed on the running time of every task. One limit is that no task is allowed to run longer than 15 seconds; this limit is, in practice, never reached. The reason is that there is a second limit on the number of operations a task may execute. 2 2 The server counts down 'ticks' as any task executes. Roughly speaking, it counts one tick for every expression evaluation (other than variables and literals), one for every `if', `fork' or `return' statement, and one for every iteration of a loop. If the count gets all the way down to zero, the task is immediately and unceremoniously aborted. All tasks begin or resume with an store of 30,000 ticks; this is enough for almost all normal uses. 2 2 Because queued tasks may exist for long periods of time before they begin execution, there are commands to list the ones that you own and to kill them before they execute. These commands are covered in the following help topics: 2 2 @forked -- listing the forked tasks that you own 2 @kill -- killing a particular forked task 37 1 4 36 2 The following kinds of statements exist in the MOO programming language: 2 2 ; 2 The null statement does nothing. 2 2 expression ; 2 The expression statement evaluates the expression and then discards the value. 2 2 IF ( expression ) statements ENDIF 2 IF ( expression ) statements ELSE statements ENDIF 2 IF ( expression ) 2 statements 2 ELSEIF ( expression ) 2 statements 2 ... 2 ELSE 2 statements 2 ENDIF 2 The conditional statement evaluates each expression in turn and executes the statements associated with the first one to return a true value; the ELSE statements are executed if none of the expressions returns a true value. There can be any number of ELSEIF clauses and the ELSE part is optional. See 'help truth' for the definition of 'true value'. 2 2 FOR name IN ( expression ) statements ENDFOR 2 The list iteration statement first evaluates the expression, which must return a list. It then executes the statements once for each element of that list, each time with the named variable having the value of the corresponding list element. 2 2 FOR name IN [ expression .. expression ] statements ENDFOR 2 The numeric iteration statement first evaluates the two expressions, both of which must return numbers; call those numbers N1 and N2, respectively. The statements are then executed once for each integer I such that N1 <= I <= N2, in increasing order; each time, the named variable has the corresponding value of I. 2 2 WHILE ( expression ) statements ENDWHILE 2 The indefinite iteration statement repeatedly evaluates the expression and, each time it returns a true value, executes the statements. The loop stops the first time that the expression returns a false value. The definitions of 'true' and 'false' values is in 'help truth'. 2 2 RETURN ; 2 RETURN expression ; 2 The return statement evalautes the expression, if any, and returns the resulting value (or 0 if there is no expression) to the verb that called the current one. Execution of the current verb is immediately terminated. 2 2 FORK ( expression ) statements ENDFORK 2 FORK name ( expression ) statements ENDFORK 2 The fork statement first executes the expression, which must return a number; call that number N. It then creates a new MOO task that will, after at least N seconds, execute the statements. When the new task begins, all variables will have the values they had at the time the FORK statement was executed. The task executing the FORK statement immediately continues execution. If a variable name is given after the FORK keyword, then it is assigned the 'queue ID' of the newly-created task. The value of this variable is visible both to the task executing the fork statement and to the statements in the newly-created task. See 'help tasks' for more information about forked tasks. 37 1 4 26 2 MOO contains a rich programming language for the creation of interesting rooms, exits, and other objects. Help is available on the following topics concerning programming in MOO: 2 2 language -- a brief reference for the syntax and semantics of the MOO language 2 tasks -- a brief description of MOO tasks and their resource limits 2 2 @property -- adding a property to an object 2 @rmproperty -- removing a property from an object 2 2 @verb -- adding a verb to an object 2 @rmverb -- removing a verb from an object 2 @args -- changing the syntax of a verb 2 @copy -- copying a verb from one object to another 2 2 .program/@program -- entering the program for a verb 2 @list -- printing a listing of the program for a verb 2 @edit -- editing verb code 2 2 @show -- looking at all the details of an object, a property, or a verb 2 @parents -- listing the ancestors of an object 2 @kids -- listing the children of an object 2 @contents -- listing the contents of an object 2 @chmod -- changing the permissions on an object, a property, or a verb 2 @chparent -- changing the parent of an object 2 @rename -- changing the name of a verb or object 2 2 eval -- executing MOO statements and expressions without writing a verb 37 1 4 17 2 The table below gives the relative precedence of all of the MOO operators; operators on higher lines in the table have higher precedence and those on the same line have identical precedence: 2 2 ! - (without a left operand) 2 * / % 2 +- 2 == != < <= > >= in 2 && || 2 ... ? ... | ... (the conditional expression) 2 = 2 2 Thus, the horrendous expression 2 2 x = a < b && c > d + e * f ? w in y | - q - r 2 2 would be grouped as follows: 2 2 x = (((a < b) && (c > (d + (e * f)))) ? (w in y) | ((- q) - r)) 37 1 4 5 2 The MOO programming language is described in excruciating detail in the LambdaMOO Programmer's Manual, available for FTP from parcftp.xerox.com in the file pub/MOO/ProgrammersManual.txt. The online help consists of a few quick reference guides here in the help system under the following topics: 2 2 statements -- the syntax and semantics of the various kinds of MOO statements 2 expressions -- the same for the various kinds of MOO expressions 2 functions -- a list of the primitive functions available to MOO programs 37 1 4 93 2 There are many, many built-in functions available to MOO programmers. The following list gives a brief summary of the arguments and purpose of each function; for more information, see the LambdaMOO Programmer's Manual. 2 2 pass(arg, ...) -- calling a verb defined on this object's parent 2 eval(string) -- parsing and executing strings as MOO code 2 notify(player, string) -- sending text to a player's terminal 2 read() -- reading a line of input from the player (*) 2 output_delimiters(player) -- return {prefix,suffix} set by PREFIX/SUFFIX cmds 2 2 typeof(value) -- determining the data type of a value 2 tostr(value, ...) -- converting any set of values into a string 2 tonum(value) -- converting any non-list value into a number 2 toobj(value) -- converting any non-list value into an object 2 length(value) -- returns the length of a string or list 2 2 listappend(list, value [, index]) -- adding an element at the end of a list 2 listinsert(list, value [, index]) -- adding an element at the head of a list 2 listset(list, value, index) -- updating a list at some index 2 listdelete(list, index) -- removing an element from a list 2 setadd(list, element) -- adding an element to a set represented as a list 2 setremove(list, element) -- removing an element from such a set 2 2 min(n1, n2, ...) -- minimum of n1,n2,... 2 max(n1, n2, ...) -- maximum of n1,n2,... 2 abs(n) -- absolute value of n 2 sqrt(n) -- square root of n, rounded down 2 random(n) -- random integer between 1 and n inclusive 2 time() -- current time in seconds since midnight GMT, 1 Jan 70 2 ctime([time]) -- time (or current time) converted to a human-readable string 2 index(str1, str2 [, case-matters]) -- index of first str2 in str1 2 rindex(str1, str2 [, case-matters]) -- index of last str2 in str1 2 strcmp(str1, str2) -- case-sensitive string comparison 2 strsub(subject, what, with [, case-matters]) -- substitution in a string 2 crypt(string [, salt]) -- one-way string encryption 2 match(str1, str2 [, case-matters]) -- match first regular expr str2 in str1 2 rmatch(str1, str2 [, case-matters]) -- match last regular expr str2 in str1 2 substitute(template, subs) -- perform substitutions on template 2 2 valid(object) -- testing whether an object exists 2 create(parent [, owner(*)])-- creating a new MOO object 2 recycle(object) -- destroying a MOO object 2 move(object, where) -- altering the object-containment hierarchy 2 chparent(object, new-parent) -- altering the object-inheritance hierarchy 2 parent(object) -- object's parent in the inheritance hierarchy 2 children(object) -- object's children in the inheritance hierarchy 2 max_object() -- the highest-numbered object in the MOO 2 renumber(obj) -- changes an object's number to lowest available one (*) 2 reset_max_object() -- resets max_object() to the largest valid object (*) 2 2 properties(object) -- a list of the properties defined on an object 2 add_property(object, prop-name, value, info) -- add a new property 2 delete_property(object, prop-name) -- remove a property 2 property_info(object, prop-name) -- {owner, perms} info on a property 2 set_property_info(object, prop-name, info) -- setting same 2 is_clear_property(object, prop-name) -- find out if a property is "clear" 2 clear_property(object, prop-name) -- make a property "clear" 2 2 verbs(object) -- a list of the verbs defined on an object 2 add_verb(object, info, args) -- add a verb to an object 2 delete_verb(object, verb-name) -- remove a verb from an object 2 verb_info(object, verb-name) -- {owner, perms, names} info for a verb defn. 2 verb_args(object, verb-name) -- {dobj, prep, iobj} argument info for a verb 2 verb_code(object, verb-name [, fully-paren [, indent]]) -- program listing 2 set_verb_info(object, verb-name, {owner, perms, names}) 2 set_verb_args(object, verb-name, {dobj, prep, iobj}) 2 set_verb_code(object, verb-name, {line, line, ...}) 2 2 is_player(object) -- testing whether or not object is a player 2 players() -- a list of all players, active or not 2 connected_players() -- a list of all currently-connected players 2 idle_seconds(player) -- seconds since given player typed anything 2 connected_seconds(player) -- seconds given player has been logged in 2 boot_player(player) -- disconnect player from the MOO immediately(*) 2 set_player_flag(player, value) -- set/clear player bit; boot player if clear(*) 2 connection_name(player) -- a server-assigned name for player's connection 2 open_network_connection(@args) -- open a connection to another network site 2 2 caller_perms() -- the player whose permissions your caller was using 2 set_task_perms(player) -- changing permissions of the running task (*) 2 callers() -- list of {obj, verb, owner, vloc, player}: this task's stack 2 suspend(secs) -- suspending the current task for a number of seconds 2 seconds_left() -- number of seconds left in the current task 2 ticks_left() -- number of ticks left in the current task 2 task_id() -- a random number representing the currently-running task 2 queued_tasks() -- list of {id,start,0,20000,owner,obj,verb,line,this} 2 kill_task(id) -- delete one of your tasks from the queue 2 2 server_log(string) -- add a comment to the server log file 2 server_version() -- a string of three numbers "major.minor.release" 2 memory_usage() -- {{blocksize, nused, nfree}, ...}, the server's memory stats 2 shutdown(msg) -- print msg and kill the server (*) 2 dump_database() -- what it says (*) 2 2 (*) => as you might have expected, these usually require wizard permissions. 37 1 4 69 2 The following kinds of expressions exist in the MOO programming language: 2 2 number 2 # number 2 # - number 2 "character string" 2 error-name 2 Literal expressions return the obvious values: numbers, object numbers, strings, and errors. 2 2 { expression , expression , ... , expression } 2 The list-construction expression evaluates the each of the expressions in turn and returns a list whose elements are the results of those expressions. Any of the expressions may be prefixed with an at-sign ('@'); in this case, that expression must return a list and, rather than that list becoming an element of the final list, its elements are spliced into the final list. 2 2 name 2 Variable expressions return the current value of the named variable. Variable names must start with a letter or underscore ('_') and contain only letters, digits, and underscores. The following variables are predefined: 2 OBJ, STR, LIST, ERR, NUM 2 player, caller, this, verb, args 2 argstr, dobj, dobjstr, prepstr, iobj, iobjstr 2 Their initial values are described in detail in the LambdaMOO Programmer's Manual. 2 2 expression . name 2 expression . ( expression ) 2 $ name 2 Property-reading expressions return the current value of a named property on the object that is the value of the first subexpression. In the second form, the second subexpression must return a string, the name of the property to be read. The third form is an abbreviation for '#0.name'. 2 2 expression : name ( arguments ) 2 expression : ( expression ) ( arguments ) 2 Verb-call expressions invoke a named verb on the object that is the value of the first subexpression, passing the given arguments. In the second form, the second subexpression must return a string, the name of the verb to invoke. The syntax and semantics of arguments is exactly as in the list-construction expression but no initial or final curly-braces ('{' or '}') are used. 2 2 function ( arguments ) 2 The function-call expression invokes one of the MOO primitive functions, as listed in 'help functions', passing the given arguments. 2 2 expression [ expression ] 2 The indexing expression first evaluates the two subexpressions; call their values S and N, respectively. S must be a string or a list and N must be a number between 1 and the length of S, inclusive. The Nth element of S is returned. The elements of a string are themselves one-character strings. 2 2 expression [ expression .. expression ] 2 The subsequence expression first evaluates the three subexpressions; call their values S, N1, and N2, respecitively. S must be a string or a list and N1 and N2 must be numbers. If N1 <= N2, then both must be between 1 and the length of S, inclusive; the subsequence of S beginning at index N1 and continuing through index N2 is returned. If N1 > N2, the empty sequence of the same type as S is returned, either "" or {}. 2 2 name = expression 2 expression . name = expression 2 expression . ( expression ) = expression 2 $ name = expression 2 Assignment expressions give new values to variables and object properties. For the second and third forms, the expressions on the left-hand side of the '=' are evaluated first. Then the right-hand side expression is evaluated and result is stored in the indicated variable or object property. 2 2 expression + expression 2 expression - expression 2 expression * expression 2 expression / expression 2 expression % expression 2 - expression 2 The arithmetic expressions evaluate the subexpressions, all of which must return numbers, and then perform addition, subtraction, multiplication, division, remaindering, or negation, respectively. For addition, the subexpressions may both return strings as well; in this case, the result is the concatenation of the two strings. 2 2 expression == expression 2 expression != expression 2 expression < expression 2 expression <= expression 2 expression > expression 2 expression >= expression 2 The comparison expressions evaluate the subexpressions and then test whether or not the first result is equal to, unequal to, less than, less than or equal to, greater than, or greater than or equal to the second result, respectively. If the indicated relation holds then they return 1 and otherwise they return 0. Comparisons of strings are performed case-insensitively, those of lists are performed on an element-by-element basis, objects are compared by their object numbers, and errors by an ordering given in the LambdaMOO Programmer's Manual. 2 2 expression ? expression | expression 2 expression && expression 2 expression || expression 2 ! expression 2 The logical expressions each return results based upon the truth value of their first subexpression; call the value of this expression X. The first of these returns the value of the second subexpression if X is a true value and that of the third expression if X is a false value; the unused subexpression is not evaluated. The definitions of 'true value' and 'false value' are given in 'help truth'. The expression 'E1 && E2' is an abbreviation for 'E1 ? E2 | E1' except that E1 is only evaluated once. The expression 'E1 || E2' is an abbreviation for 'E1 ? E1 | E2' except that E1 is only evaluated once. The expression '! E' is an abbreviation for 'E ? 0 | 1'. 2 2 expression IN expression 2 The list-membership expression first evaluates both subexpressions; call their values E and L, respectively. L must be a list. If E is an element of L, then the index of the first occurence of E in L is returned. If E is not an element of L, then 0 is returned. 2 2 The method for disambiguating the meaning of a complex MOO expression in the absence of sufficient parentheses is described in 'help precedence'. 37 1 4 37 2 Syntax: eval 2 ; 2 eval-d 2 2 Evaluates the given piece of MOO code and prints the resulting value. If the MOO code begins with one of the MOO language keywords ('if', 'for', 'while', 'fork', or 'return') or with the character ';', then the entire piece of code is treated as the program for a verb, with ';' appended to the end. Otherwise, 'return' is appended to the front and ';' is appended to the end and that string is treated as the code for a verb. In either case, the resulting verb is invoked and whatever value it returns is printed. 2 2 For programmers, this is such a mind-bogglingly useful thing to do that there is a simple abbreviation for this command; any command beginning with a semicolon (';') is treated as a use of 'eval'. 2 2 Eval treats specially a duplicated semicolon at the beginning. It enables you to make multi-statement programs within eval (but does not by default print the return value). 2 2 Eval-d (no ";" abbreviation for this) evaluates the following text exactly as eval, except that the "d" debug flag (see programmer's manual for explanation) is turned off. Thus errors will cause an error return value rather than a traceback. 2 2 If you set the programmer option `eval_time' to 1 (see `help @prog-options'), then eval will print out how many ticks and seconds the program required. 2 2 Examples: 2 eval 3 + 4 2 => 7 2 ;3+4 2 => 7 2 ;for x in (player.aliases) player:tell(x); endfor 2 Haakon 2 Wizard 2 ArchWizard 2 => 0 2 ;;l = {}; for i in [1..10] l = {@l, i}; endfor return l 2 => {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} 2 eval-d 8 + "foo" 2 => E_TYPE (Type mismatch) 2 2 You may customize your evaluation environment. The player property .eval_env may contain statements to be executed prior to any evaluated program. Two caveats: This will throw off the tick count. You can account for additional ticks inserted by your environment with the .eval_ticks property; just set it to the number of ticks you'd like subtracted from the total. Additionally, if you make a syntax error in your program, the line reported will be wrong (it will count those initial statements), and if you make an error in the eval_env itself, you can be in deep trouble. Despite these drawbacks, the eval_env property can be quite useful. The following is a sample: 2 2 Eval_env: "me=player;here=player.location;" 2 eval_ticks: 3 2 2 See also @setenv. 2 2 You can also define textual substitutions in a separate property, called eval_subs. These are discouraged, however, for anything that can be done with variable assignments, because the overhead of replacing the strings in the evaluated program is significant. However, some things, such as substituting characters which can't be typed easily on one keyboard (e.g. "[]" is difficult to type on some IBM keyboards), can only be done by textual substitutions. Note that the eval substitutions are also interpreted by the verb editor when "eval_subs" is selected in your .edit_options property (see `help editors'). This adds to their overhead, but again, makes it possible for people to program who otherwise can't type the full character set. Remember: Don't use eval_subs unless you really have to! 37 1 4 3 2 *errors* 2 The complete list of error codes: 2 2 5 4 17 2 Syntax: @verb : 2 @verb : [ []] 2 2 Adds a new verb with the given name(s) to the named object. If there are multiple names, they should be separated by spaces and all enclosed in quotes: 2 2 @verb foo:"bar baz mum*ble" 2 2 The direct and indirect object specifiers ( and ) must be either 'none', 'this', or 'any'; their meaning is discussed in the LambdaMOO Programmer's Manual. The preposition specifier () must be either 'none', 'any', or one of the prepositional phrases listed in `help prepositions' (a prepositional phrase with more than one word must be enclosed in quotes ("")). All three specifiers default to 'none'. 2 2 It is also possible to specify the new verb's permissions and owner as part of the same command (rather than having to issue separate @chmod/@chown commands) 2 2 @verb : 2 @verb : 2 2 are as with @chmod, i.e., must be some subset of "rwxd". They default to "rd" (specifying "w" for a verb is highly inadvisable). The owner defaults to the player typing the command; only wizards can create verbs with owners other than themselves. 2 2 You may also use "tnt" in place of "this none this" for the dobj prep iobj arguments. "this none this" is used to indicate non-command verbs, since the parser can't possibly interpret a command as "this none this". For these verbs, the permissions default to "rxd"; the "x" bit is set so that they can be called from other programs. (If they couldn't be used as commands, and they couldn't be called from programs, they wouldn't be good for anything!) 37 1 4 10 2 Syntax: @setenv 2 2 Defines the environment for eval (property player.eval_env). See "help eval" 2 for more information. This is mostly useful when one's .eval_env is broken 2 and prevents one from using eval to reset it. 2 2 Example: 2 2 @setenv me=player;here=player.location; 2 37 1 4 7 2 Syntax: @rmverb : 2 @rmverb : 2 2 Removes the named verb from the named object. 2 If there is more than one verb matching the given verb-name, this removes the most recently defined one. 2 2 With the 2nd form of the command the verb removed is the most recent one matching both the given verb-name *and* the given dobj/prep/iobj specifiers. 2 5 4 3 2 Syntax: @rmproperty . 2 2 Removes the named property from the named object. '@rmproperty' may be abbreviated as '@rmprop'. 2 5 4 29 2 Usage: @prospectus player [from number] [to number] 2 2 Like @audit, but displays more information. The optional from and to arguments are for restricting the display to specific object numbers, if you happen to know the player only owns objects in the included range. 2 2 Example: 2 Objects owned by Frand (from #0 to #54949): 2 P[ 23] #47 Frand [Hyperspace Hovel] 2 T #152 Frand's trio of shoes [Frand] 2 KfT[ 10] #391 Frand's notifier class [Nowhere] 2 T[ 8] #393 Frand's chessboard [The Dining Room] 2 KfT[ 11] #775 Frand's generic game board [Nowhere] 2 T[ 6] #893 Ghost game [The Dining Room] 2 T[ 16] #894 Frand's mind bender [The Dining Room] 2 C #997 polka-dot hole [Hyperspace Hovel] 2 R[ 1] #1002 Hyperspace Hovel 2 E #11958 out Monster Cage->*Dr. Empirico's Lab 2 ... 2 2 The K in the first column indicates that the object has children owned by other players. A lowercase k indicates the object has children but owned only by the player. The second column indicates whether the object is publicly readable or publicly parentable. An r indicates readability. A lowercase f indicates the object is both readable and allows children (is fertile). An uppercase F indicates the object is not readable, yet allows children to be created. (This is usually an error.) If the object is readable by the issuer of the @prospectus command (that is, publicly readable or owned by the issuer), then the number in brackets indicates the number of verbs which have been defined on this object (not including any verbs from any parents). 2 2 The third column indicates what type of object this is. 2 T Thing 2 E Exit 2 R Room 2 C Container 2 N Note 2 P Player 2 p Parent object appropriate for players ("Player class") 2 blank Other 2 5 4 13 2 Syntax: @property . 2 @property . 2 2 Adds a new property named to the named object. The initial value is given by the second argument, if present; it defaults to 0. 2 2 Normally, a property is created with permissions 'rc' and owned by whoever types the command. However, you may also specify these explicitly 2 2 @property . 2 @property . 2 2 Only wizards can create properties with owners other than themselves. 2 2 '@property' can be abbreviated as '@prop'. 37 1 4 17 2 Syntax: @program : 2 @program : 2 2 Changes the MOO program associated with the named verb on the named object. 2 If you provide and as in the second form of this command, then it is the first verb with matching direct object, preposition and indirect object specifiers that is the one getting the new program. This is useful if you have several verbs matching the same name. 2 2 Typing the @program command always puts the server into a line-reading mode, in which each line you type is saved away without any action unless said line is one of the following: 2 2 . 2 @abort 2 . 2 2 A period on a line by itself ends the line-reading mode and continues with the command, in this case, the saved lines are considered as a program, checked for syntax errors and, if no errors are found, installed as the new program for the specified verb. 2 2 @abort causes the command to terminate immediately with no change to any verb's program. . enters literally as one of the lines to be saved, which is used for when, e.g., you want to enter the line `.' or the line `@abort'. 2 2 Note that this command *always* enters the line-reading mode, even if the indicated verb is not found. In this case, lines of text are still read but they are ignored. After any @program command, you always need to type a period or `@abort' to get back into the normal command-reading mode. 2 5 4 22 2 Syntax: @list : 2 @list : [with|without parentheses|numbers] [all] 2 @list : 2 @list : .. 2 2 Prints out the code for the MOO program associated with the named verb on the named object. 2 2 Normally, the code is shown with each line numbered and with only those parentheses that are necessary to show the meaning of the program. You can e.g., specify `without numbers' to have the numbers omitted or `with parentheses' to include all parentheses or even `with parentheses without numbers' to do both. You can change the default behavior of this command via @prog-options (which see). 2 2 Normally, the @list command only shows the code for the named verb on the object itself or on the nearest ancestor that defines it; if you give the `all' option, it shows the code for the named verb on every ancestor that defines it, as well as on the object itself. 2 2 The 3rd form of the verb lists the verb matching the given dobj/prep/iobj specification if such exists. 2 The 4th form prints only those lines in the specified range. 2 2 Example: 2 Type `@list $room:say' to see the code for the `say' command, or even `@list $prog:@list' to see the code implementing @list itself... 2 2 The 2nd-4th forms may be combined, e.g., 2 2 @list frobule:burfle this in front of any without numbers 1..10 2 2 which would be useful if `frobule' had more than one `burfle' verb and we wanted to see the first 10 lines of the one having `this' `in front of' `any' as its respective dobj/prep/iobj specifiers. 37 1 4 24 2 Syntax: @kill task_id 2 @kill [object]:[verb] 2 @kill soon [number-of-seconds] 2 @kill all 2 @kill %trailing_id 2 2 2 Immediately kills one or more forked tasks. The '@forked' command is useful for finding out what tasks you have pending; see 'help @forked' for details. Only the owner of a task may kill it. 2 2 @kill task_id kills only the task with that id. 2 2 @kill object:verb kills all tasks which were scheduled by the object running the verb named. Both object and verb are optional: @kill object: kills all tasks scheduled by that object, and @kill :verb kills all tasks which were scheduled by any object running that verb. This can be useful if you have several similar objects which are running tasks from similarly named verbs. (Perversely, @kill : kills all tasks... Any object running any task.) 2 2 @kill soon kills all tasks scheduled within the next minute. @kill soon number kills all tasks scheduled within that number of seconds, e.g. @kill soon 300 would kill all tasks scheduled within the next five minutes. This can be useful if you have a runaway task you want to quickly remove, but don't want to kill you later tasks. 2 2 @kill all kills all tasks. Like @kill soon, but more dramatic. 2 2 @kill %trailing_id expects you to specify the last few digits of a task id. It then kills all tasks that end with those digits. 2 2 Example: 2 @forked 2 1359083655 Sep 16 21:45:00 1991 yduJ #5803:heartbeat (10) [#68] 2 @kill %655 2 Killed: task 1359083655, verb #5803:heartbeat, line 10, this==#68 37 1 4 8 2 Syntax: @kids object 2 2 A quick way to find out the children of an object. Prints out the names and object numbers of the found children. Note: this is not a list of all descendents, just direct children. 2 2 Example: 2 @kids #3107 2 Generic Body of Chlorinated Water(#3107) has 3 kids. 2 The Pool(#1428) The Hot Tub(#388) Deep Blue Underground Pool(#17340) 2 5 4 22 2 Syntax: @forked 2 2 Gives a list of all of the forked tasks you own, along with detailed information about each one. The information includes the following: 2 2 Queue ID: 2 A numeric identifier for the task, for use in killing it (see 'help @kill'). 2 2 Start Time: 2 The time after which the task will begin execution. 2 2 Owner: 2 The player whose permissions under which the task is running. 2 Unless you are a wizard, @forked will show only your tasks. 2 2 Verb: 2 The object and verb-name of the code that forked the task. 2 2 Line: 2 The line number of the first statement that the task will execute when it starts. Note that the code for the verb in question may have changed since the task was forked; the forked task will use the version that was being executed when it was forked. 2 2 This: 2 The value of `this' for the forked task, in the case that it is different from (i.e., is a descendant of) the object on which the verb code lives. 37 1 4 42 2 Syntax: @display .[property] 2 ,[inherited_property] 2 :[verb] 2 ;[inherited_verb] 2 2 @display is a fancy version of @show. As @show, it can select individual verbs or properties to display. In addition, it can display all the verbs or properties defined on an object, or all the verbs or properties defined on any of the object's ancestors. Don't specify a property or verbname after the punctuation mark to get the "all" feature. Its display is more compact than that of @show (it uses a one-line format, and truncates values that don't fit in the value field). 2 2 You may mix properties and verbs on the command line, but the parser may become confused. (E.g. @display object,: displays all properties including inherited ones plus all locally defined verbs on the object.) 2 2 Examples: 2 Individual property: 2 @display poolsweep.count 2 .count yduJ (#68) r c 8 2 2 Individual verb: 2 @display poolsweep:tell 2 #3560:tell yduJ (#68) rxd this none this 2 2 All properties, including one truncated value: 2 @display poolsweep. 2 poolsweep (#3560) [ readable ] 2 Owned by yduJ (#68). 2 Child of generic thing (#5). 2 Location The Pool (#1428). 2 .gagged yduJ (#68) r c 0 2 .count yduJ (#68) r c 8 2 .messages yduJ (#68) r c {"The poolsweep stir.. 2 .index yduJ (#68) r c 2 2 .quantum yduJ (#68) r c 20 2 2 Inherited verbs, edited for brevity, showing verbs from various parents, with owners, permissions, and argument lists. 2 @d poolsweep; 2 poolsweep (#3560) [ readable ] 2 #3560:tell yduJ (#68) rxd this none this 2 #3560:description yduJ (#68) rxd this none this 2 #5:"g*et t*ake" Haakon (#2) rxd this none none 2 #5:"d*rop th*row" Haakon (#2) rxd this none none 2 #5:moveto Haakon (#2) rxd this none this 2 #1:description Haakon (#2) rxd this none this 2 #1:look_self Haakon (#2) rxd this none this 2 2 Some aspects of @display can be customized (see `help @display-options'). 2 5 4 3 2 Syntax: @dbsize 2 2 @dbsize goes through the entire database, counting the valid and invalid objects, giving a summary at the end. This information can be useful, but because this command is cpu intensive, it should be used sparingly. 2 5 4 14 2 Syntax: @copy : to [][:] 2 @copy-move : to [][:] 2 2 Copies the code of the named verb to the new object and verbname. Permissions, and arguments of the new verb are set to match those of the old verb in the event that the new verb does not already exist. One of or : must be supplied. If no new verbname is given, the old name is retained. Likewise, defaults to if not given. 2 2 @copy-move will delete the old verb after it has copied. Useful for restructuring code/object hierarchies. 2 2 Examples: 2 @copy me:verbname to myobject 2 @copy me:test_verb to myobject:real_verb 2 2 In general, @copy'ing verbs is a bad idea. In the vast majority of cases, the desired effect can be accomplished with parenting (i.e., having be an ancestor of ), which has the advantage that if a verb is updated or fixed, this immediately becomes available to child objects that inherit this verb. In such a case, copies that were made using @copy have to be tracked down and fixed by hand. 2 2 This facility is provided for those rare occasions where one has no choice but to actually copy the verb. 2 5 4 7 2 Syntax: @chparent to 2 2 Changes the parent of the named object to be the named parent. The object acquires all the verb and property definitions of its parent. Newly acquired properties are initilialized with `clear' values so that they inherit whatever values are currently assigned to the parent's corresponding properties (see `help @clearproperty'). 2 2 If the player does not own , it must have been set `fertile'. must be owned by the player. Neither nor any descendant can define any property which already exist on . Use @check-chparent (see `help @check-chparent') to list such property conflicts. 2 2 It is also sometimes the case that you will own some object and want to @chparent some child of that object that you do not own. Use @disinherit (see `help @disinherit') in such situations. 2 5 4 25 2 Syntax: @chmod 2 @chmod . 2 @chmod : 2 2 Changes the permissions of an object, property or verb, to those given. The following table shows what permission bits are allowed for each form of the command: 2 r, w, f 2 r, w, c 2 r, w, x, d 2 2 See the LambdaMOO Programmer's Manual for their meanings. 2 2 To clear all of the permissions for an object, verb, or property, use "" as the second argument. 2 2 @chmod also accepts +, !, and - as modifiers for a single permission to add or subtract that permission from the current set. (! and - are the same.) 2 2 Examples: 2 2 Set a verb to be Readable and Callable: 2 @chmod chair:sit rx 2 2 Set a verb to be not Callable, without changing its other permissions: 2 @chmod cookies:eat !x 2 2 Set an object to be Fertile in addition to any current bits: 2 @chmod table +f 2 5 4 5 2 Syntax: @args : 2 @args : 2 @args : 2 2 Changes the direct object, preposition, and/or indirect object specifiers for the named verb on the named object. Any specifiers not provided on the command line are not changed. The direct and indirect object specifiers ( and ) must be either 'none', 'this', or 'any'. The preposition specifier () must be either 'none', 'any', or one of the prepositional phrases listed in `help prepositions'. 37 1 4 13 2 Syntax: .program : 2 : 2 : 2 2 : 2 : 2 . 2 2 Provides or changes the MOO program associated with the named verb on the named object. 2 2 This command is mostly obsolete. Use @program instead. The only reason this command still exists is that it is a server builtin command that will continue to work in the (unlikely) event that @program gets trashed ... 2 2 This command works differently from most other MOO commands, in that it actually changes how the server will interpret later lines that you type to it. After typing the '.program' line, you are in 'programming mode'. All lines that you type in this mode are simply saved away in the server until you type a line containing only a single period ('.'). At that point, those lines are interpreted as a MOO program and are checked for syntax errors. If none are found, a message to that effect is printed and the code you typed is installed as the program for the verb in question. In any case, after typing the '.' line, you are returned to the normal input-handling mode. 37 1 4 32 2 Syntax: @clearproperty . 2 2 This clears 's property. That is the property value becomes `clear' and all further references to this property will use the value of the same property on the parent object. Note that you can only clear inherited properties. Nor is this the same as removing a property; the property continues to exist. 2 2 `@clearproperty' can be abbreviated as `@clearp'. 2 2 Example: 2 2 @create #1 named foo 2 You now have foo with object number #42 and parent Root Class (#1). 2 [foo, as a child of #1 has a .description property which starts out clear] 2 ;#1.description 2 => "" 2 ;#1.description = "You see nothing special" 2 => "You see nothing special" 2 ;#42.description 2 => "You see nothing special" 2 ;#42.description = "Something special" 2 => "Something special" 2 [foo.description is now no longer clear; it has a value of its own] 2 ;#1.description = "Boring" 2 => "Boring" 2 ;#42.description 2 => "Something special" 2 2 @clearp foo.description 2 Property #42.description cleared; value is now "Boring". 2 [foo.description is now clear again] 2 ;#1.description = "" 2 => "" 2 ;#42.description 2 => "" 2 5 4 2 2 *forward* 2 @disinherit 2 5 4 11 2 Syntax: @disinherit 2 @disinherit [from ] 2 2 Synonym: @disown 2 2 This command is used to remove an unwanted child from an object you own. If you owned said child, you could use @chparent; this command is to cover the other case, namely where you don't own the child. 2 2 Both forms of this command chparent to its grandparent, provided you own the parent. The second form matches the string you supply for against the list of children of the given . 2 2 Turning off the fertile bit (.f) for a particular object prevents others from creating children of it or chparenting to it (see `help @chmod'). 2 Note also that, though the name might seem to indicate otherwise, this command does not change the ownership of any object. 2 5 4 2 2 *forward* 2 @display-options 2 5 4 24 2 Syntax: @display-option 2 @display-option