diff -rwu src-3.0a7/+CORE ColdCore-3.0a9.02/src/+CORE --- src-3.0a7/+CORE Sat Aug 9 19:09:49 1997 +++ ColdCore-3.0a9.02/src/+CORE Tue Aug 19 12:15:37 1997 @@ -1,15 +1,12 @@ root sys -foundation -has_commands -has_name -described -event_handler -physical -located -thing -command_cache -user_interfaces +mutex +mutex_access +mutex_mail +mutex_vr +mutex_building +mutex_location +dmi_data core libraries dictionary @@ -25,27 +22,97 @@ help_lib misc mail_root -mail_list -mail_ui +mail_lib +foundation +has_commands +command_cache +network +frob +connection_interface +has_name +bug_handler +described +event_handler +utilities +lag_watcher +heart +scheduler +file +compiler +evaluator +bs_eval +place_desc_evaluator +realm_base_eval +formatter +plain_format +wrapped_format +flat_format +ansi_format +html_format +pueblo_format +uncompiler +housekeeper +word +lovecraft_word +password +settings +world +motd +cml_color +physical +located +thing +has_text +note +log +http_log +reaper_log +login_log +generic_map +page +page_home_index +page_bin_index +page_desktop_login +page_file_index +page_root_index +page_login +plain_page +page_web_prefs +mail_message +itext location located_location body +has_reactions robot +mail_list +user_interfaces +mail_ui command_aliases bad_commands help_ui editor_reference channel_ui user_info +menu user guest reaper no_one player -storyteller builder +storyteller +dmi_data_ui programmer admin +antisocial +social +www_preferences +settings_ui +mail_list_news +mail_list_bugs +mail_postmaster +mail_admin on_location in_location lost_and_found @@ -56,46 +123,6 @@ body_cave void the_pit -frob -network -connection_interface -http_interface -smtp_interface -finger_interface -login_interface -connection -login_connection -http_connection -outbound_connection -smtp_connection -finger_connection -veil_connection -smtp -daemon -http_daemon -login_daemon -veil_daemon -smtp_daemon -finger_daemon -logic_frob -xor -and -and_lock_frob -lock_frob -object_lock_frob -inside_lock_frob -indirect_lock_frob -owner_lock_frob -carry_lock_frob -parent_lock_frob -not -not_lock_frob -or -or_lock_frob -true -true_lock_frob -false -false_lock_frob realm realm_of_creation thing_frob @@ -103,35 +130,35 @@ exit coord_exit exit_frob -read_parser -callback -message_frob -trie -ctext_frob -tag -format -generator -climate_frob -rect -rtree -mail_list_news -mail_list_bugs -has_text -note -log -http_log -reaper_log -login_log -generic_map -map_of_taobh_thiar -mail_message -itext +slate +nothing +weather_system +climate +climate_taobh_thiar +weather_attributes +weather +weather_1 +weather_2 +weather_3 +weather_4 +weather_5 +weather_6 +smtp_interface +help_node db registry +help_index +help_index_driver +help_index_core +help_index_cmds +help_index_subsystem +help_index_function +help_index_objects mail_db place_db user_db -help_node +channel_db +interface_registry help_coldcore help_help help_help_options @@ -368,6 +395,8 @@ help_func_type help_func_valid help_func_fromliteral +help_func_frob_value +help_func_frob_handler help_funcs_buf help_func_buf_replace help_func_buf_to_str @@ -427,27 +456,8 @@ help_coldc_native help_reference help_updates -help_index -help_index_driver -help_index_core -help_index_cmds -help_index_subsystem -help_index_function -help_index_objects +help_admin help_core -help_sys_events -help_obj_list -help_list_element -help_list_formatting -help_list_maps -help_list_sets -help_list_other -help_sys_editor -help_node_editor_invoking -help_node_editor_commands -help_node_editor_programming -help_sys_channels -help_obj_trie help_cmds help_cmd_say help_cmd_emote @@ -479,26 +489,169 @@ help_cmd_new help_cmd_wear help_cmd_spawn -help_cmd_build -help_cmd_dig -help_sys_message -help_cmd_defmsg -help_msg_coldc -help_cmd_msg help_cmd_nh help_cmd_rename help_cmd_ant help_cmd_dnt help_cmd_remember -help_sys_word +help_mail +help_mail_read +help_mail_mail +help_mail_subscribe +help_mail_unsubscribe +help_mail_mail_lists +help_mail_send +help_mail_next_new +help_mail_rmmail +help_mail_reply +help_cmd_list +help_cmd_show +help_cmd_hlist +help_cmd_hwrite +help_cmd_add_parent +help_cmd_boot +help_cmd_rehash +help_cmd_which +help_cmd_dump +help_cmd_move +help_cmd_chparent +help_cmd_addparent +help_cmd_addvariable +help_cmd_delparent +help_cmd_delvariable +help_cmd_ancestors +help_cmd_delmethod +help_cmd_id +help_cmd_join +help_cmd_teleport +help_cmd_attach +help_cmd_bugs +help_cmd_children +help_cmd_destroy +help_cmd_parents +help_cmd_realms +help_cmd_report +help_cmd_build +help_cmd_dig +help_cmd_discard +help_cmd_help +help_cmd_age +help_cmd_audit +help_cmd_commands +help_cmd_context +help_cmd_date +help_cmd_examine +help_cmd_finger +help_cmd_news +help_cmd_password +help_cmd_quit +help_obj +help_cml_colors +help_obj_trie +help_obj_list +help_list_element +help_list_formatting +help_list_maps +help_list_sets +help_list_other +help_obj_has_text +help_obj_has_text_methods +help_mutex +help_heap help_weather_system help_sys_climate help_sys_weather help_sys_weather_attributes -help_mutex -help_heap -channel_db -mail_lib +help_obj_math +help_obj_integer +help_obj_data_lib +help_obj_object_lib +help_obj_help_node +help_node_names +help_node_settings +help_node_creation +help_node_formatting +help_formatting_general +help_formatting_commands +help_formatting_objects +help_node_commands +help_obj_code_lib +help_sys +help_sys_events +help_sys_event_register +help_sys_event_hook +help_sys_event_send +help_sys_event_recv +help_sys_editor +help_node_editor_invoking +help_node_editor_commands +help_node_editor_programming +help_sys_channels +help_sys_message +help_cmd_defmsg +help_msg_coldc +help_cmd_msg +help_msg_prop +help_sys_word +help_ranges +help_sys_bad_commands +gender +gender_first_person +gender_female +gender_first_person_plural +gender_male +gender_plural +gender_neuter +finger_interface +login_interface +http_interface +logic_frob +xor +and +and_lock_frob +lock_frob +object_lock_frob +inside_lock_frob +indirect_lock_frob +owner_lock_frob +carry_lock_frob +parent_lock_frob +not +not_lock_frob +or +or_lock_frob +true +true_lock_frob +false +false_lock_frob +read_parser +callback +message_frob +trie +ctext_frob +tag +format +generator +climate_frob +rect +rtree +propagator +connection +outbound_connection +ident_connection +inbound_connection +http_connection +smtp_connection +login_connection +finger_connection +smtp +daemon +login_daemon +smtp_daemon +finger_daemon +http_daemon +dns +world_time user_parsers null_parser command_aliases_parser @@ -510,64 +663,20 @@ wrap_filter lock_parser editor_session -weather_system -climate -climate_taobh_thiar -weather_attributes -weather -weather_1 -weather_2 -weather_3 -weather_4 -weather_5 -weather_6 +propagator_effects +adapter symbol math english_lib time -world_time graph heap place_lib data_lib -utilities -lag_watcher -heart -scheduler -file -compiler -evaluator -bs_eval -place_desc_evaluator -realm_base_eval -formatter -text_format -wrapped_text_format -plaintext_format -html_format -uncompiler -housekeeper -word -lovecraft_word -password -settings -world -motd -antisocial -social -settings_ui -slate -nothing -gender -gender_first_person -gender_female -gender_first_person_plural -gender_male -gender_plural -gender_neuter -mutex -mutex_access -mutex_mail -mutex_vr -mutex_building -mutex_location +filtered_frob +cml_lib +http_lib +converters +security_lib +directories +dir_desktop diff -rwu src-3.0a7/admin.cdc ColdCore-3.0a9.02/src/admin.cdc --- src-3.0a7/admin.cdc Sat Aug 9 19:09:31 1997 +++ ColdCore-3.0a9.02/src/admin.cdc Tue Aug 19 12:18:13 1997 @@ -1,6 +1,7 @@ new object $admin: $programmer; +var $admin configured_core = #[]; var $admin shutdown_started = 0; var $channel_ui active_channels = #[]; var $channel_ui channel_dict = #[]; @@ -23,9 +24,11 @@ ["@core",\ [["@core", "*", "@core <list object>", 'core_cmd, #[[1, ['list, ['object, []]]]]]]],\ ["@rehash-all",\ - [["@rehash-all", "*", "@rehash-all <any:-p?urge>", 'rehash_all_cmd, #[[1, ['any_opt, [["p?urge"]]]]]]]],\ + [["@rehash-all", "*", "@rehash-all <any:-p?urge>", 'rehash_all_cmd, #[[1, ['any_opt, ["p?urge"]]]]]]],\ ["@reap",\ - [["@reap", "*", "@reap <any>", 'reap_cmd, #[[1, ['any, []]]]]]]]; + [["@reap", "*", "@reap <any>", 'reap_cmd, #[[1, ['any, []]]]]]],\ + ["@quota",\ + [["@quota", "* to *", "@quota <object> to <any:+e?xempt>", 'quota_cmd, #[[1, ['object, []]], [3, ['any_opt, ["e?xempt"]]]]]]]]; var $has_name name = ['prop, "Generic Admin", "Generic Admin"]; var $located location = $body_cave; var $located obvious = 1; @@ -45,14 +48,12 @@ var $root inited = 1; var $root managed = [$admin]; var $root manager = $admin; -var $root owned = [$admin]; var $root quota = 75000; var $root settings = #[["home", $body_cave]]; var $thing gender = $gender_neuter; var $user connected_at = 0; var $user connections = []; -var $user context = #[['last, $body_cave]]; -var $user formatter = $mail_list; +var $user formatter = $plain_format; var $user last_command_at = 0; var $user modes = #[]; var $user parsers = [$command_parser]; @@ -79,7 +80,7 @@ if (!email) return (who.namef('ref)) + " does not have an email address!"; catch any { - $smtp.sendmail(email, ("[" + ($motd.server_name())) + "] password change.", ((("The password for the user " + (who.name())) + " on ") + ($motd.server_name())) + " has been set as:", "", " " + pwd, "", "This is an automatic message sent to the supplied address. If this message is in error simply discard it.", "", "If no connections are made to this user within a week it will be purged."); + $smtp.sendmail('admin, email, ("[" + ($motd.server_name())) + "] password change.", ((("The password for the user " + (who.name())) + " on ") + ($motd.server_name())) + " has been set as:", "", " " + pwd, "", "This is an automatic message sent to the supplied address. If this message is in error simply discard it.", "", "If no connections are made to this user within a week it will be purged."); } with { .tell_traceback(traceback()); return "** Unable to send mail message, no changes made **"; @@ -143,6 +144,163 @@ } }; +public method .configure_core() { + var list, l, x, t, err; + + // get the juice + $sys.add_to_system(this()); + + // expand on this as we go + .tell(["*" * 78, strfmt("%78{*}c", " Welcome to ColdCore "), "*" * 78]); + .tell(("This is an interactive configuration system which any admin who connects (until it is completed) is sent through. You must complete this configuration before you can do anything else. You can skip a specific question at any time by typing '@skip'. Suggested default values will be enclosed in square brackets. Pressing enter without any value will use the default value.".wrap_lines(78)).mmap('center, 78)); + .tell("*" * 78); + + // first question please + if (!($admin.configured_core('new_user_class))) { + .tell("What class should new users be created as? Available classes:"); + list = filter x in ($user.descendants()) where ('command_cache in (x.flags())); + t = $sys.get_new_user_class(); + list = map x in (list) to ((list == t) ? (x + " (current class)") : x); + .tell(list.prefix(" ")); + while (!l) { + refresh(); + l = .prompt("New User Class [$user] "); + if (l == "@skip") { + .tell("Skipping.."); + break; + } + if (l) { + catch any { + l = $object_lib.to_dbref(l); + if (!(l in list)) + .tell("Invalid selection, try again."); + } with { + .tell(("Invalid selection '" + l) + "'"); + continue; + } + } else { + l = $user; + } + $sys.set_setting("new-user-class", $sys, l); + $admin.configured_core('new_user_class, 1); + .tell("New User Class set to: " + l); + } + .tell(["", "You can set this at any time, with the command:"]); + .tell(" @set $sys:new-user-class=" + l); + } + refresh(); + + // server name/title + if (!($admin.configured_core('server_name))) { + .tell(["", "---"]); + l = (.prompt("What is your server name? [My Server] ")) || "My Server"; + if (l == "@skip") { + .tell("Skipping.."); + } else { + $motd.set_setting("server-name", $motd, l); + $admin.configured_core('server_name, 1); + .tell("Server name set to: " + l); + } + .tell(["", "You can set this at any time, with the command:"]); + .tell(" @set $motd:server-name=" + l); + } + refresh(); + if (!($admin.configured_core('server_title))) { + .tell(["", "---"]); + t = $motd.server_title(); + l = (.prompt(("What is your server title? [" + t) + "] ")) || t; + if (l == "@skip") { + .tell("Skipping.."); + } else { + $motd.set_setting("server-title", $motd, l); + $admin.configured_core('server_title, 1); + .tell("Server title set to: " + l); + } + .tell(["", "You can set this at any time, with the command:"]); + .tell(" @set $motd:server-title=" + l); + } + refresh(); + if (!($admin.configured_core('daemons))) { + .tell(["", "---"]); + while (1) { + refresh(); + list = ($daemon.children()).setremove($login_daemon); + .tell("Which network daemons do you want to have automatically startup,"); + .tell("Other than $login_daemon. Available daemons:"); + t = filter l in ($sys.get_startup_objects()) where (l.is($daemon)); + for l in (list) { + if (l in t) + .tell(strfmt(" %20s (auto starting)", l)); + else + .tell(" " + l); + } + l = .prompt(("Auto-Start: [" + (t.join(", "))) + "] "); + if (l == "@skip") { + .tell("Skipping.."); + break; + } else if (!l) { + .tell("Using existing daemons: " + (t.join(", "))); + break; + } else { + err = 0; + for x in (l.explode_english_list()) { + catch any { + $sys.set_setting("startup-objects", $sys, "+" + x); + .tell(("Added " + x) + " as a startup daemon."); + } with { + .tell(("Unable to add '" + x) + "' as a daemon:"); + .tell("=> " + ((traceback()[1])[2])); + err++; + } + } + if (!err) { + $admin.configured_core('daemons, 1); + break; + } + .tell("Errors occurred..."); + } + } + .tell(["", "You can set this at any time, with the command:"]); + .tell(" @set $motd:startup-objects=OBJECTS..."); + } + + // Other things to add: HTTP Virtual Hosting info, + // cleanup + list = $admin.list_method('login); + list = filter l in (list) where (!match_regexp(l, "\.configure_core\(\);")); + if (list) + $admin.add_method(list, 'login); + else + $admin.del_method('login); + $admin.del_var('configured_core); + $admin.add_var('configured_core); + .tell(["", strfmt("%79{*}c", " Configuration Complete ")]); +}; + +public method .configured_core() { + arg item, @yes; + + if (!yes) + return (| configured_core[item] |) || 0; + configured_core = configured_core.add(item, 1); +}; + +public method .core_admin() { + var code, defs; + + catch any { + .add_var('configured_core); + configured_core = #[]; + if ((| .find_method('login) |) == $admin) + code = .list_method('login); + else + code = (defs = []); + .add_method(code + [".configure_core();"], 'login); + } with { + $sys.log($parse_lib.traceback()); + } +}; + protected method .core_cmd() { arg cmdstr, cmd, objs; var o, obj; @@ -213,7 +371,7 @@ if (who.connected()) { out += [" Connections:"]; for tmp in (who.connections()) - out += [((((" " + tmp) + ": [") + ($time.format("%v/%T", tmp.active_since()))) + "] ") + (tmp.address())]; + out += [((((" " + tmp) + ": [") + ($time.format("%d-%b-%Y/%T", tmp.active_since()))) + "] ") + (tmp.address())]; } tmp = who.quota_byte_usage(); return (out += [" Quota:", " Total: " + ((who.quota()).to_english()), " Used: " + (tmp.to_english()), " Remaining: " + (((who.quota()) - tmp).to_english())]); @@ -231,6 +389,13 @@ $sys.new_admin(); }; +public method .login() { + arg connection; + + pass(connection); + +}; + public method .logout() { arg @args; @@ -284,7 +449,7 @@ return (user.namef('ref)) + " does not have an email address!"; new = $code_lib.random_password(); catch any { - $smtp.sendmail(email, ("[" + ($motd.server_name())) + "] password change.", ((("The password for the user " + (user.name())) + " on ") + ($motd.server_name())) + " has been changed to:", "", " " + new, "", "This is an automatic message sent to the supplied address. If this message is in error simply discard it."); + $smtp.sendmail('admin, email, ("[" + ($motd.server_name())) + "] password change.", ((("The password for the user " + (user.name())) + " on ") + ($motd.server_name())) + " has been changed to:", "", " " + new, "", "This is an automatic message sent to the supplied address. If this message is in error simply discard it.", "", "This password was changed by " + (.name())); } with { .tell_traceback(traceback()); return "** Unable to send mail message, password not changed **"; @@ -294,13 +459,33 @@ .tell((("You reset " + (user.name())) + "'s password to: ") + new); }; +protected method .quota_cmd() { + arg cmd, cmdstr, object, prep, ops; + var object, value, exempt; + + (> .perms(caller(), 'command) <); + (> .check_mojo() <); + value = ops[1]; + value = (value && (| toint(value[1]) |)) ? toint(value[1]) : (-1); + exempt = "e?xempt" in ((ops[2]).slice(1)); + exempt = exempt ? (((ops[2])[exempt])[3]) : (-1); + if (value != (-1)) { + object.set_quota(value); + .tell((((object.name()) + " now has a quota of ") + (value.to_english())) + "."); + } + if (exempt != (-1)) { + object.set_quota_exempt(exempt); + .tell((((object.name()) + " is ") + (exempt ? "now" : "no longer")) + " quota exempt."); + } +}; + protected method .reap_cmd() { arg cmdstr, cmd, args; var opts, thresh, i; (> .perms(caller(), 'command) <); (> .check_mojo() <); - [args, opts] = $parse_lib.getopt(args, [["t?ime", 1], ["m?ail", 0]]); + [args, opts] = $parse_lib.opt(args, "t?ime", "m?ail"); args = args.join(); if ((i = "t?ime" in (opts.slice(1)))) { catch any @@ -318,11 +503,11 @@ private method .reap_list() { arg thresh; - var t, reap, u, tl, m, v, last; + var t, reap, u, tl, m, v, n, last; t = time(); reap = []; - .tell([("--- Reap Possibilities (Not connected for " + ($time.to_english(thresh))) + ")", strfmt("%28L %4l %4l %12l %l", "User", "MNGD", "WRTS", "Last On", "Age"), strfmt("%28L %4l %4l %12l %l", "----", "----", "----", "-------", "---")]); + .tell([("--- Reap Possibilities (Not connected for " + ($time.to_english(thresh))) + ")", strfmt("E %28L %3l %12l %12l %l", "User", "MNG", "Notified", "Last On", "Age"), strfmt("- %28L %3l %12l %12l %l", "----", "---", "-------", "-------", "---")]); for u in ($user.descendants()) { if ((u.connected()) || ((u.has_flag('core)) || (u.is($admin)))) continue; @@ -333,21 +518,25 @@ tl = t - tl; if (tl / 31449600) { v = tl / 31449600; - m = (v + " year") + ((v > 1) ? "s" : ""); + m = (v + " yr") + ((v > 1) ? "s" : ""); tl = tl % 31449600; } if (tl / 2592000) { v = tl / 2592000; - m += (((m ? " " : "") + v) + " month") + ((v > 1) ? "s" : ""); + m += (((m ? " " : "") + v) + " mnth") + ((v > 1) ? "s" : ""); tl = tl % 2592000; } if (tl / 604800) { v = tl / 604800; - m += (((m ? " " : "") + v) + " week") + ((v > 1) ? "s" : ""); + m += (((m ? " " : "") + v) + " wk") + ((v > 1) ? "s" : ""); } if (!m) m = "newborn"; - reap += [[last, strfmt("%28L %4l %4l %12l %l", u.namef('xref), listlen(u.managed()), listlen(u.writes()), $time.format("%v", last), m)]]; + if (u.reap_notified()) + n = $time.format("%v", u.reap_notified()); + else + n = ""; + reap += [[last, strfmt("%s %28L %3l %12l %12l %l", ((u.get_setting("rl-email", $user_info))[2]) ? " " : "!", u.namef('xref), listlen(u.managed()), n, $time.format("%v", last), m)]]; } .tell(((reap.sort()).slice(2)).reverse()); return "---"; @@ -378,11 +567,12 @@ if (!(> $parse_lib.ask("Send this email message? [yes] ", "(yes|y)", "yes") <)) return "Message not sent."; catch any { - $smtp.sendmail(email, subj, @msg); + $smtp.sendmail('admin, email, subj, @msg); } with { .tell_traceback(traceback()); return "** Unable to send message"; } + user.set_reap_notified(time()); return "Message sent."; }; @@ -488,8 +678,6 @@ } .tell(((reap.sort()).slice(2)).reverse()); return "---"; - - // $#Edited: 19 Nov 96 17:32 $miro }; protected method .rehash_all_cmd() { @@ -555,7 +743,7 @@ (> .perms(caller(), 'command) <); (> .check_mojo() <); - args = $parse_lib.getopt(args.join(), [["t?ime", 1]]); + args = $parse_lib.opt(args.join(), "t?ime"); opt = "t?ime" in ((args[2]).slice(1)); if (opt && ((((args[2])[opt])[4]).is_numeric())) time = toint(((args[2])[opt])[4]); @@ -635,8 +823,6 @@ out += ["-- Suspended Tasks --", tfmt] + suspend; } return out || "-- No suspended or preempted tasks --"; - - // $#Edited: 21 Nov 96 20:44 $miro }; public method .uninit_admin() { diff -rwu src-3.0a7/and.cdc ColdCore-3.0a9.02/src/and.cdc --- src-3.0a7/and.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/and.cdc Tue Aug 19 12:15:35 1997 @@ -7,7 +7,6 @@ var $root inited = 1; var $root managed = [$and]; var $root manager = $and; -var $root owned = [$and]; var $root trusted = []; public method .test() { @@ -38,8 +37,6 @@ str = (str + tostr(x)) + " && "; } return ("(" + (str && (str.subrange(1, (str.length()) - 4)))) + ")"; - - // $#Edited: 11 Dec 96 09:48 $brandon }; diff -rwu src-3.0a7/and_lock_frob.cdc ColdCore-3.0a9.02/src/and_lock_frob.cdc --- src-3.0a7/and_lock_frob.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/and_lock_frob.cdc Tue Aug 19 12:15:35 1997 @@ -5,7 +5,6 @@ var $root flags = ['methods, 'code, 'variables, 'core]; var $root managed = [$and_lock_frob]; var $root manager = $and_lock_frob; -var $root owned = [$and_lock_frob]; public method .lock_name() { arg lock, @type; @@ -17,8 +16,6 @@ default: return (((lock[1]).lock_name(type)) + " and ") + ((lock[2]).lock_name(type)); } - - // $#Edited: 30 Nov 96 21:22 $miro }; public method .new_lock() { diff -rwu src-3.0a7/antisocial.cdc ColdCore-3.0a9.02/src/antisocial.cdc --- src-3.0a7/antisocial.cdc Sat Aug 9 19:09:48 1997 +++ ColdCore-3.0a9.02/src/antisocial.cdc Tue Aug 19 12:15:19 1997 @@ -2,8 +2,10 @@ new object $antisocial: $user_interfaces; var $antisocial antisocial_msgs = #[["feh", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " kicks ", <$generator, ["who", [], [], 'gen_who]>, " rather firmly in the kiester."], #[['this, $antisocial]]]>]]; +var $foundation defined_msgs = #[["ice", #[['branches, ["general", "actor", "who"]]]], ["eye", #[['branches, ["general", "actor", "who"]]]], ["pat", #[['branches, ["general", "actor", "who"]]]], ["pummel", #[['branches, ["general", "actor", "who"]]]], ["prod", #[['branches, ["general", "actor", "who"]]]], ["kick", #[['branches, ["general", "actor", "who"]]]], ["hug", #[['branches, ["general", "actor", "who"]]]], ["beat", #[['branches, ["general", "actor", "who"]]]], ["hit", #[['branches, ["general", "actor", "who"]]]], ["peer", #[['branches, ["general", "actor", "who"]]]], ["bite", #[['branches, ["general", "actor", "who"]]]], ["nip", #[['branches, ["general", "actor", "who"]]]], ["poke", #[['branches, ["general", "actor", "who"]]]], ["bonk", #[['branches, ["general", "actor", "who"]]]], ["fart", #[['branches, ["general", "actor", "who"]]]]]; +var $foundation msgs = #[["ice", #[["general", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " pours a bucket of ice water over ", <$generator, ["who", [], [], 'gen_who]>, "'s head."], #[]]>], ["actor", <$ctext_frob, [["You pour a bucket of ice water over ", <$generator, ["who", [], [], 'gen_who]>, "'s head."], #[]]>], ["who", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " pours a bucket of ice water over your head."], #[]]>]]], ["eye", #[["general", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " eyes ", <$generator, ["who", [], [], 'gen_who]>, " warily."], #[]]>], ["actor", <$ctext_frob, [["You eye ", <$generator, ["who", [], [], 'gen_who]>, " warily."], #[]]>], ["who", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " eyes you warily."], #[]]>]]], ["pat", #[["general", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " pats ", <$generator, ["who", [], [], 'gen_who]>, " onna head."], #[]]>], ["actor", <$ctext_frob, [["You pat ", <$generator, ["who", [], [], 'gen_who]>, " onna head."], #[]]>], ["who", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " pats you onna head."], #[]]>]]], ["pummel", #[["general", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " pummels ", <$generator, ["who", [], [], 'gen_who]>, " into a milky white substance."], #[]]>], ["actor", <$ctext_frob, [["You pummel ", <$generator, ["who", [], [], 'gen_who]>, " into a milky white substance."], #[]]>], ["who", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " pummels you into a milky white substance. ouch."], #[]]>]]], ["prod", #[["general", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " prods ", <$generator, ["who", [], [], 'gen_who]>, " with a cowpoke."], #[]]>], ["actor", <$ctext_frob, [["You prod ", <$generator, ["who", [], [], 'gen_who]>, " with a cowpoke."], #[]]>], ["who", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " prods you with a cowpoke. ouch."], #[]]>]]], ["kick", #[["general", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " kicks ", <$generator, ["who", [], [], 'gen_who]>, " firmly in the kiester."], #[]]>], ["actor", <$ctext_frob, [["You kick ", <$generator, ["who", [], [], 'gen_who]>, " firmly in the kiester."], #[]]>], ["who", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " kicks you firmly in the kiester."], #[]]>]]], ["hug", #[["general", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " bear hugs ", <$generator, ["who", [], [], 'gen_who]>, "."], #[]]>], ["actor", <$ctext_frob, [["You bear hug ", <$generator, ["who", [], [], 'gen_who]>, "."], #[]]>], ["who", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " bear hugs you. oif."], #[]]>]]], ["beat", #[["general", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " pulls out a stick and beats the ", <$generator, ["who", [], [], 'gen_who]>, " repeatedly."], #[]]>], ["actor", <$ctext_frob, [["You pull out a stick and beat the ", <$generator, ["who", [], [], 'gen_who]>, " repeatedly."], #[]]>], ["who", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " pulls out a stick and beats you repeatedly."], #[]]>]]], ["hit", #[["general", <$ctext_frob, [["Boldly, ", <$generator, ["actor", [], [], 'gen_actor]>, " pulls out a stick and beats the ", <$generator, ["who", [], [], 'gen_who]>, " repeatedly."], #[]]>], ["actor", <$ctext_frob, [["Boldly, you pull out a stick and beat the ", <$generator, ["who", [], [], 'gen_who]>, " repeatedly."], #[]]>], ["who", <$ctext_frob, [["Boldly, ", <$generator, ["actor", [], [], 'gen_actor]>, " pulls out a stick and beats you repeatedly. oif."], #[]]>]]], ["peer", #[["general", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " peers suspiciously at ", <$generator, ["who", [], [], 'gen_who]>, "."], #[]]>], ["actor", <$ctext_frob, [["You peer suspiciously at ", <$generator, ["who", [], [], 'gen_who]>, "."], #[]]>], ["who", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " peers suspiciously at you."], #[]]>]]], ["bite", #[["general", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " BITES ", <$generator, ["who", [], [], 'gen_who]>, "."], #[]]>], ["actor", <$ctext_frob, [["You BITE ", <$generator, ["who", [], [], 'gen_who]>, "."], #[]]>], ["who", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " BITES you."], #[]]>]]], ["nip", #[["general", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " nips at ", <$generator, ["who", [], [], 'gen_who]>, "."], #[]]>], ["actor", <$ctext_frob, [["You nip at ", <$generator, ["who", [], [], 'gen_who]>, "."], #[]]>], ["who", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " nips at you."], #[]]>]]], ["poke", #[["general", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " firmly jabs ", <$generator, ["pro", [["actor", 1]], ["pp"], 'gen_pro]>, " index finger into ", <$generator, ["who", [], [], 'gen_who]>, "'s ribs."], #[]]>], ["actor", <$ctext_frob, [["You jab your index finger firmly into ", <$generator, ["who", [], [], 'gen_who]>, "'s ribs."], #[]]>], ["who", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " firmly jabs ", <$generator, ["pro", [["actor", 1]], ["pp"], 'gen_pro]>, " index finger into your ribs. oif."], #[]]>]]], ["bonk", #[["general", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " maliciously bonks ", <$generator, ["who", [], [], 'gen_who]>, " onna head."], #[]]>], ["actor", <$ctext_frob, [["You maliciously bonk ", <$generator, ["who", [], [], 'gen_who]>, " onna head."], #[]]>], ["who", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " maliciously bonks you onna head. oif."], #[]]>]]], ["fart", #[["general", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " farts in ", <$generator, ["who", [], [], 'gen_who]>, "'s general direction."], #[]]>], ["actor", <$ctext_frob, [["You fart in ", <$generator, ["who", [], [], 'gen_who]>, "'s general direction."], #[]]>], ["who", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " farts in your general direction."], #[]]>]]]]; var $has_commands local = \ - #[["test", [["test", "", "test", 'anti_cmd, #[]]]], ["ice", [["ice", "*", "ice <object>", 'anti_cmd, #[[1, ['object, []]]]]]],\ + #[["ice", [["ice", "*", "ice <object>", 'anti_cmd, #[[1, ['object, []]]]]]],\ ["eye",\ [["eye", "*", "eye <object>", 'anti_cmd, #[[1, ['object, []]]]]]],\ ["fart",\ @@ -19,7 +21,17 @@ ["prod",\ [["prod", "*", "prod <object>", 'anti_cmd, #[[1, ['object, []]]]]]],\ ["bonk",\ - [["bonk", "*", "bonk <object>", 'anti_cmd, #[[1, ['object, []]]]]]]]; + [["bonk", "*", "bonk <object>", 'anti_cmd, #[[1, ['object, []]]]]]],\ + ["hug",\ + [["hug", "*", "hug <object>", 'anti_cmd, #[[1, ['object, []]]]]]],\ + ["hit",\ + [["hit", "*", "hit <object>", 'anti_cmd, #[[1, ['object, []]]]]]],\ + ["peer",\ + [["peer", "*", "peer <object>", 'anti_cmd, #[[1, ['object, []]]]]]],\ + ["bite",\ + [["bite", "*", "bite <object>", 'anti_cmd, #[[1, ['object, []]]]]]],\ + ["nip",\ + [["nip", "*", "nip <object>", 'anti_cmd, #[[1, ['object, []]]]]]]]; var $has_commands remote = #[]; var $has_commands shortcuts = #[]; var $root created_on = 838182893; @@ -27,7 +39,6 @@ var $root inited = 1; var $root managed = [$antisocial]; var $root manager = $antisocial; -var $root owned = [$antisocial]; protected method .anti_cmd() { arg cmdstr, cmd, @who; @@ -37,16 +48,11 @@ vars = #[["$actor", this()], ["actor", .name()]]; if (who) vars = (vars.add("$who", who[1])).add("who", (who[1]).name()); - (.location()).announce(.eval_message(cmd, vars, definer())); - - // $#Edited: 08 Mar 97 22:13 $miro + (.location()).announce(.eval_message(cmd, definer(), vars)); }; public method .antisocial_msgs() { return antisocial_msgs; - - // $#Edited: 23 Jul 96 23:03 $xymox - // $#Edited: 08 Mar 97 22:13 $miro }; public method .set_antisocial() { @@ -59,9 +65,6 @@ compiler = $compiler; message = compiler.compile_cml(message); antisocial_msgs = antisocial_msgs.add(name, message); - - // $#Edited: 23 Jul 96 22:51 $xymox - // $#Edited: 08 Mar 97 22:13 $miro }; public method .test() { @@ -75,9 +78,6 @@ m = message.set_vars(vars); .tell(m); .announce(m, this()); - - // $#Edited: 23 Jul 96 23:23 $xymox - // $#Edited: 08 Mar 97 22:13 $miro }; diff -rwu src-3.0a7/bad_commands.cdc ColdCore-3.0a9.02/src/bad_commands.cdc --- src-3.0a7/bad_commands.cdc Sat Aug 9 19:09:30 1997 +++ ColdCore-3.0a9.02/src/bad_commands.cdc Tue Aug 19 12:15:18 1997 @@ -1,7 +1,7 @@ new object $bad_commands: $user_interfaces; -var $bad_commands non_supported_cmds = #[["quit", "@quit"], ["WHO", "@who"], ["@create", "@new"], ["help", "@help"], ["news", "@news"], ["page", "@page"], ["@gender", "@set gender"], ["uptime", "@status"], ["@alias", "@add-command-alias` or `@add-name-alias"], ["@check", "@monitor"], ["@paranoid", "@monitor"], ["@version", "@status"], ["@lock", "@set lock"], ["@unlock", "@set lock"]]; +var $bad_commands non_supported_cmds = #[["quit", "@quit"], ["WHO", "@who"], ["@create", "@new"], ["help", "@help"], ["news", "@news"], ["page", "@page"], ["@gender", "@set gender"], ["uptime", "@status"], ["@alias", "@add-command-alias` or `@add-name-alias"], ["@check", "@monitor"], ["@paranoid", "@monitor"], ["@version", "@status"], ["@lock", "@set lock"], ["@unlock", "@set lock"], ["+com", ["See: `@help Channels`"]]]; var $has_commands local = \ #[["@create", [["@create", "*", "@create <any>", 'old_command_cmd, #[[1, ['any, []]]]]]],\ ["help",\ @@ -27,13 +27,14 @@ ["@lock",\ [["@lock", "*", "@lock <any>", 'old_command_cmd, #[[1, ['any, []]]]]]],\ ["@unlock",\ - [["@unlock", "*", "@unlock <any>", 'old_command_cmd, #[[1, ['any, []]]]]]]]; + [["@unlock", "*", "@unlock <any>", 'old_command_cmd, #[[1, ['any, []]]]]]],\ + ["+com",\ + [["+com", "*", "+com <any>", 'old_command_cmd, #[[1, ['any, []]]]]]]]; var $root created_on = 796268969; var $root flags = ['methods, 'code, 'variables, 'core]; var $root inited = 1; var $root managed = [$bad_commands]; var $root manager = $bad_commands; -var $root owned = [$bad_commands]; public method .add_old_cmd_reference() { arg oldcmd, @newcmd; @@ -59,8 +60,12 @@ (> .perms(caller(), 'command) <); equiv = (| ($bad_commands.non_supported_cmds())[com] |); line = ("Oops, `" + com) + "` is not supported here."; - if (equiv) + if (equiv) { + if (type(equiv) == 'list) + line = (line + " ") + (equiv[1]); + else line = ((line + " Try `") + equiv) + "`"; + } .tell(line); .tell("Use `@help commands` for an explanation on the differences in commands."); }; diff -rwu src-3.0a7/body.cdc ColdCore-3.0a9.02/src/body.cdc --- src-3.0a7/body.cdc Sat Aug 9 19:09:30 1997 +++ ColdCore-3.0a9.02/src/body.cdc Tue Aug 19 12:15:18 1997 @@ -35,14 +35,12 @@ var $located location = $void; var $located obvious = 1; *var $location contents = ' ' body.cdc *var $root child_index = '-' body.cdc var $root created_on = 796268969; var $root fertile = 1; var $root flags = ['methods, 'code, 'fertile, 'variables, 'core, 'command_cache]; var $root inited = 1; var $root managed = [$body]; var $root manager = $body; -var $root owned = [$body]; var $thing gender = $gender_neuter; public method ._tell() { @@ -89,8 +87,6 @@ public method .actions() { return actions; - - // $#Edited: 17 Mar 97 13:51 $brandon }; protected method .add_interaction() { @@ -114,17 +110,17 @@ public method .description() { arg flags; - var ctext, what, w; + var ctext, what, w, o; + o = []; ctext = (> pass(flags) <); if ((w = .wearing())) - ctext += [((((.gender()).pronoun('psc)) + " is wearing ") + ((w.mmap('name)).to_english())) + "."]; + o += [((((.gender()).pronoun('psc)) + " is wearing ") + ((w.mmap('name)).to_english())) + "."]; // else - // ctext += [.gender().pronoun('psc) + " is naked, baring it all to the world."]; + // o += [.gender().pronoun('psc) + " is naked, baring it all to the world."]; + ctext += [$ctext_frob.new_with(o)]; return ctext; - - // $#Edited: 23 Dec 96 13:37 $brandon }; public method .directed_tell() { @@ -146,8 +142,6 @@ public method .environment() { return pass() + (wearing || []); - - // $#Edited: 27 Nov 96 14:01 $brandon }; protected method .esay_cmd() { @@ -164,8 +158,6 @@ throw(~perm, caller() + " is not $event_handler."); if (event == 'realm_announce) .tell_realm_announce(origin, args[1]); - - // $#Edited: 07 Mar 97 16:32 $miro }; protected method .handle_parser_result() { @@ -181,13 +173,13 @@ .ptell(r, #[['type, 'parser], ['command, more[2]]]); case 'failed: for c in (($place_lib.coordinate_shortcuts()).keys()) { - if (line.match_template(c)) { - .tell(("There is no exit " + line) + " here."); + if (action.match_template(c)) { + .tell(("There is no exit " + action) + " here."); r = 1; } } if (!r) - .tell(("I don't understand " + (line.chop((.linelen()) - 22))) + "."); + .tell(("I don't understand " + (action.chop((.actionlen()) - 22))) + "."); case 'ok: // do nothing, probably a null command default: @@ -205,8 +197,6 @@ default: return (> pass(type) <); } - - // $# Edited 28 Oct 1995 21:08 Lynx ($lynx) }; protected method .parse_interaction_reference() { @@ -303,8 +293,6 @@ arg what, flags; .tell(what); - - // $#Edited: 30 Nov 96 10:58 $brandon }; protected method .quote_cmd() { @@ -332,8 +320,6 @@ public method .reset_actions() { (| clear_var('actions) |); - - // $#Edited: 17 Mar 97 13:51 $brandon }; protected method .say_cmd() { @@ -378,29 +364,33 @@ public method .tell() { arg @args; - // $#Edited: 18 Dec 96 09:27 $brandon }; public method .tell_realm_announce() { arg realm, message; - var loc, r; + var loc, realm, propagator, prop_list, len, i; pause(); loc = .location(); - if (!(loc.will_propagate())) + if (!(propagator = loc.will_propagate())) return; - r = (.location()).realm(); - while (r != $realm) { - if (r == realm) { - .tell(message); + prop_list = [propagator]; + realm = (.location()).realm(); + while (realm != $realm) { + if (realm == realm) { + len = prop_list.length(); + for i in [1 .. len] { + message = message.propagate(prop_list[(len - i) + 1]); + if (!message) return; } - if (!(r.will_propagate())) + .tell(message); + } + if (!(propagator = realm.will_propagate())) return; - r = (r.parents())[1]; + prop_list += [propagator]; + realm = (realm.parents())[1]; } - - // $#Edited: 07 Mar 97 16:32 $miro }; public method .tell_traceback() { @@ -408,8 +398,6 @@ if ((.manager()) != this()) (.manager()).tell_traceback(traceback); - - // $#Edited: 17 Dec 96 21:20 $brandon }; protected method .think_cmd() { @@ -424,7 +412,10 @@ var targets, target, line; (> .perms(caller(), $user, $body) <); + catch ~ambig targets = (> .parse_interaction_reference(who, "say") <); + with + return (traceback()[1])[2]; .add_interaction('objs, targets); line = (((.name()) + " (to ") + ((targets.mmap('name)).to_english())) + ") "; if (message) diff -rwu src-3.0a7/body_cave.cdc ColdCore-3.0a9.02/src/body_cave.cdc --- src-3.0a7/body_cave.cdc Mon Aug 18 10:09:23 1997 +++ ColdCore-3.0a9.02/src/body_cave.cdc Tue Aug 19 12:15:20 1997 @@ -2,11 +2,12 @@ new object $body_cave: $place; var $described prose = []; +var $event_handler hooks = #[]; var $has_commands local = #[]; var $has_commands remote = #[]; var $has_commands shortcuts = #[]; var $has_name name = ['uniq, "Body Cave", "the Body Cave"]; *var $location contents = ' ' body_cave.cdc var $physical visibility = -100; var $place entrances = []; var $place exits = []; @@ -16,13 +17,11 @@ var $root inited = 1; var $root managed = [$body_cave]; var $root manager = $body_cave; -var $root owned = [$body_cave]; -var $root settings = #[["public-home", 1], ["propagate", 1]]; +var $root settings = #[["public-home", 1], ["propagate", 0], ["map-position", 0]]; public method .announce() { arg @who_cares; - // $#Edited: 18 Aug 96 22:06 $jenner }; diff -rwu src-3.0a7/bs_eval.cdc ColdCore-3.0a9.02/src/bs_eval.cdc --- src-3.0a7/bs_eval.cdc Sat Aug 9 19:09:48 1997 +++ ColdCore-3.0a9.02/src/bs_eval.cdc Tue Aug 19 12:15:17 1997 @@ -1,13 +1,11 @@ new object $bs_eval: $evaluator; *var $root child_index = '-' bs_eval.cdc var $root created_on = 837583704; var $root flags = ['variables, 'methods, 'code, 'core]; var $root inited = 1; var $root managed = [$bs_eval]; var $root manager = $bs_eval; -var $root owned = [$bs_eval]; public method ._separate_list() { arg sep, l; @@ -17,22 +15,30 @@ if (sep == "english") return [l.to_english()]; return [l.join(sep)]; +}; + +public method .eval_formatter() { + arg form, vars; + var text; - // $#Edited: 16 Jul 96 08:12 $kahuna - // $#Edited: 17 Jul 96 00:05 $kahuna - // $#Edited: 17 Jul 96 00:08 $jenner - // $#Edited: 18 Jul 96 14:56 $levi + if ((vars['time]) == 'post) { + [text, vars] = (vars['formatter]).eval_formatter(form, vars); + return [[text], vars]; + } + return pass(form, vars); }; -public method .gen_columnize() { +public method .gen_data() { arg vars, flags, args; - var v, cols; + var method, data; - cols = (| flags.getkey("cols") |) || "*"; [args, vars] = ._eval_ctext(args, vars); - return [[(cols == "*") ? (args.lcolumnize()) : (args.columnize(toint(cols)))], vars]; - - // $#Edited: 29 Nov 96 16:22 $miro + method = (| flags.getkey("source") |); + catch ~methodnf + data = (vars['this]).(tosym("gen_" + method))(); + with + return [[">>>invalid data source<<<"], vars]; + return [[data], vars]; }; public method .gen_def() { @@ -42,21 +48,25 @@ name = flags.getkey("var"); val = args[1]; return [[""], vars.add(name, val)]; - - // $#Edited: 29 Nov 96 17:14 $miro }; public method .gen_english() { arg vars, flags, args; - var sep, empty, and, text; + var sep, empty, and, text, item; - sep = ((| flags.getkey("separator") |) || ",") + " "; + sep = (| flags.getkey("separator") |) || ", "; empty = (| flags.getkey("empty") |) || "nothing"; and = (| flags.getkey("and") |) || " and "; [text, vars] = ._eval_ctext(args, vars); + if (((vars['time]) == 'pre) || find item in (text) where (type(item) == 'frob)) { + return [[(<$generator, ["english", flags, text, 'gen_english]>)], vars]; + } else { + if (type(sep) == 'list) + sep = sep[1]; + if (type(and) == 'list) + and = and[1]; return [[text.to_english(empty, and, sep)], vars]; - - // $#Edited: 29 Nov 96 16:22 $miro + } }; public method .gen_foreach() { @@ -78,19 +88,21 @@ if ((vars['time]) == 'pre) out = ._separate_list(sep, out); return [out, vars]; - - // $#Edited: 29 Nov 96 16:22 $miro }; public method .gen_join() { arg vars, flags, args; - var v, sep; + var v, sep, item; sep = (| flags.getkey("separator") |) || " "; [args, vars] = ._eval_ctext(args, vars); + if (((vars['time]) == 'pre) || find item in (args) where (type(item) == 'frob)) { + return [[(<$generator, ["join", flags, args, 'gen_join]>)], vars]; + } else { + if (type(sep) == 'list) + sep = sep[1]; return [._separate_list(sep, args), vars]; - - // $#Edited: 29 Nov 96 16:22 $miro + } }; public method .gen_name() { @@ -116,12 +128,6 @@ out += [name]; } return [._separate_list(sep, out), vars]; - - // $#Edited: 16 Jul 96 08:12 $kahuna - // $#Edited: 17 Jul 96 00:05 $kahuna - // $#Edited: 17 Jul 96 00:08 $jenner - // $#Edited: 29 Nov 96 16:22 $miro - // $#Edited: 30 Nov 96 21:22 $miro }; public method .gen_pro() { @@ -151,19 +157,12 @@ with return [[(">>ERROR: Invalid pronoun type '" + (args[1])) + "'.<<"], vars]; return [out, vars]; - - // $#Edited: 24 Jul 96 19:55 $jenner - // $#Edited: 29 Nov 96 17:14 $miro }; public method .gen_servername() { arg vars, flags, args; return [[$motd.server_name()], vars]; - - // $#Edited: 16 Jul 96 08:12 $kahuna - // $#Edited: 17 Jul 96 00:05 $kahuna - // $#Edited: 17 Jul 96 00:08 $jenner }; public method .gen_servname() { @@ -179,8 +178,6 @@ name = flags.getkey("var"); [text, vars] = ._eval_ctext(args[1], vars); return [[""], vars.add(name, text[1])]; - - // $#Edited: 29 Nov 96 16:22 $miro }; public method .gen_switch() { @@ -194,7 +191,6 @@ return ._eval_ctext(args[v], vars); if (args.contains('ranges)) { if ((num = v.is_numeric())) - ; n = toint(v); done = 0; for i in (args['ranges]) { @@ -211,8 +207,6 @@ if (args.contains('default)) return ._eval_ctext(args['default], vars); return [((vars['time]) == 'pre) ? [""] : "", vars]; - - // $#Edited: 22 Jan 97 16:37 $miro }; public method .gen_time() { @@ -221,10 +215,8 @@ [args, vars] = ._eval_ctext(args, vars); if (!args) - return [tostr(time()), vars]; + return [[tostr(time())], vars]; return [[$time.format(args[1])], vars]; - - // $#Edited: 29 Nov 96 16:22 $miro }; public method .gen_vars() { @@ -238,11 +230,6 @@ out += [v]; } return [._separate_list(sep, out), vars]; - - // $#Edited: 16 Jul 96 08:12 $kahuna - // $#Edited: 17 Jul 96 00:05 $kahuna - // $#Edited: 17 Jul 96 00:08 $jenner - // $#Edited: 30 Nov 96 21:22 $miro }; diff -rwu src-3.0a7/buffer.cdc ColdCore-3.0a9.02/src/buffer.cdc --- src-3.0a7/buffer.cdc Sat Aug 9 19:09:29 1997 +++ ColdCore-3.0a9.02/src/buffer.cdc Tue Aug 19 12:15:16 1997 @@ -6,7 +6,6 @@ var $root inited = 1; var $root managed = [$buffer]; var $root manager = $buffer; -var $root owned = [$buffer]; var $root trusted = []; public method .break_lines() { @@ -39,6 +38,26 @@ return out; }; +public method .bufsub() { + arg buf, a, b; + var i, la, lb, lt; + + // do we need a builtin for this? + // shagged from Kipp's core, until I write a builtin, optimized by Brandon + if ((a == b) || ((buflen(a) > buflen(buf)) || ((!a) || (!buf)))) + return buf; + la = buflen(a); + lb = buflen(b); + lt = buflen(buf) - la; + i = 1; + anticipate_assignment(); + while ((i < lt) && (i = bufidx(buf, a, i))) { + buf = (subbuf(buf, 1, i - 1) + b) + subbuf(buf, i + la); + i += lb; + } + return buf; +}; + public method .from_list() { arg list; var buf, i; @@ -54,7 +73,7 @@ public method .from_strings(): native; -private method .from_veil_pkts(): native; +public method .from_veil_pkts(): native; public method .length(): native; @@ -73,6 +92,6 @@ public method .to_strings(): native; -private method .to_veil_pkts(): native; +public method .to_veil_pkts(): native; diff -rwu src-3.0a7/builder.cdc ColdCore-3.0a9.02/src/builder.cdc --- src-3.0a7/builder.cdc Sat Aug 9 19:09:31 1997 +++ ColdCore-3.0a9.02/src/builder.cdc Tue Aug 19 12:15:19 1997 @@ -1,5 +1,5 @@ -new object $builder: $user; +new object $builder: $player; var $channel_ui active_channels = #[]; var $channel_ui channel_dict = #[]; @@ -14,7 +14,7 @@ ["@par?ents",\ [["@par?ents", "*", "@par?ents <object>", 'parents_cmd, #[[1, ['object, []]]]]]],\ ["@build",\ - [["@build", "*", "@build <any:-conf?igure>", 'build_cmd, #[[1, ['any_opt, [["conf?igure"]]]]]]]],\ + [["@build", "*", "@build <any:-conf?igure>", 'build_cmd, #[[1, ['any_opt, ["conf?igure"]]]]]]],\ ["@attach",\ [["@attach", "* to *", "@attach <any> to <descendant of $place>", 'attach_cmd, #[[1, ['any, []]], [3, ['descendant, [$place]]]]]]],\ ["@destroy",\ @@ -45,14 +45,12 @@ var $root inited = 1; var $root managed = [$builder]; var $root manager = $builder; -var $root owned = [$builder]; var $root quota = 75000; var $root settings = #[["home", $body_cave]]; var $thing gender = $gender_neuter; var $user connected_at = 0; var $user connections = []; -var $user context = #[['last, $body_cave]]; -var $user formatter = $mail_list; +var $user formatter = $plain_format; var $user last_command_at = 0; var $user modes = #[]; var $user parsers = [$command_parser]; @@ -68,7 +66,7 @@ source = .location(); } else { catch any - source = (> .match_environment(source_str) <); + source = (> .match_environment(source) <); with return (traceback()[1])[2]; if (!(source.is($place))) @@ -90,6 +88,17 @@ return ("Successfully attached exit " + (exit.name())) + "."; }; +public method .bug_fixed() { + arg list, subj, msg; + var err, mail; + + list = (> $mail_lib.match_mail_recipient(list) <); + mail = $mail_message.new_mail(); + mail.set_subject(subj); + mail.set_text(msg); + (> mail.send(list) <); +}; + protected method .build_attach_exit() { arg exit, source, dest; var line; @@ -97,7 +106,6 @@ catch any { exit.attach(source, dest); } with { - $brandon.tell_traceback(traceback()); .tell(("Unable to attach " + (exit.name())) + " because: "); .tell(" " + ((traceback()[1])[2])); line = .prompt("Continue building? "); @@ -170,8 +178,6 @@ if (exits[2]) (> (exits[2]).configure(set) <); return "Completed post-configuration."; - - // $#Edited: 19 Feb 97 02:36 $miro }; protected method .build_generate_exit() { @@ -366,8 +372,6 @@ } } return ans; - - // $#Edited: 30 Nov 96 21:22 $miro }; protected method .build_query_exit() { @@ -420,9 +424,6 @@ } } return realm; - - // $#Edited: 15 Feb 97 19:53 $miro - // $#Edited: 19 Feb 97 02:23 $miro }; protected method .build_set_name() { @@ -448,13 +449,18 @@ return [("Children of " + (what.namef('xref))) + ":"] + (._list_objects(what.children(), 'parents)); }; +root method .core_builder() { + // for now we dont core the bug system + (| .del_command("@bug?s <any>", 'bug_cmd) |); + (| .del_method('bug_cmd) |); +}; + protected method .define_msg_cmd() { arg cmdstr, cmd, args; - var what, opts, def, o, i, br, ref, compiler, defopts, eval; + var what, opts, def, o, i, br, ref, compiler, eval, getter; (> .perms(caller(), 'command) <); - defopts = [["b?ranches", 1], ["c?ompiler", 1], ["e?valuator", 1]]; - [args, opts] = $parse_lib.getopt(args, defopts); + [args, opts] = $parse_lib.opt(args, "b?ranches", "c?ompiler", "e?valuator", "g?etter"); args = join(args); what = split(args, " *: *"); if (listlen(what) != 2) @@ -519,6 +525,20 @@ } } } + if ((i = "g?etter" in o)) { + getter = (opts[i])[4]; + if (!getter) { + .tell("No getter specified with +getter=??"); + } else { + getter = (> tosym(getter) <); + catch any { + def.set_msg_attr(what, 'getter, getter); + .tell((("Set getter for " + ref) + " to ") + getter); + } with { + .tell((traceback()[1])[2]); + } + } + } }; protected method .destroy_cmd() { @@ -527,8 +547,8 @@ (> .perms(caller(), 'command) <); cmdstr = cmdstr.trim(); - if ((cmdstr.trim()) in ["@dest", "@destroy"]) { - yes = .prompt(("Destroy '" + name) + "'? "); + if (((cmdstr.trim()) in ["@dest", "@destroy"]) && ((objs.length()) > 0)) { + yes = .prompt(("Destroy '" + ((objs[1]).namef('xref))) + "'? "); if (!(yes in ["y", "yes"])) return "Ok, aborting.."; } @@ -634,8 +654,6 @@ return .build_cleanup([dest, dnew.and(1)], [leave, dnew.and(2)]); } } - - // $#Edited: 19 Feb 97 02:23 $miro }; public method .format_messages() { @@ -698,8 +716,168 @@ (> .perms(caller(), 'command) <); realms = ($place_lib.known_realms()).union($realm.descendants()); .tell(["Realms:", ""] + ((realms.mmap('name)).prefix(" "))); +}; + +public method .scan_bugs() { + arg buglist; + var bug, pos, choice, str, junk; + + .tell(""); + + // No bugs? Return: + if (!buglist) { + .tell("There are no bugs in this category."); + return; + } + pos = 1; + while (choice != "X") { + bug = buglist[pos]; + + // Get the current bug obref. + // Display the bug: + .tell(""); + .menubar((("Report " + tostr(pos)) + " of ") + tostr(buglist.length())); + + // if (.preference('pagination) == 'on) + // .tell_paginated(bug.format().prefix(" ")); + // else + .tell((bug.format()).prefix(" ")); + .menubar(); + str = "[RETURN] Next, [P]rev, [X] Exit, [C]laim, [F]ix, [D]ismiss, [A]ppend, [#]"; + + // Allow admins to archive: + //if (.is($admin)) + // str = str + "[A]rchive"; + choice = .prompt(str + ": "); + .tell(""); + if (choice == "@abort") + throw(~aborted, "Aborted!"); + if (choice && ((choice[1]) == "~")) { + .menubar("Execute Command"); + .execute_line(choice.subrange(2)); + .menubar(); + choice = 'do_nothing; + } + switch (choice) { + case 'do_nothing: + // Do nothing. + case "A": + // Append Text: + .tell("Append text to report..."); + junk = .read(); + if (junk && (junk != 'aborted)) { + bug.set_text((bug.text()) + ["----------------------------------------------------------------------------", ("Addendum by " + (.name())) + ":", @junk]); + .tell("Text appended."); + } else { + .tell("Aborted."); + } - // $#Edited: 15 Feb 97 19:53 $miro + // case "A": + // // Archive + // if (.is($admin)) { + // if (bug.fixed()) { + // bug.chparents($archived_bugs); + // .tell("Bug archived."); + // } else { + // .tell("You may only archive repaired bugs."); + // choice = 'no_scroll; + // } + // } + case "D": + // Dismiss + .tell("Enter a description of the dismissal:"); + str = .read(); + if ((str == 'aborted) || (!str)) { + .tell("Aborted."); + } else { + bug.set_text((bug.text()) + [("Addendum by " + (.name())) + ":", "", @str]); + $bug_handler.dismiss(bug); + + // bug.chparents($dismissed_bugs); + .tell("Bug dismissed."); + } + case "P": + // Previous + choice = 'no_scroll; + if (pos > 1) + pos--; + else + .tell("You are at the beginning of the list."); + case "F": + // Fix: + if ((bug.fixed()) && ((bug.owner()) != this())) { + .tell("This bug has already been marked as being fixed. If there are further problems, please submit another report."); + } else { + if (bug.fixed()) { + .tell("This bug has already been repaired."); + continue; + } + .tell("You may directly [P]aste the contents of the bug report to the player bug"); + str = .prompt("forum, [C]ompose a message to sent there, [RET] to do nothing, or e[X]it: "); + if (str == "P") { + .bug_fixed("*bug", (.name()) + " has repaired the following bug:", [@$mail_lib.indent_reply(bug.forum_format())]); + } else if (str == "C") { + junk = .read(); + if (junk && (type(junk) == 'list)) { + // .bug_fixed("*bugfix", @junk); + .bug_fixed("*bugs", (.name()) + " has repaired the following bug:", [@$mail_lib.indent_reply(bug.forum_format())] + [@junk]); + } + bug.set_fixed(time()); + .tell("You have marked this bug as being fixed."); + } else if (str == "x") { + bug.set_fixed(0); + .tell("Aborted."); + } else { + .bug_fixed("*bugs", (.name()) + " has repaired the following bug:", [@$mail_lib.indent_reply(bug.forum_format())]); + bug.set_fixed(time()); + .tell("You have marked this bug as being fixed."); + } + } + case "C": + // Claim: + if (bug.owner()) { + if ((bug.owner()) != this()) { + .tell(((bug.owner()).name()) + " must relinquish ownership of this bug before you can claim it."); + } else { + bug.set_owner(0); + .tell("You have relinquished ownership of this bug."); + } + } else { + bug.set_owner(this()); + .tell("This bug report is now under your ownership."); + } + case "": + // Next bug (works differently than scroll-to-next): + if (pos < (buglist.length())) + pos++; + else + .tell("You have reached the end of the list. Select 'x' to exit."); + case "X": + // Handler later. + default: + if (toint(choice)) { + choice = toint(choice); + if ((choice > 0) && (choice <= (buglist.length()))) { + pos = choice; + choice = 'no_scroll; + } else { + .tell("Number out of range."); + } + } else { + .tell("Invalid selection."); + } + } + + // Scroll to the next bug unless we got CR, -, X: + if (!(choice in ["", "-", "X", 'no_scroll])) { + if (pos < (buglist.length())) { + pos++; + } else { + .tell("You have reached the end of the list. Exiting."); + return; + } + } + } }; protected method .teleport() { @@ -707,8 +885,12 @@ var m, source, vars; source = .location(); - if (!(| .move_to(dest) |)) + catch any { + .move_to(dest); + } with { + .tell((traceback()[1])[2]); return 0; + } vars = #[["$actor", this()], ["actor", .name()], ["$source", source], ["source", source.name()], ["$dest", dest], ["dest", dest.name()]]; m = .eval_message("teleport", $builder, vars); dest.announce(m); @@ -755,8 +937,6 @@ } if (!(.teleport(loc))) .tell("Sorry."); - - // $#Moved 12 Feb 97 11:01 from $programmer.teleport_cmd() by $brandon }; protected method .undefine_msg_cmd() { @@ -766,7 +946,7 @@ (> .perms(caller(), 'command) <); // it niggles the string enough to 'clean' up little mistakes - [args, opts] = $parse_lib.getopt(args, [["b?ranches", 1], ["c?ompiler", 1]]); + [args, opts] = $parse_lib.opt(args, "b?ranches", "c?ompiler"); args = join(args); what = split(args, " *: *"); if (listlen(what) != 2) diff -rwu src-3.0a7/callback.cdc ColdCore-3.0a9.02/src/callback.cdc --- src-3.0a7/callback.cdc Sat Aug 9 19:09:33 1997 +++ ColdCore-3.0a9.02/src/callback.cdc Tue Aug 19 12:15:36 1997 @@ -6,7 +6,6 @@ var $root inited = 1; var $root managed = [$callback]; var $root manager = $callback; -var $root owned = [$callback]; public method .exec() { arg self, @args; diff -rwu src-3.0a7/carry_lock_frob.cdc ColdCore-3.0a9.02/src/carry_lock_frob.cdc --- src-3.0a7/carry_lock_frob.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/carry_lock_frob.cdc Tue Aug 19 12:15:35 1997 @@ -11,14 +11,14 @@ arg value, @type; return "owner:" + ((value[1]).name()); - - // $#Edited: 13 Feb 97 12:31 $miro }; -public method .new() { - return (<this(), #[]>); +public method .new_lock() { + arg obj; - // $#Edited: 13 Feb 97 12:31 $miro + if (type(obj) != 'objnum) + throw(~perm, "Argument is not a dbref."); + return (<this(), [obj]>); }; public method .try() { @@ -26,8 +26,6 @@ lock = lock[1]; return (lock == obj) || ((lock in (obj.contents())) || ((obj == sender()) || ($sys.is_system(obj)))); - - // $#Edited: 13 Feb 97 13:06 $miro }; diff -rwu src-3.0a7/channel_db.cdc ColdCore-3.0a9.02/src/channel_db.cdc --- src-3.0a7/channel_db.cdc Sat Aug 9 19:09:46 1997 +++ ColdCore-3.0a9.02/src/channel_db.cdc Tue Aug 19 12:15:21 1997 @@ -20,18 +20,48 @@ d = d.add(@x); } .set_database(d); - - // $#Edited: 02 Nov 96 17:43 $brad }; root method .core_channel_db() { - .clean_db(); + var elem, key, value, d; + + d = #[]; + for elem in (.database()) { + refresh(); + [key, value] = elem; + if (!valid(value[5])) + continue; + if (filter elem in (value[6]) where (!valid(elem))) + continue; + d = d.add(key, value); + } + .set_database(d); +}; + +public method .search() { + arg channel; + var key; + + if (type(channel) != 'symbol) + key = .strip_key(channel); + else + key = channel; + catch ~keynf, ~matchnf + return (> .exact_match(key) <); + with + throw(~keynf, "Unknown channel: " + channel); +}; + +public method .strip_key() { + arg channel; + var key; + + anticipate_assignment(); + return lowercase(tostr(channel)).to_symbol(); }; public method .system_channels() { return system_channels; - - // $#Edited: 03 Nov 96 17:24 $brad }; diff -rwu src-3.0a7/channel_parser.cdc ColdCore-3.0a9.02/src/channel_parser.cdc --- src-3.0a7/channel_parser.cdc Sat Aug 9 19:09:47 1997 +++ ColdCore-3.0a9.02/src/channel_parser.cdc Tue Aug 19 12:15:36 1997 @@ -6,7 +6,6 @@ var $root inited = 1; var $root managed = [$channel_parser]; var $root manager = $channel_parser; -var $root owned = [$channel_parser]; var $user_parsers priority = 5000; public method .parse() { diff -rwu src-3.0a7/channel_ui.cdc ColdCore-3.0a9.02/src/channel_ui.cdc --- src-3.0a7/channel_ui.cdc Sat Aug 9 19:09:30 1997 +++ ColdCore-3.0a9.02/src/channel_ui.cdc Tue Aug 19 12:15:18 1997 @@ -7,8 +7,6 @@ var $channel_ui credits = ["Chuck and Brad"]; var $has_commands local = \ #[["@desc-c?hannel", [["@desc-c?hannel", "* as *", "@desc-c?hannel <any> as <any>", 'describe_channel_cmd, #[[1, ['any, []]], [3, ['any, []]]]]]],\ - ["@ch?annels",\ - [["@ch?annels", "*", "@ch?annels <any:+f?ull +d?etailed>", 'list_channels_cmd, #[[1, ['any_opt, [["f?ull"], ["d?etailed"]]]]]]]],\ ["@join-lock-channel|@jlc",\ [["@join-lock-channel|@jlc", "* with|to *", "@join-lock-channel|@jlc <any> with|to <any>", 'channel_add_lock_cmd, #[[1, ['any, []]], [3, ['any, []]]]]]],\ ["@leave-lock-channel|@llc",\ @@ -25,8 +23,8 @@ [["@del-ch?annel|@delcom", "*", "@del-ch?annel|@delcom <any>", 'delcom_cmd, #[[1, ['any, []]]]]]],\ ["@purge-channel",\ [["@purge-channel", "*", "@purge-channel <any>", 'channel_purge_cmd, #[[1, ['any, []]]]]]],\ - ["@blahblahblah",\ - [["@blahblahblah", "* * * *", "@blahblahblah <any> <any> <any> <any>", 'addcom_cmd, #[[1, ['any, []]], [2, ['any, []]], [3, ['any, []]], [4, ['any, []]]]]]]]; + ["@ch?annels",\ + [["@ch?annels", "*", "@ch?annels <any:+f?ull +d?etailed>", 'channels_cmd, #[[1, ['any_opt, ["f?ull", "d?etailed"]]]]]]]]; var $has_commands remote = #[]; var $has_commands shortcuts = #[]; var $root created_on = 838251646; @@ -34,7 +32,6 @@ var $root inited = 1; var $root managed = [$channel_ui]; var $root manager = $channel_ui; -var $root owned = [$channel_ui]; var $root trusted_by = [$channel_db]; public method ._broadcast() { @@ -45,31 +42,22 @@ throw(~perm, "You are not allowed to call $channel_ui._broadcast() directly"); for q in ($user_db.connected()) q.channel_msg(channel, message); - - // $#Edited: 03 Nov 96 16:16 $brad - // $#Edited: 03 Nov 96 16:24 $brad }; private method ._del_active_channel() { arg key; active_channels = active_channels.del(key); - - // $#Edited: 22 Feb 97 02:49 $brad }; public method ._del_channel_dict() { arg key; channel_dict = channel_dict.del(key); - - // $#Edited: 22 Feb 97 03:36 $brad }; public method .active_channels() { return active_channels; - - // $#Edited: 02 Nov 96 18:39 $brad }; protected method .addcom_cmd() { @@ -85,7 +73,7 @@ } else { channel = tosym(elements[2]); lowerchannel = tosym((elements[2]).lowercase()); - db = (| $channel_db.exact_match(lowerchannel) |) || 0; + db = (| $channel_db.search(lowerchannel) |) || 0; if (type(db) == 'list) { if ((type(db[3]) == 'frob) && ((!((db[3]).try(sender()))) && (!($sys.is_system(sender()))))) return ("Sorry, channel " + (db[1])) + " is join-locked."; @@ -102,9 +90,6 @@ channel_dict = channel_dict.add(elements[1], db[1]); .channel_on(db[1]); return msg; - - // $#Edited: 15 Feb 97 18:04 $brad - // $#Edited: 22 Feb 97 02:15 $brad }; public method .broadcast() { @@ -114,12 +99,12 @@ (> .perms(sender()) <); // is this really a command?. If so, do the command. + catch any { switch (msg) { case "who": if ((channel in ($channel_db.system_channels())) && (!($sys.is_system(sender())))) return "Sorry, that's a listen only channel."; - .channel_members(channel); - return; + return .channel_members(channel); case "off": .channel_off(channel); return; @@ -127,6 +112,9 @@ .channel_on(channel); return; } + } with { + return (traceback()[1])[2]; + } if ((channel in ($channel_db.system_channels())) && (channel != 'All)) return "Sorry, that's a listen only channel."; if (!(active_channels.contains(channel))) @@ -146,10 +134,6 @@ message = (spammer_name + ": ") + msg; } ._broadcast(channel, message); - - // $#Edited: 15 Feb 97 17:20 $brad - // $#Edited: 15 Feb 97 18:00 $brad - // $#Edited: 15 Feb 97 18:02 $brad }; public method .can_create_channel() { @@ -157,9 +141,6 @@ return 1; else return 0; - - // $#Edited: 06 Nov 96 10:49 $brad - // $#Edited: 08 Nov 96 21:30 $brad }; protected method .channel_add_lock_cmd() { @@ -178,7 +159,7 @@ modestr = "use"; } channel = tosym(this.lowercase()); - db = (| $channel_db.exact_match(channel) |) || 0; + db = (| $channel_db.search(channel) |) || 0; if (type(db) == 'list) { if ((!(sender() in (db[6]))) && (!($sys.is_system(sender())))) { return "Sorry, you're not on the manager list for that channel."; @@ -202,8 +183,6 @@ } else { return "Channel not found, nothing locked."; } - - // $#Edited: 15 Feb 97 17:34 $brad }; public method .channel_add_manager() { @@ -213,7 +192,7 @@ channel = (| tosym(channel.lowercase()) |) || 0; if (channel == 0) return "@add-channel-manager|@acm <user> to <channel>"; - db = (| $channel_db.exact_match(channel) |) || 0; + db = (| $channel_db.search(channel) |) || 0; if (db == 0) return "That channel does not exist."; if ((sender() != (db[5])) && (!($sys.is_system(sender())))) @@ -222,24 +201,42 @@ return ((user.name()) + " is already a manager of channel ") + (db[1]); $channel_db.value_changed(channel, db.replace(6, [@db[6], user])); return "Manager added."; - - // $#Edited: 30 Nov 96 21:22 $miro - // $#Edited: 08 Dec 96 12:47 $brad - // $#Edited: 22 Feb 97 02:15 $brad }; public method .channel_alias() { arg ch_alias; return (| channel_dict[ch_alias] |) || ""; +}; - // $#Edited: 24 Jul 96 18:50 $user_chuck +public method .channel_command() { + arg cmd, args, opts, detailed, full; + var ch, syn, cmd; + + syn = ("Syntax: " + cmd) + " <channel> <command>"; + if (listlen(args) < 2) + return [syn, "Where <command> is one of: WHO, OFF, ON, or INFO"]; + [ch, cmd, @args] = args; + switch (cmd) { + case "who": + if ((ch in ($channel_db.system_channels())) && (!($sys.is_system(this())))) + return "Sorry, that's a listen only channel."; + return .channel_members(ch, full); + case "off": + .channel_off(ch); + return; + case "on": + .channel_on(ch); + return; + case "info": + return; + default: + return ("Unknown @channel command: " + cmd) + ", should be: WHO, OFF, ON or INFO"; + } }; public method .channel_creation() { return channel_creation; - - // $#Edited: 08 Nov 96 21:24 $brad }; public method .channel_del_manager() { @@ -249,7 +246,7 @@ channel = (| tosym(channel.lowercase()) |) || 0; if (channel == 0) return "@add-channel-manager|@acm <user> from <channel>"; - db = (| $channel_db.exact_match(channel) |) || 0; + db = (| $channel_db.search(channel) |) || 0; if (db == 0) return "That channel does not exist."; if ((sender() != (db[5])) && (!($sys.is_system(sender())))) @@ -258,39 +255,51 @@ return ((user.name()) + " is not a manager of channel ") + (db[1]); $channel_db.value_changed(channel, db.replace(6, (db[6]).del(user))); return "Manager deleted."; - - // $#Edited: 08 Dec 96 12:48 $brad - // $#Edited: 22 Feb 97 02:15 $brad }; public method .channel_dict() { return channel_dict; +}; + +public method .channel_member() { + arg channel; - // $#Edited: 02 Nov 96 18:39 $brad + return channel in dict_values(channel_dict || #[]); }; public method .channel_members() { - arg channel; - var q, members; + arg channel, @full; + var q, members, name, who, line; members = []; - for q in ($user_db.connected()) { + [(full ?= 0)] = full; + if (full) { + line = ("All members of channel " + channel) + " ('*'=listening, '!'=not connected):"; + who = $user_db.user_dbrefs(); + } else { + line = ("Connected members of channel " + channel) + " ('*'=listening):"; + who = $user_db.connected(); + } + for q in (who) { + if (!valid(q)) + continue; + if (q.channel_member(channel)) { + if (q.connected()) + name = " " + (q.name()); + else + name = "!" + (q.name()); if (q.listen_channel(channel)) - members += [q.name()]; + members += ["*" + name]; + else + members += [" " + name]; } - .tell(("Listening to channel " + channel) + ":"); - .tell(members.columnize(4)); - return members; - - // $#Edited: 24 Jul 96 18:49 $user_chuck - // $#Edited: 30 Nov 96 21:22 $miro + } + return ([line] + ((members.vcolumnize(4, (.linelen()) - 4)).prefix(" "))) + ["---"]; }; public method .channel_moderator_ok() { (> .check_mojo() <); return 1; - - // $#Edited: 24 Jul 96 18:23 $user_chuck }; public method .channel_msg() { @@ -299,8 +308,6 @@ (caller() == definer()) || (> .perms(sender(), 'system) <); if ((channel == 'All) || (active_channels.contains(channel))) .tell((("<" + channel) + "> ") + msg); - - // $#Edited: 15 Feb 97 17:44 $brad }; protected method .channel_off() { @@ -315,8 +322,6 @@ } else { .tell("You are not on this channel."); } - - // $#Edited: 20 Nov 96 20:36 $brad }; protected method .channel_on() { @@ -331,8 +336,6 @@ } else { .tell("You are already on this channel."); } - - // $#Edited: 15 Feb 97 17:58 $brad }; public method .channel_purge_cmd() { @@ -341,8 +344,8 @@ channel = (| tosym(channel.lowercase()) |) || 0; if (channel == 0) - return "@add-channel-manager|@acm <user> to <channel>"; - db = (| $channel_db.exact_match(channel) |) || 0; + return "@purge-channel <channel>"; + db = (| $channel_db.search(channel) |) || 0; if (db == 0) return "That channel does not exist."; if ((sender() != (db[5])) && (!($sys.is_system(sender())))) @@ -357,8 +360,64 @@ pause(); } return "Channel deleted."; +}; + +protected method .channels_cmd() { + arg cmdstr, cmd, args; + var opts, f, d, cur_channels, cd_keys, cd_values, i, alias, db, active, msg, match_with, match_pattern, tmp, form, add, o; - // $#Edited: 22 Feb 97 03:38 $brad + (> .perms(caller(), 'command) <); + [args, opts] = args; + o = opts.slice(1); + if ((f = (| "f?ull" in o |))) + f = (opts[f])[3]; + if ((d = (| "d?etailed" in o |))) + d = (opts[d])[3]; + if (listlen(args) > 1) { + catch any { + cmd = (| ($channel_db.search(args[1]))[1] |); + return .channel_members(cmd, f); + } with { + return (traceback()[1])[2]; + } + } + cd_keys = channel_dict.keys(); + cd_values = channel_dict.values(); + cur_channels = f ? ((($channel_db.database()).values()).slice(1)) : cd_values; + if (args) { + match_with = (| .get_setting("match-with", $programmer) |) || 'match_pattern; + match_pattern = (| (args[1])[1] |) || ((| .get_setting("match-default", $programmer) |) || "*"); + cur_channels = filter f in (cur_channels) where ((f.to_string()).(match_with)(match_pattern) != 0); + } + if (!cur_channels) + return "No channels found."; + msg = []; + add = []; + for i in (cur_channels) { + alias = (| cd_keys[i in cd_values] |) || ""; + db = (| $channel_db.search(tostr(i)) |); + if (type(db) == 'list) { + msg += [[(active_channels.contains(i)) ? "*" : " ", alias, tostr(db[1]), (db[7]) || "<no description>"]]; + form = "%26r: %50l"; + if (d) { + tmp = [form.format("Number of users", tostr(db[2])), form.format("Owner", (db[5]).name()), form.format("Managers", ((db[6]).mmap('namef, 'name)).to_english())]; + if (db[3]) + tmp += [form.format("Join Lock", (db[3]).lock_name())]; + if (db[4]) + tmp += [form.format("Leave Lock", (db[4]).lock_name())]; + if (db[8]) + tmp += [form.format("Use Lock", (db[8]).lock_name())]; + add += [tmp]; + } + } else { + msg += [[(active_channels.contains(i)) ? "*" : " ", alias, "", "Channel not in database!"]]; + } + refresh(); + } + msg = (msg.transpose()).tabulate([["", ""], ["Alias", "-----"], ["Channel", "-------"], ["Description", "-----------"]]); + if (d) + msg = [msg[1], msg[2], @map i in [3 .. msg.length()] to ([msg[i]] + (add[i - 2])).sum()]; + return [@msg, " -----"]; }; protected method .delcom_cmd() { @@ -368,16 +427,18 @@ (> .perms(caller(), 'command) <); del_from_db = 1; msg = ("Channel alias " + args) + " deleted."; + if (!args) + return ("Syntax: " + cmd) + " <channel>"; dict_var = channel_dict[args]; - channel = (| tosym(((channel_dict[args]).to_string()).lowercase()) |) || 0; + channel = (| (((channel_dict[args]).to_string()).lowercase()).to_symbol() |) || 0; if (type(channel) == 'symbol) { - db = (| $channel_db.exact_match(channel) |) || 0; + db = (| $channel_db.search(channel) |) || 0; if (type(db) == 'list) { if ((type(db[4]) == 'frob) && ((!((db[4]).try(sender()))) && (!($sys.is_system(sender()))))) return "Channel leave locked, you can't leave it!"; } else { del_from_db = 0; - msg = ("That channel didn't seem to be in the channel database. Channel alias " + args) + " deleted."; + msg = ("That channel does not seem to be in the channel database. Channel alias " + args) + " deleted."; } } else { return "You do not have that channel alias defined."; @@ -388,8 +449,6 @@ .channel_off(dict_var); channel_dict = channel_dict.del(args); return msg; - - // $#Edited: 16 Feb 97 22:36 $brad }; protected method .describe_channel_cmd() { @@ -400,70 +459,18 @@ channel = (| tosym(channel.lowercase()) |) || 0; if (channel == 0) return "@desc-ch?annel <channel> as <description>"; - db = (| $channel_db.exact_match(channel) |) || 0; + db = (| $channel_db.search(channel) |) || 0; if (db == 0) return "That channel does not exist."; - if ((!(sender() in (db[6]))) && (!($sys.is_system()))) + if ((!(sender() in (db[6]))) && (!($sys.is_system(sender())))) return "You are not a manager for channel " + (db[1]); $channel_db.value_changed(channel, db.replace(7, desc)); return "Description updated."; - - // $#Edited: 08 Dec 96 12:47 $brad }; protected method .init_channel_ui() { channel_dict = #[]; active_channels = #[]; - - // $#Edited: 26 Aug 96 19:38 $user_chuck - // $#Edited: 27 Aug 96 17:45 $miro -}; - -protected method .list_channels_cmd() { - arg cmdstr, cmd, args; - var opts, f, d, cur_channels, cd_keys, cd_values, i, alias, db, active, msg, match_with, match_pattern, tmp, form, add; - - (> .perms(caller(), 'command) <); - opts = (args[2]).slice(1); - if ((f = (| "f?ull" in opts |))) - f = ((args[2])[f])[3]; - if ((d = (| "d?etailed" in opts |))) - d = ((args[2])[d])[3]; - cd_keys = channel_dict.keys(); - cd_values = channel_dict.values(); - cur_channels = f ? ((($channel_db.database()).values()).slice(1)) : cd_values; - match_with = (| .get_setting("match-with", $programmer) |) || 'match_pattern; - match_pattern = (| (args[1])[1] |) || ((| .get_setting("match-default", $programmer) |) || "*"); - cur_channels = filter f in (cur_channels) where ((f.to_string()).(match_with)(match_pattern) != 0); - if (!cur_channels) - return "No channels found."; - msg = []; - add = []; - for i in (cur_channels) { - alias = (| cd_keys[i in cd_values] |) || ""; - db = (| $channel_db.exact_match(tosym((i.to_string()).lowercase())) |); - if (type(db) == 'list) { - msg += [[(active_channels.contains(i)) ? "*" : " ", alias, tostr(db[1]), (db[7]) || "<no description>"]]; - form = "%26r: %50l"; - if (d) { - tmp = [form.format("Number of users", tostr(db[2])), form.format("Owner", (db[5]).name()), form.format("Managers", ((db[6]).mmap('namef, 'name)).to_english())]; - if (db[3]) - tmp += [form.format("Join Lock", (db[3]).lock_name())]; - if (db[4]) - tmp += [form.format("Leave Lock", (db[4]).lock_name())]; - if (db[8]) - tmp += [form.format("Use Lock", (db[8]).lock_name())]; - add += [tmp]; - } - } else { - msg += [[(active_channels.contains(i)) ? "*" : " ", alias, "", "Channel not in database!"]]; - } - refresh(); - } - msg = (msg.transpose()).tabulate([["", ""], ["Alias", "-----"], ["Channel", "-------"], ["Description", "-----------"]]); - if (d) - msg = [msg[1], msg[2], @map i in [3 .. msg.length()] to ([msg[i]] + (add[i - 2])).sum()]; - return [@msg, " -----"]; }; public method .listen_channel() { @@ -472,8 +479,6 @@ if (active_channels.contains(channel)) return 1; return 0; - - // $#Edited: 22 Aug 96 19:55 $user_chuck }; public method .uninit_channel_ui() { @@ -484,15 +489,13 @@ .channel_off(c[2]); channel = (| tosym(((c[2]).to_string()).lowercase()) |) || 0; if (type(channel) == 'symbol) { - db = (| $channel_db.exact_match(channel) |) || 0; + db = (| $channel_db.search(channel) |) || 0; if (type(db) == 'list) $channel_db.value_changed(channel, db.replace(2, (db[2]) - 1)); } } active_channels = #[]; channel_dict = #[]; - - // $#Edited: 16 Feb 97 22:58 $brad }; diff -rwu src-3.0a7/climate.cdc ColdCore-3.0a9.02/src/climate.cdc --- src-3.0a7/climate.cdc Sat Aug 9 19:09:47 1997 +++ ColdCore-3.0a9.02/src/climate.cdc Tue Aug 19 12:15:20 1997 @@ -7,14 +7,12 @@ var $has_commands local = #[]; var $has_commands remote = #[["@list-climate", [["@list-climate", "*", "@list-climate <this>", 'show_cmd, #[[1, ['this, []]]]]]], ["@setup", [["@setup", "* seasons * daylengths *", "@setup <this> seasons <any> daylengths <any>", 'setup_cmd, #[[1, ['this, []]], [3, ['any, []]], [5, ['any, []]]]]]], ["@add-weather", [["@add-weather", "* type * prob?abilities *", "@add-weather <this> type <descendant of $weather> prob?abilities <any>", 'add_weather_cmd, #[[1, ['this, []]], [3, ['descendant, [$weather]]], [5, ['any, []]]]]]], ["@del-weather", [["@del-weather", "* type *", "@del-weather <this> type <descendant of $weather>", 'del_weather_cmd, #[[1, ['this, []]], [3, ['descendant, [$weather]]]]]]]]; var $has_commands shortcuts = #[]; *var $root child_index = '-' climate.cdc var $root created_on = 839895133; var $root flags = ['variables, 'methods, 'code, 'core]; var $root help_node = $help_sys_climate; var $root inited = 1; var $root managed = [$climate]; var $root manager = $climate; -var $root owned = [$climate]; public method ._probabilities() { arg from, season, fuzz; @@ -27,8 +25,6 @@ // normalize the list - the sum should be around 10,000 sum = (dists.slice(2)).sum(); return map i in (dists) to ([i[1], ((i[2]) * 10000) / sum]); - - // $#Edited: 07 Mar 97 15:28 $miro }; public method .add_weather_cmd() { @@ -41,8 +37,6 @@ throw(~parse, "Wrong number of probabilities."); weathers = weathers.add(weather, probs); return ("Weather `" + (weather.name())) + "' added."; - - // $#Edited: 08 Feb 97 21:36 $miro }; public method .advance() { @@ -73,16 +67,12 @@ vars = #[["weather", current.name()], ["weather_desc", current.prose()], ["season", season]]; vars = vars.union(current.attribute_vars()); return vars; - - // $#Edited: 15 Feb 97 19:22 $miro }; public method .daylength() { arg season; return daylengths[season in seasons]; - - // $#Edited: 15 Feb 97 19:22 $miro }; public method .del_weather_cmd() { @@ -94,8 +84,6 @@ return "That weather doesn't belong to this climate."; weathers = weathers.del(weather); return ("Weather `" + (weather.name())) + "' removed."; - - // $#Edited: 08 Feb 97 21:36 $miro }; public method .match_weather() { @@ -107,8 +95,6 @@ if ((out = find i in (weathers.keys()) where (weather_str.match_begin(i.name())))) return (weathers.keys())[out]; throw(~keynf, "No such weather in this climate."); - - // $#Edited: 19 Feb 97 03:39 $miro }; public method .setup_cmd() { @@ -120,8 +106,6 @@ daylengths = map i in (dls.explode()) to (toint(i)); weathers = #[]; return ("Seasons: " + (seasons.to_english())) + ". The weather list has been wiped."; - - // $#Edited: 08 Feb 97 21:36 $miro }; public method .show_cmd() { @@ -129,8 +113,6 @@ var out, x, i; return ((map i in (weathers) to ([(i[1]).name(), @i[2]]).transpose()).tabulate([["Weather type", "------------"], @map i in (seasons) to ([i, "".pad(i.length(), "-")])])) + ["---"]; - - // $#Edited: 08 Feb 97 21:36 $miro }; diff -rwu src-3.0a7/climate_frob.cdc ColdCore-3.0a9.02/src/climate_frob.cdc --- src-3.0a7/climate_frob.cdc Sat Aug 9 19:09:33 1997 +++ ColdCore-3.0a9.02/src/climate_frob.cdc Tue Aug 19 12:15:36 1997 @@ -6,7 +6,6 @@ var $root inited = 1; var $root managed = [$climate_frob]; var $root manager = $climate_frob; -var $root owned = [$climate_frob]; public method ._distances() { arg self, from, season; @@ -15,16 +14,12 @@ w = self[3]; refattr = (w[from])[1]; return map i in (w.keys()) to ([i, ((map j in [1 .. (attr = (w[i])[1]).length()] to (abs((attr[j]) - (refattr[j]))).sum()) * 100) / (((w[i])[2])[season])]); - - // $#Edited: 30 Jul 96 21:57 $jenner }; public method .add_weather() { arg self, name, attrs, probs, message, ch_messages; return (<this(), [self[1], self[2], (self[3]).add(name, [attrs, probs, message, ch_messages])]>); - - // $#Edited: 20 Jul 96 18:47 $jenner }; public method .advance() { @@ -38,24 +33,18 @@ while ((i < (dists.length())) && (random(20 + ((dists[i])[2])) < fuzz)) i++; return (dists[i])[1]; - - // $#Edited: 30 Jul 96 22:15 $jenner }; public method .del_weather() { arg self, weather; return (<this(), [self[1], self[2], (self[3]).del(weather)]>); - - // $#Edited: 20 Jul 96 18:47 $jenner }; public method .new_with() { arg attributes, seasons; return (<this(), [attributes, seasons, #[]]>); - - // $#Edited: 20 Jul 96 18:47 $jenner }; public method .read_new() { @@ -124,8 +113,6 @@ } } return out; - - // $#Edited: 20 Jul 96 18:47 $jenner }; diff -rwu src-3.0a7/climate_taobh_thiar.cdc ColdCore-3.0a9.02/src/climate_taobh_thiar.cdc --- src-3.0a7/climate_taobh_thiar.cdc Sat Aug 9 19:09:47 1997 +++ ColdCore-3.0a9.02/src/climate_taobh_thiar.cdc Tue Aug 19 12:15:20 1997 @@ -12,6 +12,5 @@ var $root inited = 1; var $root managed = [$climate_taobh_thiar]; var $root manager = $climate_taobh_thiar; -var $root owned = [$climate_taobh_thiar]; diff -rwu src-3.0a7/code_lib.cdc ColdCore-3.0a9.02/src/code_lib.cdc --- src-3.0a7/code_lib.cdc Sat Aug 9 19:09:29 1997 +++ ColdCore-3.0a9.02/src/code_lib.cdc Tue Aug 19 12:15:16 1997 @@ -7,7 +7,6 @@ var $root inited = 1; var $root managed = [$code_lib]; var $root manager = $code_lib; -var $root owned = [$code_lib]; public method ._debug_listing() { arg list; @@ -24,16 +23,32 @@ } else { if (!t) t = i[1]; - j = strfmt("%6r %l%l(%l)", (i[1]) - t, indent, ._show_ref(i), (toliteral(i[5]).match_pattern("[*]"))[1]); + j = strfmt("%6r %l%l(%l)", (i[1]) - t, indent, (._show_ref(i)).replace("()", ""), (toliteral(i[5]).match_pattern("[*]"))[1]); out += [j]; indent += " "; } refresh(); } return out; +}; - // $#Edited: 07 Feb 97 03:44 $miro - // $#Edited: 17 Mar 97 01:02 $brad +public method ._do_method_href() { + arg method, object; + var mod_method, prefix, postfix, index; + + prefix = ""; + postfix = ""; + if ((method[1]) != ".") { + index = stridx(method, "."); + prefix = method.subrange(1, index); + method = method.subrange(index + 1); + } else { + prefix = "."; + method = method.subrange(2); + } + postfix = "("; + method = method.subrange(1, (method.length()) - 1); + return (((((((prefix + "<A HREF=\"/bin/method?target=") + object) + ".") + method) + "\">") + method) + "</A>") + postfix; }; public method ._profile_listing() { @@ -100,8 +115,6 @@ refresh(); } return out; - - // $#Edited: 22 Feb 97 03:06 $brad }; public method ._trace_profile() { @@ -152,6 +165,40 @@ quotes += [quote]; }; +public method .code_to_html() { + arg code, object; + var line, object_parse, results, obj_regexp, meth_regexp, chunk, word, method_parse, last_word, mode, chunk_out, meth_r2; + + obj_regexp = "\$[a-zA-Z0-9_]+"; + meth_regexp = "((^)|[ (!])\.[a-zA-Z0-9_]+\("; + meth_r2 = "^(\.[a-zA-Z0-9_]+\()(.*)$"; + results = []; + for line in (code) { + object_parse = line.global_regexp(obj_regexp); + last_word = 0; + chunk_out = ""; + while (object_parse) { + [chunk, (word ?= 0), @object_parse] = object_parse; + if (last_word && (method_parse = chunk.regexp(meth_r2))) { + chunk_out += ._do_method_href(method_parse[1], last_word); + chunk = method_parse[2]; + } + method_parse = chunk.global_regexp(meth_regexp); + mode = 0; + chunk_out += map chunk in (method_parse) to ((mode = !mode) ? chunk : (._do_method_href(chunk, object))).join(""); + if (word) { + last_word = word; + if ((| $object_lib.to_dbref(word) |)) + chunk_out += ((("<A HREF=\"/bin/display?target=" + ((last_word = word).subrange(2))) + "\">") + word) + "</A>"; + else + chunk_out += word; + } + } + results += [chunk_out + (object_parse.join(""))]; + } + return results; +}; + public method .generate_debug_listing() { arg info, mode; @@ -197,23 +244,44 @@ }; public method .parse_name() { - arg name; - var article, args, flag; + arg name, @def; + var article, match, flag, type, tmps, ignore; // used to parse $has_name names and name templates - [name, flag] = $parse_lib.getopt(name, [["u?nique"], ["p?roper"], ["n?ormal"]]); + [name, flag] = $parse_lib.opt(name, "u?nique", "p?roper", "n?ormal", "i?gnore"); name = name.join(); - flag = (| flag.last() |) || ["p?roper", "p", 1, ""]; + if (flag) { + def = [@def, ["p?roper", "p", 1, ""]][1]; + flag = (| flag.last() |) || def; + if ((flag[1]) == "i?gnore") { + article = 'prop; + ignore = 1; + } else { switch (flag[1]) { case "n?ormal": - article = 'normal; + type = 'normal; case "u?nique": + type = 'uniq; + case "p?roper": + type = 'prop; + } + } + } + [name, @tmps] = name.split(" *, *"); + if (!ignore) { + if ((match = name.regexp("^the +(.*)$"))) { article = 'uniq; - default: + name = match[1]; + } else if ((match = name.regexp("^(a|an) +(.*)$"))) { + article = 'normal; + name = match[2]; + } else { article = 'prop; } - name = name.split(" *, *"); - return [[name[1], article], name.subrange(2)]; + if (type && (article != type)) + throw(~article, (("Conflicting name types " + type) + " and ") + article); + } + return [[name, article], tmps]; }; public method .point_to_line() { @@ -379,50 +447,6 @@ last = c; } return out; -}; - -public method .unparse_command() { - arg command; - var x, line; - - // command should be passed as a list, and can either be a command - // or shortcut. This will return a string. - if ((command.length()) == 2) - return toliteral(command[1]); - line = ""; - for x in (command[3]) { - if (type(x) == 'string) - line = (line + (line ? " " : "")) + x; - else - line = ((line + (line ? " " : "")) + "%") + tostr(x); - } - return ((("\"" + (command[1])) + "\" => \"") + line) + "\""; -}; - -public method .valid_email() { - arg email; - var host, user, ip, tmp; - - email = email.explode("@"); - if ((email.length()) != 2) - return ['invalid, email, ""]; - [user, host] = email; - - // if you want it to lookup the names, remove this return - // when .hostname() and .ip() don't block this is a viable option - return ['valid, user, host]; - if (!host) - return ['invhostname, user, host]; - if (toint(host[1])) { - tmp = $network.hostname(host); - if (tmp == "-1") - return ['invip, user, host]; - } else { - tmp = $network.ip(host); - if (tmp == "-1") - return ['invhostname, user, host]; - } - return ['valid, user, host]; }; public method .valid_message_id() { diff -rwu src-3.0a7/command_aliases.cdc ColdCore-3.0a9.02/src/command_aliases.cdc --- src-3.0a7/command_aliases.cdc Sat Aug 9 19:09:30 1997 +++ ColdCore-3.0a9.02/src/command_aliases.cdc Tue Aug 19 12:15:18 1997 @@ -7,7 +7,6 @@ var $root inited = 1; var $root managed = [$command_aliases]; var $root manager = $command_aliases; -var $root owned = [$command_aliases]; public method .add_command_alias() { arg alias, actual; @@ -25,9 +24,6 @@ command_aliases = command_aliases.setremove(a); } command_aliases += [[(relation[1])[1], (relation[2])[2]]]; - - // $# Edited 18 Oct 1995 12:55 Lynx ($lynx) - // $#Edited: 30 Nov 96 21:22 $miro }; public method .all_command_aliases() { @@ -65,8 +61,6 @@ } } throw(~aliasnf, ("alias `" + alias) + "' is not found"); - - // $# Edited 18 Oct 1995 13:19 Lynx ($lynx) }; root method .init_command_aliases() { diff -rwu src-3.0a7/command_aliases_parser.cdc ColdCore-3.0a9.02/src/command_aliases_parser.cdc --- src-3.0a7/command_aliases_parser.cdc Sat Aug 9 19:09:46 1997 +++ ColdCore-3.0a9.02/src/command_aliases_parser.cdc Tue Aug 19 12:15:36 1997 @@ -6,7 +6,6 @@ var $root inited = 1; var $root managed = [$command_aliases_parser]; var $root manager = $command_aliases_parser; -var $root owned = [$command_aliases_parser]; var $root trusted = []; var $user_parsers priority = 750; diff -rwu src-3.0a7/command_cache.cdc ColdCore-3.0a9.02/src/command_cache.cdc --- src-3.0a7/command_cache.cdc Sat Aug 9 19:09:28 1997 +++ ColdCore-3.0a9.02/src/command_cache.cdc Tue Aug 19 12:15:17 1997 @@ -6,14 +6,12 @@ var $command_cache remote_cache = 0; var $command_cache shortcut_cache = 0; var $has_commands shortcuts = #[]; *var $root child_index = '-' command_cache.cdc var $root created_on = 796605573; var $root fertile = 1; var $root flags = ['methods, 'code, 'fertile, 'variables, 'core]; var $root inited = 1; var $root managed = [$command_cache]; var $root manager = $command_cache; -var $root owned = [$command_cache]; public method .add_command_interface() { arg interface; @@ -35,8 +33,6 @@ .add_to_local_cache(part[1]); } } - - // $#Edited: 06 Jan 96 13:18 Lynx ($lynx) }; public method .add_object_to_remote_cache() { @@ -112,6 +108,17 @@ } }; +root method .core_command_cache() { + if (this() == definer()) { + interfaces = (local_cache = (remote_cache = (shortcut_cache = 0))); + } else { + (| clear_var('interfaces) |); + (| clear_var('local_cache) |); + (| clear_var('remote_cache) |); + (| clear_var('shortcut_cache) |); + } +}; + public method .del_command_interface() { arg interface; @@ -144,8 +151,6 @@ } } } - - // $#Edited: 30 Nov 96 20:00 $miro }; public method .del_object_from_remote_cache() { @@ -172,16 +177,12 @@ matches = matches.union(match); } return matches; - - // $#Edited: 08 Jan 96 18:47 Lynx ($lynx) }; public method .find_in_local_cache() { arg cmd; return (> local_cache[cmd] <); - - // $#Edited: 08 Jan 96 18:48 Lynx ($lynx) }; protected method .find_in_local_caches() { @@ -200,8 +201,6 @@ arg cmd; return (> remote_cache[cmd] <); - - // $#Edited: 08 Jan 96 18:48 Lynx ($lynx) }; public method .find_in_remote_caches() { @@ -214,20 +213,14 @@ matches = matches.union(match); } return matches; - - // $#Edited: 08 Jan 96 18:51 Lynx ($lynx) }; public method .interfaces() { return interfaces || []; - - // $#Edited: 03 Dec 96 12:49 $brandon }; public method .is_command_cache() { return 'command_cache in (.flags()); - - // $#Edited: 06 Jan 96 13:07 Lynx ($lynx) }; public method .local_cache() { @@ -361,8 +354,6 @@ (> .add_flag('command_cache) <); else (> .del_flag('command_cache) <); - - // $#Edited: 06 Jan 96 13:07 Lynx ($lynx) }; public method .shortcut_cache() { diff -rwu src-3.0a7/command_lib.cdc ColdCore-3.0a9.02/src/command_lib.cdc --- src-3.0a7/command_lib.cdc Sat Aug 9 19:09:29 1997 +++ ColdCore-3.0a9.02/src/command_lib.cdc Tue Aug 19 12:15:16 1997 @@ -7,7 +7,6 @@ var $root inited = 1; var $root managed = [$command_lib]; var $root manager = $command_lib; -var $root owned = [$command_lib]; public method ._parse_option_templates() { arg opt; diff -rwu src-3.0a7/command_parser.cdc ColdCore-3.0a9.02/src/command_parser.cdc --- src-3.0a7/command_parser.cdc Sat Aug 9 19:09:46 1997 +++ ColdCore-3.0a9.02/src/command_parser.cdc Tue Aug 19 12:15:36 1997 @@ -1,13 +1,11 @@ new object $command_parser: $user_parsers; *var $root child_index = '-' command_parser.cdc var $root created_on = 796680318; var $root flags = ['methods, 'code, 'core, 'variables]; var $root inited = 1; var $root managed = [$command_parser]; var $root manager = $command_parser; -var $root owned = [$command_parser]; public method ._local() { arg user, nmatch, match, template, method, info; @@ -100,12 +98,12 @@ case 'any: return str; case 'any_opt: - args = $parse_lib.getopt(str, argargs); + args = $parse_lib.opt(str, @argargs); return args; case 'object: return (> me.match_environment(str) <); case 'object_opt: - args = $parse_lib.getopt(str, argargs); + args = $parse_lib.opt(str, @argargs); if (!(args[1])) throw(~syntax, "No reference specified for command \""); obj = (> me.match_environment((args[1])[1]) <); @@ -113,7 +111,7 @@ case 'objref: return (> $parse_lib.ref(str, me) <); case 'objref_opt: - args = $parse_lib.getopt(str, argargs); + args = $parse_lib.opt(str, @argargs); if (!(args[1])) throw(~syntax, "No reference specified for command \""); obj = (> $parse_lib.ref((args[1])[1], me) <); @@ -125,7 +123,7 @@ return me; return (| $user_db.search(str) |) || throw(~match, ("Unable to find user " + str) + "."); case 'user_opt: - args = $parse_lib.getopt(str, argargs); + args = $parse_lib.opt(str, @argargs); if (!(args[1])) throw(~syntax, "Nobody specified for command \""); if (str == "me") @@ -134,7 +132,7 @@ case 'number: return (> str.to_number() <); case 'number_opt: - args = $parse_lib.getopt(str, argargs); + args = $parse_lib.opt(str, @argargs); if (!(args[1])) throw(~syntax, "No number specified for command \""); return [(> str.to_number() <), args[2]]; @@ -145,7 +143,7 @@ throw(~parse, strfmt("You cannot %s %s because it is not %s!", cmd, obj.name(), anc.name())); return obj; case 'descendant_opt: - args = $parse_lib.getopt(str, argargs); + args = $parse_lib.opt(str, @argargs); if (!(args[1])) throw(~syntax, "No descendant specified for command \""); obj = (> me.match_environment((args[1])[1]) <); @@ -182,8 +180,6 @@ return ['remote, matched]; } return ['partial, [[str, cmd], info.slice(3)]]; - - // $#Edited: 12 Aug 96 18:29 $jenner }; public method .handle_error() { @@ -208,7 +204,7 @@ public method .parse() { arg u, str, next_parser, @other_parsers; - var l, cmd, c, p, obj; + var l, cmd, c, p, obj, exits; cmd = str.explode(); if (cmd) { @@ -245,17 +241,21 @@ return .remote(u, @c[2]); p += c[2]; } - for obj in ((| (u.location()).exits() |) || []) { - if (obj.match_name(str)) + if ((exits = (| (u.location()).exits() |) || [])) { + catch any { + obj = exits.match_object(str); return ['command, obj, 'invoke]; + } with { + if (error() == ~ambig) { + exits = (traceback()[1])[3]; + return ['error, ((("\"" + str) + "\" can match ") + ((exits.mmap('namef, 'ref)).to_english("", " or "))) + "."]; + } + } } if (p) return .partial(u, cmd, p); } return next_parser.parse(u, str, @other_parsers); - - // $#Edited: 03 Mar 97 21:47 $brad - // $#Edited: 03 Mar 97 23:22 $user_brad }; public method .partial() { @@ -271,8 +271,6 @@ else line = toliteral(args[2]) + " could match any of "; return ['error, (line + (templates.to_english("", " or "))) + "."]; - - // $# Edited 18 Oct 1995 11:55 Lynx ($lynx) }; public method .remote() { diff -rwu src-3.0a7/compiler.cdc ColdCore-3.0a9.02/src/compiler.cdc --- src-3.0a7/compiler.cdc Sat Aug 9 19:09:48 1997 +++ ColdCore-3.0a9.02/src/compiler.cdc Tue Aug 19 12:15:17 1997 @@ -7,7 +7,6 @@ var $root inited = 1; var $root managed = [$compiler]; var $root manager = $compiler; -var $root owned = [$compiler]; public method ._check_glue() { arg tokens, i; @@ -24,9 +23,6 @@ return [j, (bracket == "{") ? 'fmtname : 'genname]; } return 0; - - // $#Edited: 22 Jan 97 21:05 $miro - // $#Edited: 22 Jan 97 21:40 $miro }; public method ._kill_spaces() { @@ -34,8 +30,6 @@ var i; return filter i in (list) where (i != " "); - - // $#Edited: 02 Nov 96 19:38 $miro }; public method ._make_tag() { @@ -98,16 +92,12 @@ throw(~parse, "No name for {detail}."); dets = dets.add(name, args); return [$format.new_tag("detail", flags, []), vars.add('details, dets)]; - - // $#Edited: 30 Oct 96 23:38 $miro }; public method .do_dl() { arg vars, flags, args; return [$format.new_tag("dl", flags, ._kill_spaces(args)), vars]; - - // $#Edited: 02 Nov 96 19:41 $miro }; public method .do_link() { @@ -131,34 +121,108 @@ return [$format.new_tag("link", flags, args), vars.add('links, links)]; }; +public method .do_method() { + arg vars, flags, args; + var m; + + if (!(m = (| ((flags.to_list())[1])[1] |))) + throw(~parse, "{method} syntax: {method OBJ.METHOD:text}"); + if ((m[1]) != "$") + m = "$" + m; + m = (> $parse_lib.ref(m) <); + if ((m[1]) != 'method) + throw(~parse, "{method} target is not a method reference"); + m = (substr(tostr(m[2]), 2) + ".") + (m[4]); + return [$format.new_tag("method", [m], args), vars]; +}; + +public method .do_obj() { + arg vars, flags, args; + + if (!dict_contains(flags, "context")) + throw(~parse, "no context flag for {obj}"); + if (!dict_contains(flags, "object")) + throw(~parse, "no object flag for {obj}"); + if (listlen(args) == 0) + throw(~parse, "{obj} requires an arg of the name"); + flags = flags.replace("context", tosym(flags["context"])); + return [$format.new_tag("obj", flags, args), vars]; +}; + public method .do_ol() { arg vars, flags, args; return [$format.new_tag("ol", flags, ._kill_spaces(args)), vars]; }; +public method .do_switch() { + arg vars, flags, args; + var current, d, tag, i, m, r; + + if (listlen(args) == 0) + throw(~parse, "[switch] requires arguments."); + if (!(| flags["value"] |)) + throw(~parse, "Value flag missing."); + d = #[]; + r = []; + tag = (current = 0); + + // The last default is a dummy - it forces the parser to flush current + for i in (args + [$generator.new_tag("default", [], [])]) { + if ((type(i) == 'frob) && ((class(i) == $generator) && ((i.name()) in ["case", "default", "range"]))) { + if (tag != 0) { + if (type(tag) == 'list) + r += [[@tag.subrange(2), current]]; + else + d = d.add(tag, current); + } + current = []; + switch (i.name()) { + case "case": + if ((((i.args()).length()) != 1) || (type((tag = (i.args())[1])) != 'string)) + throw(~parse, "[case:...] takes only a single string as an argument."); + case "range": + if ((((i.args()).length()) != 1) || (!(| ((m = ((i.args())[1]).match_pattern("*..*")).length()) == 2 |))) + throw(~parse, "range tag should look like [range:lower..upper]."); + tag = ['range, @m]; + case "default": + tag = 'default; + } + } else { + if (tag == 0) + throw(~parse, "Expression before [case]"); + current += [i]; + } + } + if (r) + d = d.add('ranges, r); + return [$format.new_tag("switch", flags, d), vars]; +}; + public method .do_table() { arg vars, flags, args; return [$format.new_tag("table", flags, ._kill_spaces(args)), vars]; - - // $#Edited: 02 Nov 96 19:39 $miro }; public method .do_tr() { arg vars, flags, args; return [$format.new_tag("tr", flags, ._kill_spaces(args)), vars]; - - // $#Edited: 02 Nov 96 19:39 $miro }; public method .do_ul() { arg vars, flags, args; return [$format.new_tag("ul", flags, ._kill_spaces(args)), vars]; +}; + +public method .gen_data() { + arg vars, flags, args; - // $#Edited: 02 Nov 96 19:40 $miro + if (!(flags.contains("source"))) + throw(~parse, "no source flag for [data]"); + return [$generator.new_tag("data", flags, args), vars]; }; public method .gen_switch() { @@ -203,14 +267,10 @@ if (r) d = d.add('ranges, r); return [$generator.new_tag("switch", flags, d), vars]; - - // $#Edited: 22 Jan 97 16:37 $miro }; public method .glue_table() { return glue_table; - - // $#Edited: 22 Jan 97 15:32 $miro }; public method .parse_string_new() { @@ -334,8 +394,6 @@ if (mode != ['plain]) throw(~parse, "Unclosed tag."); return [out, vars]; - - // $#Edited: 14 Feb 97 02:29 $miro }; public method .tokenize() { diff -rwu src-3.0a7/connection.cdc ColdCore-3.0a9.02/src/connection.cdc --- src-3.0a7/connection.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/connection.cdc Tue Aug 19 12:15:36 1997 @@ -18,13 +18,12 @@ var $connection started_at = 0; var $connection tid = 0; var $connection timeout = 0; *var $root child_index = '-' connection.cdc var $root created_on = 809051864; +var $root defined_settings = #[["interface", #[['get, ['get_interface]], ['set, ['set_interface]], ['parse, ['parse_interface]]]]]; var $root flags = ['methods, 'code, 'core, 'variables]; var $root inited = 1; var $root managed = [$connection]; var $root manager = $connection; -var $root owned = [$connection]; public method .abort_reading_block() { (> .perms(sender()) <); @@ -41,13 +40,18 @@ }; public method .address() { + arg @nolookup; + var name; + (> .perms(sender()) <); return remote_addr; - - // if you want, remove the above return and you will exec the following - // note: this currently blocks everything while doing name lookups - if (!remote_name) - remote_name = .hostname(remote_addr); + if (!remote_name) { + name = (| $dns.hostname(remote_addr) |); + if (name) + remote_name = name; + else + remote_name = remote_addr; + } return remote_name; }; @@ -76,7 +80,7 @@ }; public method .close() { - (> .perms(sender()) <); + (sender() != this()) && (> .perms(sender()) <); (> $sys.destroy_sender() <); }; @@ -102,15 +106,10 @@ }; protected method .do_timeout() { - $brad.debug("do_timeout"); if (!timeout) return; .write(("Timeout (" + tostr(timeout)) + ")"); .close(); - - // $#Edited: 03 Dec 96 02:02 $brad - // $#Edited: 03 Dec 96 02:10 $brad - // $#Edited: 03 Dec 96 02:16 $brad }; public method .finish_reading_block() { @@ -123,6 +122,16 @@ $scheduler.resume(task_id, lines); }; +protected method .get_ident() { + return $ident_connection.get(remote_addr, remote_port, local_port); +}; + +protected method .get_interface() { + arg @args; + + return interface; +}; + root method .init_connection() { buffer = `[]; local_addr = (remote_addr = ""); @@ -132,8 +141,6 @@ // remove all flags .set_flags([]); - - // $#Edited: 03 Dec 96 02:01 $brad }; public method .interface() { @@ -195,6 +202,14 @@ } }; +public method .parse_interface() { + arg value, @args; + var obj; + + obj = (> $object_lib.to_dbref(value) <); + return obj; +}; + protected method .parse_line() { arg line; @@ -246,6 +261,12 @@ daemon = obj; }; +protected method .set_interface() { + arg name, definer, value, @args; + + interface = value; +}; + public method .set_remote_port() { arg port; @@ -273,14 +294,9 @@ local_addr = local; local_port = lport; - // $brad.debug("timeout", timeout); // if (timeout) // $scheduler.add_task(timeout, 'do_timeout); interface.connection_starting(.address(), remote_port); - - // $#Edited: 03 Dec 96 02:11 $brad - // $#Edited: 03 Dec 96 02:15 $brad - // $#Edited: 03 Dec 96 11:33 $brad }; public method .start_reading_block() { @@ -300,7 +316,7 @@ (| close_connection() |); active = 0; if (interface) - (| interface.connection_going_away(.address(), remote_port) |); + (| interface.connection_going_away(remote_addr, remote_port) |); interface = 0; if (read_block) read_block = read_block.add('lines, 'disconnected); @@ -308,8 +324,6 @@ if (tid != (-1)) $scheduler.del_task(tid); tid = 0; - - // $#Edited: 03 Dec 96 02:14 $brad }; public method .write() { diff -rwu src-3.0a7/connection_interface.cdc ColdCore-3.0a9.02/src/connection_interface.cdc --- src-3.0a7/connection_interface.cdc Sat Aug 9 19:09:31 1997 +++ ColdCore-3.0a9.02/src/connection_interface.cdc Tue Aug 19 12:15:17 1997 @@ -5,13 +5,11 @@ var $has_commands local = #[]; var $has_commands remote = #[]; var $has_commands shortcuts = #[]; *var $root child_index = '-' connection_interface.cdc var $root created_on = 809051864; var $root flags = ['methods, 'code, 'core, 'variables]; var $root inited = 1; var $root managed = [$connection_interface]; var $root manager = $connection_interface; -var $root owned = [$connection_interface]; var $root quota_exempt = 1; public method .close() { @@ -32,7 +30,6 @@ public method .connection_starting() { arg addr, port; - // $#Edited: 03 Dec 96 01:05 $brad }; public method .daemon_shutdown() { @@ -109,8 +106,6 @@ return 'disconnect; } } - - // $#Edited: 18 Jul 96 14:56 $levi }; public method .send() { diff -rwu src-3.0a7/coord_exit.cdc ColdCore-3.0a9.02/src/coord_exit.cdc --- src-3.0a7/coord_exit.cdc Sat Aug 9 19:09:33 1997 +++ ColdCore-3.0a9.02/src/coord_exit.cdc Tue Aug 19 12:15:20 1997 @@ -90,8 +90,6 @@ public method .uninit_coord_exit() { (| clear_var('coordinates) |); - - // $#Moved 27 Nov 96 11:26 from $exit.uninit_coord_exit() by $brandon }; diff -rwu src-3.0a7/core.cdc ColdCore-3.0a9.02/src/core.cdc --- src-3.0a7/core.cdc Sat Aug 9 19:09:29 1997 +++ ColdCore-3.0a9.02/src/core.cdc Tue Aug 19 12:15:16 1997 @@ -1,12 +1,10 @@ -new object $core: $root; +new object $core: $root, $dmi_data; *var $root child_index = '-' core.cdc var $root created_on = 796268969; var $root flags = ['methods, 'code, 'core, 'variables]; var $root inited = 1; var $root managed = [$core]; var $root manager = $core; -var $root owned = [$core]; diff -rwu src-3.0a7/ctext_frob.cdc ColdCore-3.0a9.02/src/ctext_frob.cdc --- src-3.0a7/ctext_frob.cdc Sat Aug 9 19:09:33 1997 +++ ColdCore-3.0a9.02/src/ctext_frob.cdc Tue Aug 19 12:15:36 1997 @@ -6,23 +6,19 @@ var $root inited = 1; var $root managed = [$ctext_frob]; var $root manager = $ctext_frob; -var $root owned = [$ctext_frob]; public method ._ctext() { arg this; return this[1]; - - // $#Edited: 16 Jul 96 08:12 $kahuna - // $#Edited: 17 Jul 96 00:05 $kahuna - // $#Edited: 17 Jul 96 00:14 $jenner }; public method .append() { arg this, new, @br; - var data, tmp; + var data, tmp, vars; data = this[1]; + vars = this[2]; if (br) { switch (br[1]) { case "p": @@ -33,15 +29,15 @@ data += [$format.new_tag(br[1], [], [])]; } } - if (type(new) == 'list) + if (type(new) == 'list) { data += new; - else if ((type(new) == 'frob) && (class(new) == $ctext_frob)) + } else if ((type(new) == 'frob) && (class(new) == $ctext_frob)) { data += new._ctext(); - else + vars = (new.vars()).union(vars); + } else { data += [new]; - return (<this(), [data, this[2]]>); - - // $#Edited: 30 Nov 96 21:22 $miro + } + return (<this(), [data, vars]>); }; public method .eval_ctext() { @@ -56,8 +52,6 @@ vars = vars.add('evaluator, $bs_eval); vars = vars.union((vars['evaluator]).init()); return .new_with(@(vars['evaluator])._eval_ctext(this[1], vars)); - - // $#Edited: 29 Nov 96 16:22 $miro }; public method .format() { @@ -68,22 +62,18 @@ vars = vars.add('time, 'post); if (!(| vars['receiver] |)) vars = vars.add('receiver, sender()); + if (!(| vars['evaluator] |)) + vars = vars.add('evaluator, $bs_eval); if (!(| vars['formatter] |)) - vars = vars.add('formatter, $text_format); + vars = vars.add('formatter, $plain_format); vars = vars.union((vars['formatter]).init()); return (vars['formatter]).format(this[1], vars); - - // $#Edited: 29 Nov 96 16:22 $miro }; public method .get_var() { arg this, name; return (this[2])[name]; - - // $#Edited: 16 Jul 96 08:12 $kahuna - // $#Edited: 17 Jul 96 00:05 $kahuna - // $#Edited: 17 Jul 96 00:14 $jenner }; public method .new_with() { @@ -91,11 +81,6 @@ [(vars ?= #[])] = vars; return (<this(), [data, vars]>); - - // $#Edited: 16 Jul 96 08:12 $kahuna - // $#Edited: 17 Jul 96 00:05 $kahuna - // $#Edited: 17 Jul 96 00:14 $jenner - // $#Edited: 30 Nov 96 21:22 $miro }; public method .set_var() { @@ -105,25 +90,17 @@ vars = this[2]; vars = vars.add(name, value); return (<this(), [this[1], vars]>); - - // $#Edited: 16 Jul 96 08:12 $kahuna - // $#Edited: 17 Jul 96 00:05 $kahuna - // $#Edited: 17 Jul 96 00:14 $jenner }; public method .set_vars() { arg this, new; var vars, key; + return (<this(), [this[1], new.union(this[2])]>); vars = this[2]; for key in (new.keys()) vars = vars.add(key, new[key]); return (<this(), [this[1], vars]>); - - // $# Edited 26 Oct 1995 00:35 Lynx ($lynx) - // $#Edited: 16 Jul 96 08:12 $kahuna - // $#Edited: 17 Jul 96 00:05 $kahuna - // $#Edited: 17 Jul 96 00:14 $jenner }; public method .uncompile() { @@ -135,18 +112,12 @@ vars = vars.add('uncompiler, $uncompiler); vars = vars.union((vars['uncompiler]).init()); return ((vars['uncompiler])._eval_ctext(this[1], vars))[1]; - - // $#Edited: 29 Nov 96 16:22 $miro }; public method .vars() { arg this; return this[2]; - - // $#Edited: 16 Jul 96 08:12 $kahuna - // $#Edited: 17 Jul 96 00:05 $kahuna - // $#Edited: 17 Jul 96 00:14 $jenner }; diff -rwu src-3.0a7/daemon.cdc ColdCore-3.0a9.02/src/daemon.cdc --- src-3.0a7/daemon.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/daemon.cdc Tue Aug 19 12:15:36 1997 @@ -3,22 +3,21 @@ var $daemon connection = 0; var $daemon current_port = 0; -var $daemon default_port = 0; +var $daemon current_ports = 0; +var $daemon listen = 0; var $daemon next_connection = 0; *var $root child_index = '-' daemon.cdc var $root created_on = 809051864; -var $root defined_settings = #[["default-port", #[['get, ['get_default_port]], ['set, ['set_default_port]], ['parse, ['is_type, 'integer]]]], ["connection", #[['get, ['get_connection]], ['set, ['set_connection]], ['parse, ['parse_connection_setting]]]]]; +var $root defined_settings = #[["connection", #[['get, ['get_connection]], ['set, ['set_connection]], ['parse, ['parse_connection_setting]]]], ["listen", #[['get, ['get_listen]], ['set, ['set_listen]], ['parse, ['parse_listen]], ['format, ['format_listen]]]]]; var $root flags = ['methods, 'code, 'core, 'variables]; var $root inited = 1; var $root managed = [$daemon]; var $root manager = $daemon; -var $root owned = [$daemon]; driver method .connect() { arg remote, local, socket; var conn; - if ($sys.blacklisted(remote)) { + if ($sys.host_denied(remote)) { close_connection(); return; } @@ -27,15 +26,35 @@ conn = next_connection; reassign_connection(conn); next_connection = connection.new_connection(); - conn.start(remote, local, socket, current_port); + conn.start(remote, local, socket, (current_ports[1])[1]); }; root method .core_daemon() { .stop_listening(); + if (this() != definer()) + .set_setting("listen", $daemon, tostr(((.get_setting("listen", $daemon))[1])[1])); }; public method .current_port() { - return current_port; + return (current_ports[1])[1]; +}; + +public method .current_ports() { + return current_ports; +}; + +public method .format_listen() { + arg value, @noresolv; + var p, out; + + out = []; + for p in (value) { + if (listlen(p) > 1) + out += [((noresolv ? (p[2]) : ($dns.hostname(p[2]))) + ":") + (p[1])]; + else + out += [p[1]]; + } + return out.join(", "); }; protected method .get_connection() { @@ -44,10 +63,10 @@ return connection; }; -public method .get_default_port() { +public method .get_listen() { arg @args; - return default_port; + return listen || []; }; public method .parse_connection_setting() { @@ -60,20 +79,57 @@ return obj; }; +public method .parse_listen() { + arg value, @args; + var out, p, m, port, ip; + + if (!value) + throw(~parse, "Invalid listen setting, must be a list of ports or host:ports."); + out = map p in (value.explode_english_list()) to ((> .parse_port(p) <)); + if (!out) + throw(~parse, "Invalid listen setting, must be a list of ports or host:ports."); + return out; +}; + +public method .parse_port() { + arg str; + var m, host, port, ip; + + if ((m = str.regexp("^([^:]+):(.*)$"))) { + [host, port] = m; + host = host.trim(); + port = port.trim(); + if (host) { + ip = $dns.ip(host); + if (ip == "-1") + throw(~parse, "Unable to resolv hostname: " + host); + host = ip; + } + } else { + port = str; + host = ""; + } + if (!(port.is_numeric())) + throw(~parse, "Invalid port: " + port); + port = toint(port); + if ((port <= 0) || (port > 65535)) + throw(~parse, ("Invalid port " + port) + " (out of range, must be 0 .. 65535)"); + if (host) + return [port, host]; + else + return [port]; +}; + protected method .set_connection() { arg name, definer, value, @args; connection = value; }; -protected method .set_default_port() { - arg name, definer, value, @args; +protected method .set_listen() { + arg name, definer, value; - // MOST systems don't allow this without root access--if you can do - // it go ahead and remove this code, in general its not safe. - if (value < 1024) - throw(~perm, "Set a port greater than 1024"); - default_port = value; + listen = value; }; public method .shutdown() { @@ -84,36 +140,57 @@ }; public method .start_listening() { - arg @port; + arg @ports; + var p, last; (> .perms(sender()) <); (| .stop_listening() |); - current_port = port ? (port[1]) : default_port; + ports ?= listen; + current_ports = []; + catch any { + for p in (ports) { + last = p; + bind_port(@p); + current_ports += [p]; + } + } with { + for p in (current_ports) + (| unbind_port(p[1]) |); + current_ports = []; + throw(error(), (traceback()[1])[2], last); + } next_connection = connection.new_connection(); - bind_port(current_port); - - // $#Edited: 22 Nov 96 17:54 $miro }; -public method .startup() { +public method .startup(): forked { arg @args; - var name, opt, port; + var match, port, rx, str, o, ports, msg; (> .perms(caller(), 'system) <); - catch any { - name = tostr(.objname()); - name = "-p" + (name.subrange(1, ("_" in name) - 1)); - opt = name in args; + rx = tostr(.objname()); + rx = ("-(p)" + substr(rx, 1, ("_" in rx) - 1)) + "=(.*)"; + if (find str in (args) where ((match = regexp(str, rx)))) { + [o, ports] = match; + ports = .parse_port(ports); + if (strcmp(o, "p") == 0) + ports = listen + ports; + } else { + ports = listen; } - port = (| toint(args[opt + 1]) |) || default_port; catch any { - (| .stop_listening() |); - (> .start_listening(port) <); - $sys.log(((("** Starting " + this()) + " on port ") + tostr(port)) + " **"); + (> .start_listening(@ports) <); + if (listlen(ports) > 1) + msg = " on ports "; + else + msg = " on port "; + $sys.log(((("** Starting " + this()) + msg) + (.format_listen(ports, 1))) + " **"); } with { switch (error()) { case ~bind: - $sys.log(("** Unable to bind to port " + tostr(port)) + "! **"); + if ((traceback()[1])[3]) + $sys.log(("** Unable to bind to port " + ((((traceback()[1])[3]).reverse()).join(":"))) + " **"); + else + $sys.log(("** Unable to bind " + this()) + " **"); default: $sys.log($parse_lib.traceback(traceback())); } @@ -121,11 +198,15 @@ }; public method .stop_listening() { - arg @port; + var p; (> .perms(sender()) <); + if (valid(connection)) (> connection.daemon_shutdown() <); (| clear_var('next_connection) |); + for p in (current_ports || []) + (| unbind_port(p[1]) |); + (| clear_var('current_ports) |); }; diff -rwu src-3.0a7/data_lib.cdc ColdCore-3.0a9.02/src/data_lib.cdc --- src-3.0a7/data_lib.cdc Sat Aug 9 19:09:47 1997 +++ ColdCore-3.0a9.02/src/data_lib.cdc Tue Aug 19 12:15:37 1997 @@ -3,6 +3,7 @@ var $root created_on = 849996459; var $root flags = ['variables, 'methods, 'code, 'core]; +var $root help_node = $help_obj_data_lib; var $root inited = 1; var $root managed = [$data_lib]; var $root manager = $data_lib; @@ -25,7 +26,7 @@ return hash i in (val) to ([i[1], refresh() && (.data_map(i[2], method, options, @args))]); case 'frob: if ((| (class = options['class]) |)) { - if (class == class(val)) + if ((| class(val) in class |)) return object ? object.(method)(val, @args) : val.(method)(@args); else return val; @@ -36,16 +37,12 @@ return object ? object.(method)(val, @args) : val.(method)(@args); return val; } - - // $#Edited: 07 Dec 96 15:51 $miro }; public method .is_valid_type() { arg type; return type in ['integer, 'float, 'string, 'buffer, 'symbol, 'list, 'objnum, 'dictionary, 'error, 'frob]; - - // $#Edited: 19 Jan 97 15:14 $brandon }; public method .unparse_indent() { @@ -73,8 +70,6 @@ default: return [toliteral(value)]; } - - // $#Edited: 07 Dec 96 15:18 $miro }; diff -rwu src-3.0a7/db.cdc ColdCore-3.0a9.02/src/db.cdc --- src-3.0a7/db.cdc Sat Aug 9 19:09:34 1997 +++ ColdCore-3.0a9.02/src/db.cdc Tue Aug 19 12:15:21 1997 @@ -2,13 +2,11 @@ new object $db: $misc; *var $db database = ' ' db.cdc *var $root child_index = '-' db.cdc var $root created_on = 796268969; var $root flags = ['methods, 'code, 'core, 'variables]; var $root inited = 1; var $root managed = [$db]; var $root manager = $db; -var $root owned = [$db]; protected method .clean_database() { var elem; @@ -22,8 +20,6 @@ public method .database() { return database; - - // $#Edited: 09 May 96 20:48 $jenner }; public method .exact_match() { @@ -35,14 +31,10 @@ if (match == ~keynf) throw(~matchnf, "No object by that key exists in the database."); return match; - - // $#Edited: 09 May 96 20:48 $jenner }; root method .init_db() { database = #[]; - - // $#Edited: 09 May 96 20:48 $jenner }; public method .insert() { @@ -64,9 +56,6 @@ val = (> .exact_match(old_key) <); .remove(old_key); .insert(new_key, val); - - // $#Edited: 09 May 96 20:48 $jenner - // $#Edited: 20 Jul 96 16:37 $jenner }; public method .match_begin() { @@ -109,8 +98,6 @@ if ((!(sender() == this())) && (!(.trusts(caller())))) (> .perms(sender(), 'writer) <); database = database.del(key); - - // $#Edited: 09 May 96 20:48 $jenner }; protected method .set_database() { @@ -122,8 +109,6 @@ root method .uninit_db() { database = 0; - - // $#Edited: 09 May 96 20:48 $jenner }; public method .value_changed() { @@ -134,8 +119,6 @@ (> .perms(sender(), 'writer) <); (> .remove(key) <); (> .insert(key, new_value) <); - - // $#Edited: 09 May 96 20:48 $jenner }; diff -rwu src-3.0a7/described.cdc ColdCore-3.0a9.02/src/described.cdc --- src-3.0a7/described.cdc Sat Aug 9 19:09:28 1997 +++ ColdCore-3.0a9.02/src/described.cdc Tue Aug 19 12:15:17 1997 @@ -2,26 +2,23 @@ new object $described: $has_name, $has_commands; var $described prose = []; +var $dmi_data descriptions = #[]; var $foundation edit_types = ["prose"]; var $has_commands remote = #[]; var $has_commands shortcuts = #[]; var $has_name name = ['uniq, "Generic Described Object", "the Generic Described Object"]; *var $root child_index = '-' described.cdc var $root created_on = 796268969; var $root flags = ['methods, 'code, 'variables, 'core]; var $root inited = 1; var $root managed = [$described]; var $root manager = $described; -var $root owned = [$described]; public method ._edit_prose_callback() { arg text, client_data; - (> .perms(sender()) <); + (> .perms(caller(), $editor_reference) <); .set_prose(text); - return "Description set."; - - // $#Edited: 18 Aug 96 20:14 $jenner + return ['success, ["Description set."]]; }; public method .configure() { @@ -67,9 +64,9 @@ arg flags; var out, name; - out = (<$ctext_frob, [[(<$format, ["subj", [], [.name()], 'do_subj]>)], #[]]>); + out = $ctext_frob.new_with([$cml_lib.format_subj_tag((.name()).capitalize())]); if ((| flags['prose] |)) - return [out, .prose()]; + return [out.append(.prose())]; return [out]; }; @@ -81,8 +78,6 @@ if (type(p) == 'frob) p = p.uncompile(); (> sender().invoke_editor(this(), '_edit_prose_callback, p, []) <); - - // $#Edited: 18 Aug 96 21:02 $jenner }; public method .get_description(): nooverride { @@ -90,11 +85,8 @@ var flags, f; flags = #[['prose, 1], ['actor, sender()]]; - if (dflags && (type(dflags[1]) == 'dictionary)) { - dflags = dflags[1]; - for f in (dflags.keys()) - flags = dict_add(flags, f, dflags[f]); - } + if (dflags && (type(dflags[1]) == 'dictionary)) + flags = (dflags[1]).union(flags); return .description(flags); }; @@ -124,9 +116,7 @@ public method .prose() { arg @no_default; - return prose || (no_default ? 0 : "You see nothing special"); - - // $#Edited: 18 Oct 96 13:13 $miro + return ((type(prose) == 'frob) ? (prose.set_var('this, this())) : prose) || (no_default ? 0 : "You see nothing special"); }; public method .set_prose() { diff -rwu src-3.0a7/dictionary.cdc ColdCore-3.0a9.02/src/dictionary.cdc --- src-3.0a7/dictionary.cdc Sat Aug 9 19:09:29 1997 +++ ColdCore-3.0a9.02/src/dictionary.cdc Tue Aug 19 12:15:16 1997 @@ -6,7 +6,6 @@ var $root inited = 1; var $root managed = [$dictionary]; var $root manager = $dictionary; -var $root owned = [$dictionary]; public method .add(): native; diff -rwu src-3.0a7/editor_parser.cdc ColdCore-3.0a9.02/src/editor_parser.cdc --- src-3.0a7/editor_parser.cdc Sat Aug 9 19:09:47 1997 +++ ColdCore-3.0a9.02/src/editor_parser.cdc Tue Aug 19 12:15:36 1997 @@ -9,19 +9,14 @@ var $root inited = 1; var $root managed = [$editor_parser]; var $root manager = $editor_parser; -var $root owned = [$editor_parser]; var $user_parsers priority = 250; public method .command_help() { return command_help; - - // $#Edited: 10 Dec 96 16:48 $brandon }; public method .commands() { return commands; - - // $#Edited: 10 Dec 96 16:55 $brandon }; public method .parse() { diff -rwu src-3.0a7/editor_reference.cdc ColdCore-3.0a9.02/src/editor_reference.cdc --- src-3.0a7/editor_reference.cdc Sat Aug 9 19:09:30 1997 +++ ColdCore-3.0a9.02/src/editor_reference.cdc Tue Aug 19 12:15:18 1997 @@ -15,19 +15,14 @@ var $root inited = 1; var $root managed = [$editor_reference]; var $root manager = $editor_reference; -var $root owned = [$editor_reference]; var $root settings = #[["local-editor", 'none]]; public method .active_editor() { return active_editor; - - // $#Edited: 06 Aug 96 16:38 $jenner }; public method .background_editor_sessions() { - return bg_sessions; - - // $#Edited: 11 Dec 96 14:26 $brandon + return bg_sessions || []; }; public method .cleanup_sessions() { @@ -60,6 +55,16 @@ return (> (info[1]).(info[2])(info[3], info[4]) <); }; +protected method .edit() { + arg ref, opts, type; + + if (.active_editor()) { + .tell("Storing active editor.."); + .store_editor(); + } + return .new_editor_session(ref, opts, type); +}; + public method .edit_cmd() { arg cmdstr, com, args; var syn, num, sess, out, type, i, e, bg; @@ -108,7 +113,7 @@ } return .reinvoke_editor(sess, "%" + num); } else { - args = $parse_lib.getopt(args, [["t?ype", 1]]); + args = $parse_lib.opt(args, "t?ype"); if ((i = "t?ype" in ((args[2]).slice(1)))) type = ((args[2])[i])[4]; type ?= "any"; @@ -116,11 +121,7 @@ args = replace(args, 1, (> $parse_lib.ref((args[1]).join()) <)); with return (traceback()[1])[2]; - if (.active_editor()) { - .tell("Storing active editor.."); - .store_editor(); - } - return .new_editor_session(@args, type); + return .edit(@args, type); } }; @@ -153,8 +154,6 @@ active_editor = $editor_session.spawn(); if (active_editor.startup(@args)) .add_parser($editor_parser); - - // $#Edited: 06 Aug 96 16:38 $jenner }; public method .local_editor() { @@ -180,9 +179,7 @@ status = "Compilation failed."; } active_editor = tmp; - return status; - - // $#Edited: 21 Aug 96 15:26 $jenner + return status[2]; }; public method .parse_local_editor() { @@ -212,6 +209,7 @@ [(session ?= active_editor), (name ?= "")] = session; if (session == 0) return "No session to resume."; + bg_sessions ?= []; if (active_editor && ((active_editor != session) || (!(| session.is_resumable() |)))) t = (.store_editor()) + " "; if ((!valid(session)) || (!(session in (bg_sessions + [active_editor])))) { @@ -224,7 +222,7 @@ bg_sessions = bg_sessions.setremove(active_editor); bg_sessions = filter i in (bg_sessions) where (valid(i)); .add_parser($editor_parser); - return (((t + "Resumed ") + active_editor) + (name ? (" " + name) : "")) + "."; + return [t, ("Resumed editing " + ((.active_editor()).session_name())) + ".", "Type 'help' to list available commands."]; }; public method .store_editor() { @@ -239,8 +237,6 @@ return "Editor session %s saved.".format(t); } return "No active editor."; - - // $#Edited: 06 Aug 96 16:38 $jenner }; diff -rwu src-3.0a7/editor_session.cdc ColdCore-3.0a9.02/src/editor_session.cdc --- src-3.0a7/editor_session.cdc Sat Aug 9 19:09:47 1997 +++ ColdCore-3.0a9.02/src/editor_session.cdc Tue Aug 19 12:15:37 1997 @@ -8,13 +8,11 @@ var $editor_session modified = 0; var $editor_session sender = 0; var $editor_session text = 0; *var $root child_index = '-' editor_session.cdc var $root created_on = 820684587; var $root flags = ['methods, 'code, 'fertile, 'core, 'variables]; var $root inited = 1; var $root managed = [$editor_session]; var $root manager = $editor_session; -var $root owned = [$editor_session]; public method ._parse_range() { arg what, @allow; @@ -38,8 +36,6 @@ if ((start < 1) || ((end > (listlen(text) + allow)) || (end < start))) throw(~range, "Illegal range."); return [start, end]; - - // $#Edited: 20 Dec 96 23:12 $brandon }; public method .abort_cmd() { @@ -210,7 +206,10 @@ (> .perms(caller(), 'command) <); number = number.trim(); + catch ~nonum number = (number == "$") ? (text.length()) : (number.to_number()); + with + return "You must set to a line number."; if ((number < 1) || (number > ((text.length()) + 1))) return "Out if range."; else @@ -220,49 +219,50 @@ public method .list_cmd() { arg cmd, tmpl, rangestr; - var start, end, out, i, j, k, l, lineno, rows; + var start, end, out, i, str, l, lineno, rows, lines, diff; (> .perms(caller(), $user, definer()) <); if (text == []) return "There is no text."; rangestr = rangestr.trim(); - if (!rangestr) { l = text.length(); - rows = (sender().get_rows()) / 2; - start = line - rows; - end = line + rows; + if (!rangestr) { + rows = sender().get_rows(); + start = line - (rows / 2); + end = line + (rows / 2); if (start < 1) { - end = (end + 1) - start; - if (end > l) - end = l; - start = 1; - } else if (end > l) { - start = (start - end) + l; - end = l; - if (start < 1) + end -= start; start = 1; } - start = [start, end]; } else { catch any - start = ._parse_range(rangestr); + [start, end] = ._parse_range(rangestr); with return "Illegal list range."; } - end = start[2]; - start = start[1]; out = []; - j = start; - for i in (text.subrange(start, (end - start) + 1)) { - if (j == line) - lineno = (("=>" + j).right(5)) + ": "; + rows = (end - start) + 1; + for i in [start .. end] { + if (i > l) + break; + if (i == line) + lineno = (("=>" + i).right(5)) + ": "; else - lineno = (tostr(j).right(5)) + ": "; - out += (lineno + i).wrap_lines(sender.linelen(), " "); - j++; + lineno = (tostr(i).right(5)) + ": "; + lines = (lineno + (text[i])).wrap_lines(sender.linelen(), " "); + if ((listlen(out) + listlen(lines)) > rows) { + if (listlen(out) >= rows) + break; + diff = rows - listlen(out); + diff = (listlen(out) + listlen(lines)) - rows; + out += sublist(lines, 1, (listlen(lines) - diff) - 1); + out += [((("[.." + (diff.to_english_text())) + " more row") + ((diff > 1) ? "s" : "")) + "]"]; + break; + } + out += lines; } - if (listlen(text) <= end) { - if ((j == line) && (j == ((text.length()) + 1))) + if (i >= l) { + if ((i == line) && (i == (l + 1))) out += ["=>[End]"]; else out += [" [End]"]; @@ -362,19 +362,19 @@ public method .save_cmd() { arg cmd, tmpl, args; - var err, m; + var result, m; (> .perms(caller(), $user, this()) <); if ((m = match_template(args, "as *"))) return "Save as support is not yet completed."; - if ((> (err = sender.do_save(finisher_object, finisher, text, client_data)) <) == 'clear) { + if ((> (result = sender.do_save(finisher_object, finisher, text, client_data)) <) == 'clear) { sender.quit_editor(); return "Done. Editor cleared."; } - if (type(err) == 'list) - return .compile_errors(@err); + if ((result[1]) == 'failure) + return .compile_errors(@result[2]); modified = 0; - return "Save completed."; + return (result[2]) + ["Save completed."]; }; public method .sed() { @@ -393,9 +393,10 @@ public method .send_cmd() { arg cmd, tmpl, args; - var err, m, list, recip, subj, mail; + var err, m, list, recip, subj, mail, ismail, ret, cd, out; (> .perms(caller(), $user, this()) <); + ismail = client_data && ((client_data[1]) == 'mail); if ((m = match_template(args, "to *"))) args = m[2]; else @@ -411,35 +412,44 @@ sender().tell(("The recipient \"" + recip) + "\" is invalid."); } } - if (!list) + if (!list) { + if (ismail) + list = client_data[2]; + else return "No recipients specified."; - subj = sender().prompt("Subject: "); - if (subj == "@abort") - return "** Aborted mail send **"; - if (subj == 'engaged) - return "** Already reading input - mail send aborted **"; - mail = $mail_message.new_mail(); - mail.set_subject(subj); - mail.set_text(text); - catch any - mail.send(@list); - with - return (traceback()[1])[2]; - return "Mail sent."; + } + if (ismail) { + cd = client_data; + cd = replace(cd, 2, list); + } else { + cd = ['mail, list, ""]; + } + ret = (> sender()._edit_mail_callback(text, cd) <); + if ((ret[1]) == 'success) { + if (ismail) + sender.quit_editor(); + return [ret[2], "Done. Editor Cleared."]; + } else { + return ret[2]; + } }; public method .session_name() { + var tmp; + // cruft this up at a later time switch (finisher) { case '_edit_method_callback: return ((("Method " + (client_data[1])) + ".") + (client_data[2])) + "()"; case '_edit_messages_callback: return "Messages on " + (finisher_object.namef('ref)); + case '_edit_mail_callback: + return "Mail for " + (((client_data[2]).mmap('mail_name)).to_english()); default: - return "%l/%l".format(finisher_object.name(), finisher); + tmp = strsed(tostr(finisher), "_edit_", ""); + tmp = strsed(tmp, "_callback", ""); + return "%l/%l".format(finisher_object.name(), tmp); } - - // $#Edited: 20 Feb 97 19:41 $miro }; public method .startup() { @@ -465,8 +475,6 @@ } else { return 1; } - - // $#Edited: 29 Jan 97 06:46 $miro }; public method .startup_sender(): nooverride { @@ -537,8 +545,6 @@ return changed + " lines changed."; else return "No lines changed."; - - // $#Edited: 23 Dec 96 11:52 $brandon }; diff -rwu src-3.0a7/english_lib.cdc ColdCore-3.0a9.02/src/english_lib.cdc --- src-3.0a7/english_lib.cdc Sat Aug 9 19:09:47 1997 +++ ColdCore-3.0a9.02/src/english_lib.cdc Tue Aug 19 12:15:37 1997 @@ -138,7 +138,7 @@ var i, vb; i = "/" in (spec + "/"); - if (plural) { + if (plural && (plural[1])) { if (i < (spec.length())) vb = spec.subrange(i + 1); else @@ -219,8 +219,6 @@ return string; } return [(words[1]).capitalize(), @(words.subrange(2, (words.length()) - 2)).lmap('capitalize), (words[words.length()]).capitalize()].join(); - - // $#Edited: 11 Nov 96 00:27 $brian }; public method .vowel_exception() { diff -rwu src-3.0a7/eval_parser.cdc ColdCore-3.0a9.02/src/eval_parser.cdc --- src-3.0a7/eval_parser.cdc Sat Aug 9 19:09:47 1997 +++ ColdCore-3.0a9.02/src/eval_parser.cdc Tue Aug 19 12:15:37 1997 @@ -6,7 +6,6 @@ var $root inited = 1; var $root managed = [$eval_parser]; var $root manager = $eval_parser; -var $root owned = [$eval_parser]; var $user_parsers priority = 500; public method .evaluate() { @@ -30,8 +29,6 @@ if ((r[1]) == 'errors) throw(~evalerr, "Eval error: " + (r[2])); return r[2]; - - // $#Edited: 04 Nov 96 13:43 $brandon }; public method .parse() { diff -rwu src-3.0a7/evaluator.cdc ColdCore-3.0a9.02/src/evaluator.cdc --- src-3.0a7/evaluator.cdc Sat Aug 9 19:09:48 1997 +++ ColdCore-3.0a9.02/src/evaluator.cdc Tue Aug 19 12:15:17 1997 @@ -1,13 +1,11 @@ new object $evaluator: $utilities; *var $root child_index = '-' evaluator.cdc var $root created_on = 837583637; var $root flags = ['variables, 'methods, 'code, 'core]; var $root inited = 1; var $root managed = [$evaluator]; var $root manager = $evaluator; -var $root owned = [$evaluator]; public method ._eval_ctext() { arg data, vars; @@ -33,9 +31,6 @@ } } return [out, vars]; - - // $#Edited: 29 Nov 96 16:27 $miro - // $#Edited: 29 Nov 96 16:59 $miro }; public method .eval_formatter() { @@ -50,8 +45,6 @@ form = (<$format, [form[1], form[2], text, form[4]]>); return [[form], vars]; } - - // $#Edited: 29 Nov 96 16:22 $miro }; public method .eval_generator() { @@ -67,16 +60,10 @@ with return [[(">>ERROR: Unknown generator [" + (gen[1])) + "].<<"], vars]; } - - // $#Edited: 29 Nov 96 16:24 $miro }; public method .init() { return #[]; - - // $#Edited: 16 Jul 96 08:43 $kahuna - // $#Edited: 17 Jul 96 00:05 $kahuna - // $#Edited: 17 Jul 96 00:07 $jenner }; diff -rwu src-3.0a7/event_handler.cdc ColdCore-3.0a9.02/src/event_handler.cdc --- src-3.0a7/event_handler.cdc Sat Aug 9 19:09:28 1997 +++ ColdCore-3.0a9.02/src/event_handler.cdc Tue Aug 19 12:15:17 1997 @@ -2,8 +2,8 @@ new object $event_handler: $foundation; var $event_handler events = 0; -var $event_handler hooked = 0; -var $event_handler hooks = 0; +var $event_handler hooked = #[]; +var $event_handler hooks = #[]; var $root created_on = 850790316; var $root flags = ['variables, 'methods, 'code, 'core]; var $root inited = 1; @@ -28,10 +28,22 @@ public method .deregister_event() { arg event, update_on; - var value; + var value, event, src, status; (> .perms(sender()) <); if ((events.contains(update_on)) && ((events[update_on]).contains(event))) { + // clean it up first.. (ignore status) + [event, [status, source]] = events[update_on]; + switch (source) { + case 'location: + (| loc.unhook_from_event(event) |); + case 'this: + (| .unhook_from_event(event) |); + default: + (| source.hook_into_event(event) |); + } + + // now cleanup 'events' value = (events[update_on]).del(event); if (value) events = events.add(update_on, value); @@ -40,8 +52,6 @@ if (!events) clear_var('events); } - - // $#Edited: 21 Dec 96 13:04 $brandon }; protected method .did_hook() { @@ -90,8 +100,6 @@ } events = events.add(type, all); } - - // $#Edited: 21 Dec 96 13:05 $brandon }; public method .hook_into_event() { @@ -112,6 +120,8 @@ (> .perms(sender()) <); if (!events) events = #[]; + + // If/when more are added.. also update $help_sys_event_register if ((update_on != 'move) && (update_on != 'startup)) throw(~type, "Update on must be either 'move or 'startup"); if (type(src) == 'symbol) { @@ -133,8 +143,6 @@ } else { events = events.add(update_on, #[[event, [0, src]]]); } - - // $#Edited: 07 Mar 97 15:45 $miro }; public method .send_event() { @@ -147,10 +155,12 @@ for o in (hooks[event]) { if (!valid(o)) { hooks = dict_add(hooks, event, setremove(hooks[event], o)); - hooked = hooked.del_elem(o, event); + hooked = (hooked || #[]).del_elem(o, event); } (| o.event_notify(event, sender(), @args) |); } + if (!hooked) + (| clear_var('hooked) |); }; public method .unhook_events() { @@ -190,20 +200,23 @@ public method .unhook_from_event() { arg event; - if (!hooks) - return; + if (hooks) hooks = dict_add(hooks, event, setremove(hooks[event], sender())); + if (hooked) hooked = hooked.del_elem(sender(), event); }; root method .uninit_event_handler() { - var e, o, u; + var event, obj, update_on; - for u in ((events || #[]).keys()) - (| .unhook_events(u) |); - for e in ((hooks || #[]).keys()) - (| o.event_hook_removed(e) |); - (| (.location()).unhook_from_all() |); + for update_on in ((events || #[]).keys()) { + for event in ((events[update_on]).keys()) + (| .deregister_event(event, update_on) |); + } + for obj in ((hooks || #[]).keys()) { + for event in (hooks[obj]) + (| obj.event_hook_removed(event) |); + } }; protected method .will_hook() { diff -rwu src-3.0a7/exit.cdc ColdCore-3.0a9.02/src/exit.cdc --- src-3.0a7/exit.cdc Sat Aug 9 19:09:33 1997 +++ ColdCore-3.0a9.02/src/exit.cdc Tue Aug 19 12:15:20 1997 @@ -19,7 +18,6 @@ var $root inited = 1; var $root managed = [$exit]; var $root manager = $exit; -var $root owned = [$exit]; var $root settings = #[["closable", "no"]]; public method .attach() { @@ -106,7 +104,6 @@ public method .get_closable() { arg name, definer; - $brandon.tell("exit"); return closable; }; @@ -231,8 +228,6 @@ arg @args; lock.try(@args); - - // $#Edited: 17 Mar 97 02:48 $miro }; root method .uninit_exit() { diff -rwu src-3.0a7/exit_frob.cdc ColdCore-3.0a9.02/src/exit_frob.cdc --- src-3.0a7/exit_frob.cdc Sat Aug 9 19:09:33 1997 +++ ColdCore-3.0a9.02/src/exit_frob.cdc Tue Aug 19 12:15:20 1997 @@ -20,10 +19,9 @@ arg this; var sets; - sets = pass(this()); + sets = (> pass(this) <); sets = dict_del(sets, "home"); sets = dict_del(sets, "gender"); - sets = dict_del(sets, "visibility"); return sets; }; @@ -42,7 +40,7 @@ (> dest.attach_exit('dest, (<this(), this>)) <); }; -public method .change_data() { +protected method .change_data() { arg this, what, new, @remove; if (this['source]) @@ -321,8 +319,6 @@ arg this, @args; return (| this['lock] |) ? ((this['lock]).try(@args)) : 1; - - // $#Edited: 17 Mar 97 02:55 $miro }; frob method .unlock_cmd() { diff -rwu src-3.0a7/false.cdc ColdCore-3.0a9.02/src/false.cdc --- src-3.0a7/false.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/false.cdc Tue Aug 19 12:15:36 1997 @@ -6,7 +6,6 @@ var $root inited = 1; var $root managed = [$false]; var $root manager = $false; -var $root owned = [$false]; var $root trusted = []; public method .test() { diff -rwu src-3.0a7/false_lock_frob.cdc ColdCore-3.0a9.02/src/false_lock_frob.cdc --- src-3.0a7/false_lock_frob.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/false_lock_frob.cdc Tue Aug 19 12:15:36 1997 @@ -5,7 +5,12 @@ var $root flags = ['methods, 'code, 'variables, 'core]; var $root managed = [$false_lock_frob]; var $root manager = $false_lock_frob; -var $root owned = [$false_lock_frob]; + +public method .lock_name() { + arg value, @type; + + return "no"; +}; public method .new_lock() { return (<this(), []>); diff -rwu src-3.0a7/file.cdc ColdCore-3.0a9.02/src/file.cdc --- src-3.0a7/file.cdc Sat Aug 9 19:09:47 1997 +++ ColdCore-3.0a9.02/src/file.cdc Tue Aug 19 12:15:17 1997 @@ -6,14 +6,11 @@ var $root inited = 1; var $root managed = [$file]; var $root manager = $file; -var $root owned = [$file]; public method .files() { arg path; return (> files(path) <); - - // $#Edited: 30 Oct 96 12:19 $brandon }; public method .fstat() { @@ -22,8 +19,6 @@ if (!path) throw(~perm, "Perm."); return (> fstat(@path) <); - - // $#Edited: 30 Oct 96 12:19 $brandon }; diff -rwu src-3.0a7/filters.cdc ColdCore-3.0a9.02/src/filters.cdc --- src-3.0a7/filters.cdc Sat Aug 9 19:09:47 1997 +++ ColdCore-3.0a9.02/src/filters.cdc Tue Aug 19 12:15:37 1997 @@ -1,13 +1,11 @@ new object $filters: $misc; *var $root child_index = '-' filters.cdc var $root created_on = 796268969; var $root flags = ['methods, 'code, 'core, 'variables]; var $root inited = 1; var $root managed = [$filters]; var $root manager = $filters; -var $root owned = [$filters]; public method .compress() { arg input; @@ -27,8 +25,6 @@ output = [input]; } return output; - - // $#Edited: 30 Nov 96 21:22 $miro }; diff -rwu src-3.0a7/finger_connection.cdc ColdCore-3.0a9.02/src/finger_connection.cdc --- src-3.0a7/finger_connection.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/finger_connection.cdc Tue Aug 19 12:15:36 1997 @@ -1,5 +1,5 @@ -new object $finger_connection: $connection; +new object $finger_connection: $inbound_connection; var $connection buffer = `[]; var $connection interface = $finger_interface; diff -rwu src-3.0a7/finger_daemon.cdc ColdCore-3.0a9.02/src/finger_daemon.cdc --- src-3.0a7/finger_daemon.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/finger_daemon.cdc Tue Aug 19 12:15:36 1997 @@ -3,7 +3,7 @@ var $daemon connection = $finger_connection; var $daemon current_port = 1179; -var $daemon default_port = 1179; +var $daemon listen = [[1179]]; var $root created_on = 849597984; var $root flags = ['variables, 'methods, 'code, 'core]; var $root inited = 1; diff -rwu src-3.0a7/finger_interface.cdc ColdCore-3.0a9.02/src/finger_interface.cdc --- src-3.0a7/finger_interface.cdc Sat Aug 9 19:09:31 1997 +++ ColdCore-3.0a9.02/src/finger_interface.cdc Tue Aug 19 12:15:35 1997 @@ -15,9 +14,6 @@ public method .connection_starting() { arg addr, port; - $brad.debug("Finger connection inbound"); - - // $#Edited: 03 Dec 96 01:05 $brad }; public method .parse_line() { @@ -34,13 +30,13 @@ gender = (who.gender()).pronoun('psc); else gender = "It"; - out = [@out, ((" " + (who.name())) + " was created on ") + ($time.format("%A %B %e %Y", time)), (((" " + gender) + " is ") + ($time.elapsed(time() - time, 'long))) + " old."]; + out = [@out, ((" " + (who.name())) + " was created on ") + ($time.format("%A %B %d %Y", time)), (((" " + gender) + " is ") + ($time.elapsed(time() - time, 'long))) + " old."]; if (who.is($user)) out = [@out, (((" " + gender) + " has logged ") + ($time.elapsed(who.connected_seconds(), 'long))) + " online."]; if (who.connected()) out = [@out, (" " + (who.name())) + " is currently connected."]; else - out = [@out, ((((" " + (who.name())) + " was last connected at ") + ($time.format("%r", abs(who.connected_at())))) + " ") + ($time.format("%A %B %e %Y", abs(who.connected_at())))]; + out = [@out, ((((" " + (who.name())) + " was last connected at ") + ($time.format("%r", abs(who.connected_at())))) + " ") + ($time.format("%A %B %d %Y", abs(who.connected_at())))]; (.connection()).write(out); } with { (.connection()).write("Unable to locate user: " + line); @@ -52,8 +48,6 @@ (.connection()).write("Error"); } return 'disconnect; - - // $#Edited: 03 Dec 96 01:32 $brad }; diff -rwu src-3.0a7/format.cdc ColdCore-3.0a9.02/src/format.cdc --- src-3.0a7/format.cdc Sat Aug 9 19:09:33 1997 +++ ColdCore-3.0a9.02/src/format.cdc Tue Aug 19 12:15:36 1997 @@ -6,7 +6,6 @@ var $root inited = 1; var $root managed = [$format]; var $root manager = $format; -var $root owned = [$format]; public method .new_tag() { arg name, flags, args; diff -rwu src-3.0a7/formatter.cdc ColdCore-3.0a9.02/src/formatter.cdc --- src-3.0a7/formatter.cdc Sat Aug 9 19:09:48 1997 +++ ColdCore-3.0a9.02/src/formatter.cdc Tue Aug 19 12:15:17 1997 @@ -1,13 +1,11 @@ new object $formatter: $evaluator; *var $root child_index = '-' formatter.cdc var $root created_on = 837583776; var $root flags = ['variables, 'methods, 'code, 'core]; var $root inited = 1; var $root managed = [$formatter]; var $root manager = $formatter; -var $root owned = [$formatter]; public method ._eval_ctext() { arg data, vars; @@ -43,8 +41,56 @@ } } return [out, vars]; +}; + +public method .do_invoke() { + arg vars, flags, args; + + [args, vars] = ._eval_ctext(args, vars); + return [args, vars]; +}; + +public method .do_obj() { + arg vars, flags, args; + + return [flags.getkey("name"), vars]; +}; + +public method .do_sense() { + arg vars, flags, args; - // $#Edited: 29 Nov 96 16:22 $miro + return [(| tostr(vars[tosym(args[1])]) |) || "", vars]; +}; + +public method .do_switch() { + arg vars, flags, args; + var v, i, num, n, done; + + v = flags.getkey("value"); + if (type(v) == 'list) + v = v.join(""); + if (type(args) == 'list) + args = args[1]; + if (args.contains(v)) + return ._eval_ctext(args[v], vars); + if (args.contains('ranges)) { + if ((num = v.is_numeric())) + n = toint(v); + done = 0; + for i in (args['ranges]) { + if ((| num && (((i[1]).is_numeric()) && ((i[2]).is_numeric())) |)) { + if ((n >= toint(i[1])) && (n <= toint(i[2]))) + done = 1; + } else if ((| (v >= (i[1])) && (v <= (i[2])) |)) { + done = 1; + } + if (done) + return ._eval_ctext(i[3], vars); + } + } + if (args.contains('default)) + return ._eval_ctext(args['default], vars); + return [((vars['time]) == 'pre) ? [""] : "", vars]; }; public method .eval_formatter() { @@ -61,16 +107,12 @@ form = (<$format, [form[1], form[2], text, form[4]]>); return [[form], vars]; } - - // $#Edited: 23 Jan 97 20:49 $miro }; public method .eval_generator() { arg gen, vars; return (vars['evaluator]).eval_generator(gen, vars); - - // $#Edited: 29 Nov 96 16:28 $miro }; diff -rwu src-3.0a7/foundation.cdc ColdCore-3.0a9.02/src/foundation.cdc --- src-3.0a7/foundation.cdc Sat Aug 9 19:09:28 1997 +++ ColdCore-3.0a9.02/src/foundation.cdc Tue Aug 19 12:15:17 1997 @@ -1,17 +1,15 @@ -new object $foundation: $root; +new object $foundation: $root, $dmi_data; var $foundation defined_msgs = 0; var $foundation edit_types = 0; var $foundation msgs = 0; *var $root child_index = '-' foundation.cdc var $root created_on = 796268969; var $root fertile = 1; var $root flags = ['methods, 'code, 'fertile, 'core, 'variables]; var $root inited = 1; var $root managed = [$foundation]; var $root manager = $foundation; -var $root owned = [$foundation]; var $root trusted = []; public method .all_defined_msgs(): nooverride { @@ -176,14 +174,15 @@ public method .get_edit_types() { return edit_types || []; - - // $#Edited: 07 Nov 96 13:56 $brandon }; -public method .get_msg(): nooverride { +public method .get_msg() { arg name, definer; + var get; + if (!(get = (| definer.get_msg_attr(name, 'getter) |))) return dict_union(definer.get_default_msg(name), (| msgs[name] |) || #[]); + return .(get)(name, definer); }; public method .get_msg_attr(): nooverride { @@ -335,6 +334,14 @@ defined_msgs = dict_del(defined_msgs, name); if (!defined_msgs) clear_var('defined_msgs); +}; + +public method .will_inherit(): nooverride { + arg who; + + if ((this() != definer()) && (!(sender().has_ancestor(definer())))) + throw(~perm, this() + " may only have parents who are descendants of $foundation"); + (> pass(who) <); }; diff -rwu src-3.0a7/frob.cdc ColdCore-3.0a9.02/src/frob.cdc --- src-3.0a7/frob.cdc Sat Aug 9 19:09:31 1997 +++ ColdCore-3.0a9.02/src/frob.cdc Tue Aug 19 12:15:17 1997 @@ -1,21 +1,17 @@ new object $frob: $core; *var $root child_index = '-' frob.cdc var $root created_on = 796268969; var $root fertile = 1; var $root flags = ['methods, 'code, 'fertile, 'core, 'variables]; var $root inited = 1; var $root managed = [$frob]; var $root manager = $frob; -var $root owned = [$frob]; frob method .destroy() { arg this; throw(~perm, "You cannot destroy a frob, try 'discard'"); - - // $#Edited: 29 Nov 96 12:44 $brandon }; frob method .has_ancestor() { @@ -51,8 +47,6 @@ arg rep; return ((("<" + this()) + ", ") + rep) + ">"; - - // $#Edited: 13 Jun 96 01:14 $levi }; frob method .value(): nooverride { diff -rwu src-3.0a7/gender.cdc ColdCore-3.0a9.02/src/gender.cdc --- src-3.0a7/gender.cdc Sat Aug 9 19:09:48 1997 +++ ColdCore-3.0a9.02/src/gender.cdc Tue Aug 19 12:15:35 1997 @@ -17,7 +17,6 @@ var $root inited = 1; var $root managed = [$gender]; var $root manager = $gender; -var $root owned = [$gender]; public method .apronouns() { return apronouns; @@ -45,8 +44,6 @@ default: return gender_name; } - - // $#Edited: 30 Nov 96 21:22 $miro }; root method .init_gender() { @@ -59,16 +56,12 @@ public method .number() { return number; - - // $#Edited: 12 Nov 96 00:42 $levi }; public method .pronoun() { arg pronoun; return (> pronouns[pronoun] <); - - // $#Edited: 13 Mar 96 17:36 Levi ($user_levi) }; public method .pronouns() { diff -rwu src-3.0a7/gender_female.cdc ColdCore-3.0a9.02/src/gender_female.cdc --- src-3.0a7/gender_female.cdc Sat Aug 9 19:09:48 1997 +++ ColdCore-3.0a9.02/src/gender_female.cdc Tue Aug 19 12:15:35 1997 @@ -14,6 +14,5 @@ var $root inited = 1; var $root managed = [$gender_female]; var $root manager = $gender_female; -var $root owned = [$gender_female]; diff -rwu src-3.0a7/gender_first_person.cdc ColdCore-3.0a9.02/src/gender_first_person.cdc --- src-3.0a7/gender_first_person.cdc Sat Aug 9 19:09:48 1997 +++ ColdCore-3.0a9.02/src/gender_first_person.cdc Tue Aug 19 12:15:35 1997 @@ -14,7 +14,6 @@ var $root inited = 1; var $root managed = [$gender_first_person]; var $root manager = $gender_first_person; -var $root owned = [$gender_first_person]; var $root trusted = []; diff -rwu src-3.0a7/gender_first_person_plural.cdc ColdCore-3.0a9.02/src/gender_first_person_plural.cdc --- src-3.0a7/gender_first_person_plural.cdc Sat Aug 9 19:09:48 1997 +++ ColdCore-3.0a9.02/src/gender_first_person_plural.cdc Tue Aug 19 12:15:35 1997 @@ -14,7 +14,6 @@ var $root inited = 1; var $root managed = [$gender_first_person_plural]; var $root manager = $gender_first_person_plural; -var $root owned = [$gender_first_person_plural]; var $root trusted = []; diff -rwu src-3.0a7/gender_male.cdc ColdCore-3.0a9.02/src/gender_male.cdc --- src-3.0a7/gender_male.cdc Sat Aug 9 19:09:48 1997 +++ ColdCore-3.0a9.02/src/gender_male.cdc Tue Aug 19 12:15:35 1997 @@ -14,6 +14,5 @@ var $root inited = 1; var $root managed = [$gender_male]; var $root manager = $gender_male; -var $root owned = [$gender_male]; diff -rwu src-3.0a7/gender_neuter.cdc ColdCore-3.0a9.02/src/gender_neuter.cdc --- src-3.0a7/gender_neuter.cdc Sat Aug 9 19:09:48 1997 +++ ColdCore-3.0a9.02/src/gender_neuter.cdc Tue Aug 19 12:15:35 1997 @@ -14,6 +14,5 @@ var $root inited = 1; var $root managed = [$gender_neuter]; var $root manager = $gender_neuter; -var $root owned = [$gender_neuter]; diff -rwu src-3.0a7/gender_plural.cdc ColdCore-3.0a9.02/src/gender_plural.cdc --- src-3.0a7/gender_plural.cdc Sat Aug 9 19:09:48 1997 +++ ColdCore-3.0a9.02/src/gender_plural.cdc Tue Aug 19 12:15:35 1997 @@ -14,7 +14,6 @@ var $root inited = 1; var $root managed = [$gender_plural]; var $root manager = $gender_plural; -var $root owned = [$gender_plural]; var $root trusted = []; diff -rwu src-3.0a7/generator.cdc ColdCore-3.0a9.02/src/generator.cdc --- src-3.0a7/generator.cdc Sat Aug 9 19:09:33 1997 +++ ColdCore-3.0a9.02/src/generator.cdc Tue Aug 19 12:15:36 1997 @@ -6,7 +6,6 @@ var $root inited = 1; var $root managed = [$generator]; var $root manager = $generator; -var $root owned = [$generator]; public method .new_tag() { arg name, flags, args; diff -rwu src-3.0a7/generic_map.cdc ColdCore-3.0a9.02/src/generic_map.cdc --- src-3.0a7/generic_map.cdc Sat Aug 9 19:09:33 1997 +++ ColdCore-3.0a9.02/src/generic_map.cdc Tue Aug 19 12:15:18 1997 @@ -9,13 +9,11 @@ var $has_text text = []; var $located location = $void; var $located obvious = 1; *var $root child_index = '-' generic_map.cdc var $root created_on = 840768594; var $root flags = ['variables, 'methods, 'code, 'core]; var $root inited = 1; var $root managed = [$generic_map]; var $root manager = $generic_map; -var $root owned = [$generic_map]; var $thing gender = $gender_neuter; public method .view() { @@ -31,8 +29,6 @@ out += [((line.left(width)).replace(code, "[]")).sed("[0-9]", " ", "g")]; } return [@out, pos ? "Your position is '[]'." : "Your position is not shown on this map."]; - - // $#Edited: 15 Feb 97 20:48 $miro }; diff -rwu src-3.0a7/graph.cdc ColdCore-3.0a9.02/src/graph.cdc --- src-3.0a7/graph.cdc Sat Aug 9 19:09:47 1997 +++ ColdCore-3.0a9.02/src/graph.cdc Tue Aug 19 12:15:37 1997 @@ -27,8 +27,6 @@ } else { return 0; } - - // $#Edited: 23 Nov 96 19:20 $miro }; public method .topological_sort() { @@ -47,8 +45,6 @@ i--; } return list; - - // $#Edited: 14 Mar 97 21:14 $user_bruce }; diff -rwu src-3.0a7/guest.cdc ColdCore-3.0a9.02/src/guest.cdc --- src-3.0a7/guest.cdc Sat Aug 9 19:09:30 1997 +++ ColdCore-3.0a9.02/src/guest.cdc Tue Aug 19 12:15:19 1997 @@ -19,20 +19,17 @@ var $mail_list senders = 1; var $mail_ui current = #[['location, 0], ['list, $guest]]; var $mail_ui subscribed = #[[$guest, [791485891, 0]]]; *var $root child_index = '-' guest.cdc var $root created_on = 796268969; var $root flags = ['methods, 'code, 'variables, 'core, 'command_cache]; var $root inited = 1; var $root managed = [$guest]; var $root manager = $guest; -var $root owned = [$guest]; var $root quota = 75000; var $root settings = #[["home", $body_cave]]; var $thing gender = $gender_neuter; var $user connected_at = 0; var $user connections = []; -var $user context = #[['last, $body_cave]]; -var $user formatter = $mail_list; +var $user formatter = $plain_format; var $user last_command_at = 0; var $user modes = #[]; var $user parsers = [$command_parser]; diff -rwu src-3.0a7/has_commands.cdc ColdCore-3.0a9.02/src/has_commands.cdc --- src-3.0a7/has_commands.cdc Sat Aug 9 19:09:28 1997 +++ ColdCore-3.0a9.02/src/has_commands.cdc Tue Aug 19 12:15:17 1997 @@ -4,14 +4,12 @@ var $has_commands local = 0; var $has_commands remote = 0; var $has_commands shortcuts = #[]; *var $root child_index = '-' has_commands.cdc var $root created_on = 796268969; var $root fertile = 1; var $root flags = ['methods, 'code, 'fertile, 'core, 'variables]; var $root inited = 1; var $root managed = [$has_commands]; var $root manager = $has_commands; -var $root owned = [$has_commands]; public method .add_command() { arg template, method, @type; @@ -39,10 +37,6 @@ if (!get_var(type)) set_var(type, #[]); set_var(type, get_var(type).setadd_elem((cmd[1])[1], [@cmd[1], template, method, cmd[2]])); - - // $#Edited: 22 Nov 96 17:42 $miro - // $#Edited: 30 Nov 96 20:00 $miro - // $#Edited: 30 Nov 96 21:22 $miro }; public method .add_shortcut() { @@ -99,8 +93,6 @@ s += as.to_list(); } return s; - - // $#Edited: 22 Nov 96 17:43 $miro }; public method .command_info() { diff -rwu src-3.0a7/has_name.cdc ColdCore-3.0a9.02/src/has_name.cdc --- src-3.0a7/has_name.cdc Sat Aug 9 19:09:28 1997 +++ ColdCore-3.0a9.02/src/has_name.cdc Tue Aug 19 12:15:17 1997 @@ -3,14 +3,12 @@ var $has_name name = ['normal, "named object", "a named object"]; var $has_name templates = 0; *var $root child_index = '-' has_name.cdc var $root created_on = 796268969; var $root fertile = 1; var $root flags = ['methods, 'code, 'fertile, 'core, 'variables]; var $root inited = 1; var $root managed = [$has_name]; var $root manager = $has_name; -var $root owned = [$has_name]; public method .add_name_template() { arg template; @@ -59,6 +57,12 @@ return 0; }; +public method .match_name_exact() { + arg str; + + return str == (name[2]); +}; + public method .name() { arg @args; @@ -93,9 +97,6 @@ default: return (> pass(type) <); } - - // $# Edited 28 Oct 1995 21:06 Lynx ($lynx) - // $#Edited: 15 Jul 96 22:18 $jenner }; public method .set_name() { @@ -107,11 +108,9 @@ throw(~invname, "Names cannot begin with \"$\" or \"#\"."); if (type(new_name) != 'string) throw(~type, "New name must be given as a string."); - - // this will not catch them all, but we can try. - if (new_name.match_regexp("^(a|an|the) +")) - throw(~bad_name, "Do not include articles in name, use +u +n or +pinstead."); [(type ?= 'normal)] = args; + if ((type != 'prop) && (new_name.match_regexp("^(a|an|the) +"))) + throw(~bad_name, "Config error: articles included in unique or normal name."); if (!(type in ['prop, 'normal, 'uniq])) throw(~invarg, "Type must be one of: 'prop, 'normal or 'uniq"); switch (type) { @@ -123,9 +122,6 @@ new_name = [new_name, new_name.add_indefinite()]; } name = [type, @new_name]; - - // $#Edited: 22 Nov 96 17:42 $miro - // $#Edited: 30 Nov 96 20:00 $miro }; diff -rwu src-3.0a7/has_text.cdc ColdCore-3.0a9.02/src/has_text.cdc --- src-3.0a7/has_text.cdc Sat Aug 9 19:09:33 1997 +++ ColdCore-3.0a9.02/src/has_text.cdc Tue Aug 19 12:15:18 1997 @@ -2,41 +2,46 @@ new object $has_text: $foundation; var $has_text text = 0; *var $root child_index = '-' has_text.cdc var $root created_on = 796268969; +var $root defined_settings = #[["plaintext", #[['parse, ['is_boolean]], ['format, ['format_boolean]]]]]; var $root fertile = 1; var $root flags = ['methods, 'code, 'fertile, 'core, 'variables]; +var $root help_node = $help_obj_has_text; var $root inited = 1; var $root managed = [$has_text]; var $root manager = $has_text; -var $root owned = [$has_text]; +var $root settings = #[["plaintext", 1]]; public method ._edit_text_callback() { arg t, client_data; - (> .perms(sender()) <); + (> .perms(caller(), $editor_reference) <); .set_text(t); - return "Text set."; - - // $#Edited: 18 Aug 96 20:26 $jenner + return ['success, ["Text set."]]; }; public method .del_line() { arg linestr; + var t; // deletes "line" where line is the actual line to delete if ((!(.is_writable_by(sender()))) && (sender() != this())) throw(~perm, "Permission Denied."); - text = text.setremove(line); + t = .get_raw_text(); + t = t.setremove(linestr); + .set_text(t); }; public method .del_nline() { arg nline; + var t; // deletes nline where nline is an integer reference to a list location if ((!(.is_writable_by(sender()))) && (sender() != this())) throw(~perm, "Permission Denied."); - text = (> text.delete(nline) <); + t = .get_raw_text(); + t = (> t.delete(nline) <); + .set_text(t); }; public method .del_text() { @@ -50,10 +55,20 @@ var p; (> .perms(sender()) <); - p = .text(); + p = .get_raw_text(); (> sender().invoke_editor(this(), '_edit_text_callback, p, []) <); +}; - // $#Edited: 18 Aug 96 21:02 $jenner +public method .get_raw_text() { + // returns text + if ((!(.is_writable_by(sender()))) && (sender() != this())) + throw(~perm, "Permission Denied."); + if (.get_setting("plaintext", $has_text)) + return text; + else if (type(text) == 'frob) + return text.uncompile(); + else + return text; }; root method .init_has_text() { @@ -62,31 +77,39 @@ public method .ins_line() { arg txt, @loc; + var t; // inserts txt at loc (where loc is an integer) if ((!(.is_writable_by(sender()))) && (sender() != this())) throw(~perm, "Permission Denied."); + [(loc ?= 0)] = loc; + t = .get_raw_text(); if (!loc) - text += [txt]; + t += [txt]; else - text = (> text.insert(loc, txt) <); - - // $#Edited: 22 Nov 96 17:42 $miro + t = (> t.insert(loc, txt) <); + .set_text(t); }; public method .ins_lines() { arg lines, loc; - var line; + var line, t; // inserts txt at loc (where loc is an integer) if ((!(.is_writable_by(sender()))) && (sender() != this())) throw(~perm, "Permission Denied."); + t = .get_raw_text(); if (type(lines) != 'list) throw(~type, "Lines should be passed as a list of strings."); for line in (lines) { - text = (> text.insert(loc, line) <); + t = (> t.insert(loc, line) <); ++loc; } + .set_text(t); +}; + +public method .lines() { + return listlen((.get_raw_text()) || []); }; public method .set_text() { @@ -95,7 +118,14 @@ // resets ,text to the list sent if ((!(.is_writable_by(sender()))) && (sender() != this())) throw(~perm, "Permission Denied."); + if (.get_setting("plaintext", $has_text)) { + if (type(txt) == 'string) + text = [txt]; + else text = txt; + } else { + text = $compiler.compile_cml(txt); + } }; public method .text() { @@ -106,7 +136,7 @@ }; root method .uninit_has_text() { - perm = []; + text = []; }; diff -rwu src-3.0a7/heap.cdc ColdCore-3.0a9.02/src/heap.cdc --- src-3.0a7/heap.cdc Sat Aug 9 19:09:47 1997 +++ ColdCore-3.0a9.02/src/heap.cdc Tue Aug 19 12:15:37 1997 @@ -29,8 +29,6 @@ } heap = heap.subrange(1, len - 1); return heap; - - // $#Edited: 14 Mar 97 21:33 $miro }; public method .push() { @@ -46,8 +44,6 @@ heap = replace(heap, i, heap[(i = j)]); heap = heap.replace(i, element); return heap; - - // $#Edited: 14 Mar 97 21:33 $miro }; diff -rwu src-3.0a7/heart.cdc ColdCore-3.0a9.02/src/heart.cdc --- src-3.0a7/heart.cdc Sat Aug 9 19:09:47 1997 +++ ColdCore-3.0a9.02/src/heart.cdc Tue Aug 19 12:15:17 1997 @@ -2,14 +2,13 @@ new object $heart: $utilities; var $heart heart_failures = []; *var $heart hearts = '-' heart.cdc *var $heart info = '-' heart.cdc +var $heart hearts = [[$lag_watcher, 872013847], [$world, 872014008]]; +var $heart info = #[[$world, [600, 872013408]], [$lag_watcher, [14, 872013833]]]; var $root created_on = 796268969; var $root flags = ['methods, 'code, 'variables, 'core]; var $root inited = 1; var $root managed = [$heart]; var $root manager = $heart; -var $root owned = [$heart]; private method ._add_heartbeat() { arg obj, delay; @@ -48,8 +47,15 @@ [(delay ?= 60)] = delay; ._add_heartbeat(sender(), delay); +}; + +root method .core_heart(): nooverride { + var h; - // $#Edited: 30 Nov 96 21:22 $miro + for h in (hearts) { + if (!valid(h[1])) + ._del_heartbeat(h[1]); + } }; public method .del_heartbeat() { @@ -59,8 +65,6 @@ public method .hearts() { return hearts; - - // $#Edited: 09 Nov 96 10:27 $brandon }; public method .pulse() { diff -rwu src-3.0a7/help_app_names.cdc ColdCore-3.0a9.02/src/help_app_names.cdc --- src-3.0a7/help_app_names.cdc Sat Aug 9 19:09:34 1997 +++ ColdCore-3.0a9.02/src/help_app_names.cdc Tue Aug 19 12:15:22 1997 @@ -2,9 +2,9 @@ new object $help_app_names: $help_appearance; var $has_name name = ['prop, "Names", "Names"]; -var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "If you are the manager of an item you can change it's name, name templates, and possibly even its object name. First, you can change its name with the command ", <$format, ["link", [["node", "$help_cmd_rename"]], ["@rename"], 'do_link]>, ", such as:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["@rename thing_7 to Bat"], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Be sure to read the manual on ", <$format, ["link", [["node", "$help_cmd_rename"]], ["@rename"], 'do_link]>, ", as it will explain how to set the article for a name and how to change the object name. ", <$format, ["np", [], [], 'do_np]>, "Name templates exist in order to help name matching. Keep in mind that Cold will match the beginning of any word in a name, so if you have the name ", <$format, ["tt", [], ["\"Red Hat\""], 'do_tt]>, " both ", <$format, ["tt", [], ["\"red\""], 'do_tt]>, " and ", <$format, ["tt", [], ["\"hat\""], 'do_tt]>, " would match. This makes it unecessary and redundant to add a template ", <$format, ["tt", [], ["\"hat\""], 'do_tt]>, ". Template matching is used for name templates. For more information on template matching read the section ", <$format, ["link", [["node", "$help_commands_matching"]], ["Matching"], 'do_link]>, ". ", <$format, ["np", [], [], 'do_np]>, "An example of good name template use is a door, with the name ", <$format, ["tt", [], ["\"Oaken Door\""], 'do_tt]>, " and with the name template ", <$format, ["tt", [], ["\"e?ast\""], 'do_tt]>, ". The commands ", <$format, ["link", [["node", "$help_cmd_ant"]], ["@add-name-template"], 'do_link]>, " and ", <$format, ["link", [["node", "$help_cmd_dnt"]], ["@del-name-template"], 'do_link]>, " are used to add and remove name templates--or they can be included when you change the name with ", <$format, ["link", [["node", "$help_cmd_rename"]], ["@rename"], 'do_link]>, " by seperating each template with a comma, such as:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["@rename door to Oaken Door, e?ast"], 'do_dfn]>], #[['this, $help_app_names]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "An object has three different types of names, its Object Name, VR Name and Name Templates. The Object Name is unique to each object. No other object will ever have the same Object Name as another object in the database. The Object Name is formatted as a dollar sign followed by any number of alphanumeric characters (", <$format, ["tt", [], ["a-z 0-9"], 'do_tt]>, ") or the underscore (", <$format, ["tt", [], ["'_'"], 'do_tt]>, "). Additional help on ", <$format, ["link", [["node", "$help_coldc_objs_ref"]], ["Object Names"], 'do_link]>, " can be found in the Programming Help. An example of an object name is:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["$root"], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "The VR Name is the name the object has in its ", <$format, ["link", [["node", "$help_environment"]], ["Environment"], 'do_link]>, ". The VR Name is not unique to the object, and other objects can also have the same name. ", <$format, ["np", [], [], 'do_np]>, "VR Names are also broken into three types: Proper, Unique and Normal. The type of name will decide what articles are put with it, when formatting (You do not normally include the article in a name). Proper names have no article. Unique names use the article ", <$format, ["tt", [], ["the"], 'do_tt]>, ", and Normal names use the article ", <$format, ["tt", [], ["a"], 'do_tt]>, " or ", <$format, ["tt", [], ["an"], 'do_tt]>, ". Normally, when you set a name you can just use the article for the type of name you want. If you desire a different behaviour you can type +ignore in the name and it will override any automatic article settings. ", <$format, ["subj", [["level", "2"]], ["Name Templates"], 'do_subj]>, <$format, ["p", [], [], 'do_p]>, "Name Templates are additional helpful hints for the name matching system. Name Templates match differently than VR Names, so care should be given in knowing how each type of name matches before specifying a Name Template, as often times the Name Template is unecessary. ", <$format, ["np", [], [], 'do_np]>, "When the system tries to match a name to an object, it will match the beginning of any word in a name. For instance, if an object has the name ", <$format, ["tt", [], ["\"Mad Hatter\""], 'do_tt]>, " both ", <$format, ["tt", [], ["\"mad\""], 'do_tt]>, " and ", <$format, ["tt", [], ["\"hatter\""], 'do_tt]>, " would match. Furthermore, ", <$format, ["tt", [], ["\"hat\""], 'do_tt]>, " would also match, as it is the beginning of the second word. ", <$format, ["np", [], [], 'do_np]>, "To supplement matching you can add Name Templates. Name Templates use the Template Matching system. Templates are not matched like names. The most common use of templates with names would be partial matching a word. For instance, the exit ", <$format, ["tt", [], ["\"Glass Door\""], 'do_tt]>, " may have the Template ", <$format, ["tt", [], ["\"e?ast\""], 'do_tt]>, ". The Question Mark ('?') is used to specify that any character past that point is optional. For more information on Template Matching see the section ", <$format, ["link", [["node", "$help_commands_matching"]], ["Matching Conventions"], 'do_link]>, ". ", <$format, ["np", [], [], 'do_np]>, "Commands used with names are: ", <$format, ["link", [["node", "$help_cmd_rename"]], ["@rename"], 'do_link]>], #[['links, #[["Object Names", "$help_coldc_objs_ref"], ["Environment", "$help_environment"], ["Matching Conventions", "$help_commands_matching"], ["@rename", "$help_cmd_rename"]]]]]>; var $help_node index = $help_index_core; -var $help_node links = #[["@rename", $help_cmd_rename], ["Matching", $help_commands_matching], ["@add-name-template", $help_cmd_ant], ["@del-name-template", $help_cmd_dnt]]; +var $help_node links = #[["Object Names", $help_coldc_objs_ref], ["Environment", $help_environment], ["Matching Conventions", $help_commands_matching], ["@rename", $help_cmd_rename]]; var $help_node nolist = 0; var $root created_on = 856649225; var $root flags = ['variables, 'methods, 'code, 'core]; diff -rwu src-3.0a7/help_building.cdc ColdCore-3.0a9.02/src/help_building.cdc --- src-3.0a7/help_building.cdc Sat Aug 9 19:09:35 1997 +++ ColdCore-3.0a9.02/src/help_building.cdc Tue Aug 19 12:15:22 1997 @@ -6,12 +6,10 @@ var $help_node index = $help_index_core; var $help_node links = #[["Theme", $help_theme], ["Dynamic Text", $help_cml], ["Places", $help_build_places]]; var $help_node nolist = 0; *var $root child_index = '-' help_building.cdc var $root created_on = 847060847; var $root flags = ['variables, 'methods, 'code, 'core]; var $root inited = 1; var $root managed = [$help_building]; var $root manager = $help_building; -var $root owned = [$help_building]; diff -rwu src-3.0a7/help_cmd_addcmd.cdc ColdCore-3.0a9.02/src/help_cmd_addcmd.cdc --- src-3.0a7/help_cmd_addcmd.cdc Sat Aug 9 19:09:45 1997 +++ ColdCore-3.0a9.02/src/help_cmd_addcmd.cdc Tue Aug 19 12:15:32 1997 @@ -2,9 +2,9 @@ new object $help_cmd_addcmd: $help_cmds; var $has_name name = ['prop, "@add-command|@ac", "@add-command|@ac"]; -var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["PROGRAMMER COMMAND"], 'do_b]>, " ", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@add-c?ommand|@ac \"<Command Template>\" [to|for] <objref>"], 'do_tt]>], 'do_dfn]>, " ", <$format, ["p", [], [], 'do_p]>, "Used to add a command. The method called if the command matches must be specified. The command template must be an ", <$format, ["link", [["node", "$help_commands_enhanced"]], [" Enhanced Command Template"], 'do_link]>, ". Arguments send to the method are always ordered the same, the first argument is always the command string, followed by subsequent arguments relative to how the command template would match using template matching (see ", <$format, ["link", [["node", "$help_commands_matching"]], ["Matching Conventions"], 'do_link]>, "). ", <$format, ["p", [], [], 'do_p]>, "For instance, the following enhanded command template: ", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["\"@get <any> from <this>\""], 'do_dfn]>, " ", <$format, ["p", [], [], 'do_p]>, "Would evaluate to the following standard template ", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["\"@get * from *\""], 'do_dfn]>, " ", <$format, ["p", [], [], 'do_p]>, "From this point, you can simply evaluate the template matching to see how its results would be ordered: ", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], [";match_template(\"@get something from nothing\", \"@get * from *\")", <$format, ["br", [], [], 'do_br]>, "=> [\"@get\", \"something\", \"from\", \"nothing\"]"], 'do_dfn]>, " ", <$format, ["p", [], [], 'do_p]>, "Based off these results the arg definition for your method could be: ", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["arg cmdstr, cmd, arg1, prep, arg2;"], 'do_dfn]>, " ", <$format, ["p", [], [], 'do_p]>, "When a command is added it will not immediately begin working. Command caches must be updated first. There are three different situations that will arise when adding a command: ", <$format, ["p", [], [], 'do_p]>, " ", <$format, ["dl", [], [<$format, ["dt", [], ["Adding a local command to yourself"], 'do_dt]>, <$format, ["dd", [], [<$format, ["p", [], [], 'do_p]>, "This situation is the simplest to update. If you have added a command to yourself simply type ", <$format, ["link", [["node", "$help_cmd_rehash"]], ["@rehash"], 'do_link]>, ", and your local caches will be updated.", <$format, ["p", [], [], 'do_p]>], 'do_dd]>, <$format, ["dt", [], ["Adding a remote command to an object"], 'do_dt]>, <$format, ["dd", [], [<$format, ["p", [], [], 'do_p]>, "When adding a remote command to something you can rehash the remote caches by simply dropping the item and picking it back up.", <$format, ["p", [], [], 'do_p]>], 'do_dd]>, <$format, ["dt", [], ["Adding a local command to another object"], 'do_dt]>, <$format, ["dd", [], [<$format, ["p", [], [], 'do_p]>, "If you are adding a local command to an object other than yourself, you will have to rehash the entire system's caches. This is done with the command ", <$format, ["link", [["node", "$help_cmd_rehashall"]], ["@rehash-all"], 'do_link]>, ", which is an administrative command."], 'do_dd]>], 'do_dl]>], #[['this, $help_cmd_addcmd]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["PROGRAMMER COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@add-c?ommand|@ac \"<Command Template>\" [to|for] <objref>"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Used to add a command. The method called if the command matches must be specified. The command template must be an ", <$format, ["link", [["node", "$help_commands_enhanced"]], ["Enhanced Command Template"], 'do_link]>, ". Arguments send to the method are always ordered the same, the first argument is always the command string, followed by subsequent arguments relative to how the command template would match using template matching (see ", <$format, ["link", [["node", "$help_commands_matching"]], ["Matching Conventions"], 'do_link]>, ").", <$format, ["p", [], [], 'do_p]>, "For instance, the following enhanced command template:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["\"@get <any> from <this>\""], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Would evaluate to the following standard template:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["\"@get * from *\""], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "From this point, you can simply evaluate the template matching to see how its results would be ordered:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], [";match_template(\"@get something from nothing\", \"@get * from *\")", <$format, ["br", [], [], 'do_br]>, "=> [\"@get\", \"something\", \"from\", \"nothing\"]"], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Based off these results the arg definition for your method could be:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["arg cmdstr, cmd, arg1, prep, arg2;"], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "When a command is added it will not immediately begin working. Command caches must be updated first. There are three different situations that will arise when adding a command:", <$format, ["p", [], [], 'do_p]>, <$format, ["dl", [], [<$format, ["dt", [], ["Adding a local command to yourself"], 'do_dt]>, <$format, ["dd", [], [<$format, ["p", [], [], 'do_p]>, "This situation is the simplest to update. If you have added a command to yourself simply type ", <$format, ["link", [["node", "$help_cmd_rehash"]], ["@rehash"], 'do_link]>, ", and your local caches will be updated.", <$format, ["p", [], [], 'do_p]>], 'do_dd]>, <$format, ["dt", [], ["Adding a remote command to an object"], 'do_dt]>, <$format, ["dd", [], [<$format, ["p", [], [], 'do_p]>, "When adding a remote command to something you can rehash the remote caches by simply dropping the item and picking it back up.", <$format, ["p", [], [], 'do_p]>], 'do_dd]>, <$format, ["dt", [], ["Adding a local command to another object"], 'do_dt]>, <$format, ["dd", [], [<$format, ["p", [], [], 'do_p]>, "If you are adding a local command to an object other than yourself, you will have to rehash the entire system's caches. This is done with the command ", <$format, ["link", [["node", "$help_cmd_rehashall"]], ["@rehash-all"], 'do_link]>, ", which is an administrative command."], 'do_dd]>], 'do_dl]>], #[['links, #[["Enhanced Command Template", "$help_commands_enhanced"], ["Matching Conventions", "$help_commands_matching"], ["@rehash", "$help_cmd_rehash"], ["@rehash-all", "$help_cmd_rehashall"]]]]]>; var $help_node index = $help_index_cmds; -var $help_node links = #[[" Enhanced Command Template", $help_commands_enhanced], ["Matching Conventions", $help_commands_matching]]; +var $help_node links = #[["Enhanced Command Template", $help_commands_enhanced], ["Matching Conventions", $help_commands_matching], ["@rehash", $help_cmd_rehash], ["@rehash-all", $help_cmd_rehashall]]; var $root created_on = 848119837; var $root flags = ['variables, 'methods, 'code, 'core]; var $root inited = 1; diff -rwu src-3.0a7/help_cmd_addsetting.cdc ColdCore-3.0a9.02/src/help_cmd_addsetting.cdc --- src-3.0a7/help_cmd_addsetting.cdc Sat Aug 9 19:09:45 1997 +++ ColdCore-3.0a9.02/src/help_cmd_addsetting.cdc Tue Aug 19 12:15:32 1997 @@ -10,6 +10,5 @@ var $root inited = 1; var $root managed = [$help_cmd_addsetting]; var $root manager = $help_cmd_addsetting; -var $root owned = [$help_cmd_addsetting]; diff -rwu src-3.0a7/help_cmd_build.cdc ColdCore-3.0a9.02/src/help_cmd_build.cdc --- src-3.0a7/help_cmd_build.cdc Sat Aug 9 19:09:45 1997 +++ ColdCore-3.0a9.02/src/help_cmd_build.cdc Tue Aug 19 12:15:33 1997 @@ -1,11 +1,12 @@ new object $help_cmd_build: $help_cmds; +var $dmi_data descriptions = #[]; var $has_name name = ['prop, "@build", "@build"]; -var $help_node body = <$ctext_frob, [["This node isn't written yet"], #[['this, $help_cmd_build]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["BUILDER COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@build"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This is a meta command which takes you step by step through the process of extending your VR surroundings. From opening an exit to/from the new location, creating the location itself, setting the location's realm, and setting all of the descriptions for the location, and the exits to and from it."], #[]]>; var $help_node index = $help_index_cmds; var $help_node links = #[]; -var $root created_on = 856038007; +var $root created_on = 870664087; var $root flags = ['variables, 'methods, 'code, 'core]; var $root inited = 1; var $root managed = [$help_cmd_build]; diff -rwu src-3.0a7/help_cmd_core.cdc ColdCore-3.0a9.02/src/help_cmd_core.cdc --- src-3.0a7/help_cmd_core.cdc Sat Aug 9 19:09:45 1997 +++ ColdCore-3.0a9.02/src/help_cmd_core.cdc Tue Aug 19 12:15:32 1997 @@ -2,7 +2,7 @@ new object $help_cmd_core: $help_cmds; var $has_name name = ['prop, "@core", "@core"]; -var $help_node body = <$ctext_frob, [[<$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@core <object>"], 'do_tt]>], 'do_dfn]>, " ", <$format, ["p", [], [], 'do_p]>, "Setup the specified object as a core object. This is used primarily for core development. It adds the ", <$format, ["tt", [], ["'core"], 'do_tt]>, " flag to the object, sets the object as its own manager and writer and removes any additional ownership."], #[['this, $help_cmd_core]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["ADMIN COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@core <object>"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Setup the specified object as a core object. This is used primarily for core development. It adds the ", <$format, ["tt", [], ["'core"], 'do_tt]>, " flag to the object, sets the object as its own manager and writer and removes any additional ownership."], #[]]>; var $help_node index = $help_index_cmds; var $help_node links = #[]; var $root created_on = 848468664; diff -rwu src-3.0a7/help_cmd_defmsg.cdc ColdCore-3.0a9.02/src/help_cmd_defmsg.cdc --- src-3.0a7/help_cmd_defmsg.cdc Sat Aug 9 19:09:45 1997 +++ ColdCore-3.0a9.02/src/help_cmd_defmsg.cdc Tue Aug 19 12:15:35 1997 @@ -2,7 +2,7 @@ new object $help_cmd_defmsg: $help_sys_message; var $has_name name = ['prop, "@def-msg|@undef-msg", "@def-msg|@undef-msg"]; -var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "Syntax: `", <$format, ["tt", [], ["@def-msg|@undef-msg <target>:<msg> [options]"], 'do_tt]>, "` ", <$format, ["np", [], [], 'do_np]>, "This command is used to define and undefine a message base. Because multiple branches for one base can exist, you cannot define the default values for the message with this command, use ", <$format, ["link", [["node", "$help_cmd_msg"]], ["@msg"], 'do_link]>, " for this instead, after the message is defined. More information on Messages can be found in the section ", <$format, ["link", [["node", "$help_sys_message"]], ["Messages"], 'do_link]>, ". Options can be: ", <$format, ["dfn", [["nobound", 1]], [<$format, ["table", [["cols", "25%,75%"]], [<$format, ["tr", [], [<$format, ["td", [], ["+b?ranches"], 'do_td]>, <$format, ["td", [], ["Define the branches, in a comma delimited list."], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], ["+c?ompiler"], 'do_td]>, <$format, ["td", [], ["Define the compiler. Defaults to $compiler."], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], ["+e?valuator"], 'do_td]>, <$format, ["td", [], ["Define the evaluator. Defaults to $bs_eval."], 'do_td]>], 'do_tr]>], 'do_table]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "An example of defining the message \"open\" with the branches \"actor\" and \"general\":", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["@def-msg mybox:open +b=general,actor", <$format, ["br", [], [], 'do_br]>, "@msg mybox:open = General Message", <$format, ["br", [], [], 'do_br]>, "@msg mybox:open.actor = Actor's Message"], 'do_dfn]>], #[['this, $help_cmd_defmsg]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "Syntax: `", <$format, ["tt", [], ["@def-msg|@undef-msg <target>:<msg> [options]"], 'do_tt]>, "` ", <$format, ["np", [], [], 'do_np]>, "This command is used to define and undefine a message base. Because multiple branches for one base can exist, you cannot define the default values for the message with this command, use ", <$format, ["link", [["node", "$help_cmd_msg"]], ["@msg"], 'do_link]>, " for this instead, after the message is defined. More information on Messages can be found in the section ", <$format, ["link", [["node", "$help_sys_message"]], ["Messages"], 'do_link]>, ". Options can be: ", <$format, ["dfn", [["nobound", 1]], [<$format, ["table", [["cols", "25%,75%"]], [<$format, ["tr", [], [<$format, ["td", [], ["+b?ranches"], 'do_td]>, <$format, ["td", [], ["Define the branches, in a comma delimited list."], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], ["+c?ompiler"], 'do_td]>, <$format, ["td", [], ["Define the compiler. Defaults to $compiler."], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], ["+e?valuator"], 'do_td]>, <$format, ["td", [], ["Define the evaluator. Defaults to $bs_eval."], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], ["+g?etter"], 'do_td]>, <$format, ["td", [], ["Define the getter. Defaults to 'standard_get_msg"], 'do_td]>], 'do_tr]>], 'do_table]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "An example of defining the message \"open\" with the branches \"actor\" and \"general\":", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["@def-msg mybox:open +b=general,actor", <$format, ["br", [], [], 'do_br]>, "@msg mybox:open = General Message", <$format, ["br", [], [], 'do_br]>, "@msg mybox:open.actor = Actor's Message"], 'do_dfn]>], #[['links, #[["@msg", "$help_cmd_msg"], ["Messages", "$help_sys_message"]]]]]>; var $help_node index = $help_index_cmds; var $help_node links = #[["@msg", $help_cmd_msg], ["Messages", $help_sys_message]]; var $root created_on = 856118984; diff -rwu src-3.0a7/help_cmd_descendants.cdc ColdCore-3.0a9.02/src/help_cmd_descendants.cdc --- src-3.0a7/help_cmd_descendants.cdc Sat Aug 9 19:09:45 1997 +++ ColdCore-3.0a9.02/src/help_cmd_descendants.cdc Tue Aug 19 12:15:32 1997 @@ -2,7 +2,7 @@ new object $help_cmd_descendants: $help_cmds; var $has_name name = ['prop, "@descendants", "@descendants"]; -var $help_node body = <$ctext_frob, [[<$format, ["dfn", [], ["Syntax: `", <$format, ["tt", [], ["@descend <object> [options]"], 'do_tt]>, "`"], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Options can be: ", <$format, ["dfn", [["nobound", 1], [" ", 1], ["ind", "4"]], [<$format, ["table", [["cols", "20%,80%"]], [<$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["+", <$format, ["i", [], ["N"], 'do_i]>], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Descend ", <$format, ["i", [], ["N"], 'do_i]>, " levels (zero or more)"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["+a?ll"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Descend all levels"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["+c?ore"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Only show core objects"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["+r?edundant"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Redundantly show objects in the heirarchy"], 'do_td]>], 'do_tr]>], 'do_table]>], 'do_dfn]>], #[['this, $help_cmd_descendants]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["dfn", [], ["Syntax: `", <$format, ["tt", [], ["@descend <object> [options]"], 'do_tt]>, "`"], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Options can be: ", <$format, ["dfn", [["nobound", 1], [" ", 1], ["ind", "4"]], [<$format, ["table", [["cols", "20%,80%"]], [<$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["+", <$format, ["i", [], ["N"], 'do_i]>], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Descend ", <$format, ["i", [], ["N"], 'do_i]>, " levels (zero or more)"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["+a?ll"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Descend all levels"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["+o?nly"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Only show objects with the specified flags"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["+n?ot"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Only show objects that do not have the specified flags"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["+r?edundant"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Redundantly show objects in the heirarchy"], 'do_td]>], 'do_tr]>], 'do_table]>], 'do_dfn]>], #[]]>; var $help_node index = $help_index_cmds; var $help_node links = #[]; var $root created_on = 855119873; diff -rwu src-3.0a7/help_cmd_describe.cdc ColdCore-3.0a9.02/src/help_cmd_describe.cdc --- src-3.0a7/help_cmd_describe.cdc Sat Aug 9 19:09:45 1997 +++ ColdCore-3.0a9.02/src/help_cmd_describe.cdc Tue Aug 19 12:15:32 1997 @@ -2,7 +2,7 @@ new object $help_cmd_describe: $help_cmds; var $has_name name = ['prop, "@describe", "@describe"]; -var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "Syntax: ", <$format, ["tt", [], ["@describe|@prose <what> [as <description>]"], 'do_tt]>, " ", <$format, ["np", [], [], 'do_np]>, "Set the description (prose) for an object. If nothing other than the target object is given on the command line, you will be prompted for the description. Otherwise it will take anything after the preposition ", <$format, ["i", [], ["as"], 'do_i]>, ", as the description. The description is not written in plaintext, but is in ", <$format, ["link", [["node", "$help_cml"]], ["CML"], 'do_link]>, "."], #[['this, $help_cmd_describe]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@desc?ribe|@prose <what> [as <description>]"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Sets the description (prose) for an object. If nothing other than the target object is given on the command line, you will be prompted for the description. Otherwise it will take anything after the preposition ", <$format, ["i", [], ["as"], 'do_i]>, ", as the description. The description is not written in plaintext, but is in ", <$format, ["link", [["node", "$help_cml"]], ["CML"], 'do_link]>, "."], #[['links, #[["CML", "$help_cml"]]]]]>; var $help_node index = $help_index_cmds; var $help_node links = #[["CML", $help_cml]]; var $root created_on = 856029245; diff -rwu src-3.0a7/help_cmd_dig.cdc ColdCore-3.0a9.02/src/help_cmd_dig.cdc --- src-3.0a7/help_cmd_dig.cdc Sat Aug 9 19:09:45 1997 +++ ColdCore-3.0a9.02/src/help_cmd_dig.cdc Tue Aug 19 12:15:33 1997 @@ -1,11 +1,12 @@ new object $help_cmd_dig: $help_cmds; +var $dmi_data descriptions = #[]; var $has_name name = ['prop, "@dig", "@dig"]; -var $help_node body = <$ctext_frob, [["This node isn't written yet"], #[['this, $help_cmd_dig]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["BUILDER COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [["nobound", 1]], ["Syntax: ", <$format, ["tt", [], ["@dig <place>"], 'do_tt]>], 'do_dfn]>, " ", <$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@dig <leaving exit>[;<arriving exit>] to <place>"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "The first form of this command creates a new <place>, and informs you of the $name of the new <place>, so that you can more easily manipulate it later with the other building commands. ", <$format, ["np", [], [], 'do_np]>, "The second form of the command allows tou to attach a <leaving exit> and optionally, an <arriving exit> to <place>.", <$format, ["p", [], [], 'do_p]>, "See also: ", <$format, ["link", [["node", "$help_cmd_attach"]], ["@attach"], 'do_link]>, ", ", <$format, ["link", [["node", "$help_cmd_build"]], ["@build"], 'do_link]>], #[['links, #[["@attach", "$help_cmd_attach"], ["@build", "$help_cmd_build"]]]]]>; var $help_node index = $help_index_cmds; -var $help_node links = #[]; -var $root created_on = 856038007; +var $help_node links = #[["@attach", $help_cmd_attach], ["@build", $help_cmd_build]]; +var $root created_on = 870664099; var $root flags = ['variables, 'methods, 'code, 'core]; var $root inited = 1; var $root managed = [$help_cmd_dig]; diff -rwu src-3.0a7/help_cmd_display.cdc ColdCore-3.0a9.02/src/help_cmd_display.cdc --- src-3.0a7/help_cmd_display.cdc Sat Aug 9 19:09:45 1997 +++ ColdCore-3.0a9.02/src/help_cmd_display.cdc Tue Aug 19 12:15:32 1997 @@ -2,14 +2,13 @@ new object $help_cmd_display: $help_cmds; var $has_name name = ['prop, "@display", "@display"]; -var $help_node body = <$ctext_frob, [["Need to write."], #[['this, $help_cmd_display]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["PROGRAMMER COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@d?isplay <objref> [options]"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Shows general information about an object, including it's size, owner, parents, location, and what permissions it has. You can optionally have it list all the public methods you have defined on an object, or all the variables, and which object defines them as below. ", <$format, ["np", [], [], 'do_np]>, <$format, ["b", [], ["Example:"], 'do_b]>, " ", <$format, ["dfn", [], [<$format, ["quote", [], [">@display $vampire\nObject: $vampire (Vampire)\nCreated: Mon Jan 13 18:19:17 1997\nQuota: 75000 bytes\nPerms:\nSize: 6,132 bytes (on disk)\nManager: $vampire (Vampire)\nWriters: (none)\nParents: $admin (Generic Admin) and $antisocial\nLocation: $the_pit (The Pit)\n---"], 'do_quote]>], 'do_dfn]>, " ", <$format, ["dfn", [], [<$format, ["quote", [], [">@display $vampire,\nObject Variables matching \"*\"\n ,test_dict: #[]\n ,test: 0\n"], 'do_quote]>], 'do_dfn]>, " ", <$format, ["dfn", [], [<$format, ["quote", [], [">@display $vampire.\nPublic Methods matching \"*\":\n ---- 34 .edit_cmd(cmdstr, com, args)\n ---- 14 .quit_editor()\n ---- 49 .pulse()\n ---- 24 .startup()\n ---- 8 .dict_test(cmdstr, cmd, [str])\n ---- 51 .tmp_pulse()\n"], 'do_quote]>], 'do_dfn]>, " Options can be: ", <$format, ["dfn", [["nobound", 1], [" ", 1], ["ind", "4"]], [<$format, ["table", [["cols", "20%,80%"]], [<$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["+c?hop"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Chops lines longer than the players cols ", <$format, ["link", [["node", "$help_interface_settings"]], ["setting"], 'do_link]>, "."], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["+g?enerations"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Sets which object to go back from."], 'do_td]>], 'do_tr]>], 'do_table]>], 'do_dfn]>], #[['links, #[["setting", "$help_interface_settings"]]]]]>; var $help_node index = $help_index_cmds; -var $help_node links = #[]; +var $help_node links = #[["setting", $help_interface_settings]]; var $root created_on = 796268969; var $root flags = ['methods, 'code, 'variables, 'core]; var $root inited = 1; var $root managed = [$help_cmd_display]; var $root manager = $help_cmd_display; -var $root owned = [$help_cmd_display]; diff -rwu src-3.0a7/help_cmd_emote.cdc ColdCore-3.0a9.02/src/help_cmd_emote.cdc --- src-3.0a7/help_cmd_emote.cdc Sat Aug 9 19:09:44 1997 +++ ColdCore-3.0a9.02/src/help_cmd_emote.cdc Tue Aug 19 12:15:32 1997 @@ -10,6 +10,5 @@ var $root inited = 1; var $root managed = [$help_cmd_emote]; var $root manager = $help_cmd_emote; -var $root owned = [$help_cmd_emote]; diff -rwu src-3.0a7/help_cmd_mojo.cdc ColdCore-3.0a9.02/src/help_cmd_mojo.cdc --- src-3.0a7/help_cmd_mojo.cdc Sat Aug 9 19:09:45 1997 +++ ColdCore-3.0a9.02/src/help_cmd_mojo.cdc Tue Aug 19 12:15:32 1997 @@ -2,7 +2,7 @@ new object $help_cmd_mojo: $help_cmds; var $has_name name = ['prop, "@mojo", "@mojo"]; -var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["ADMIN COMMAND"], 'do_b]>, " ", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@adjust|@promote <user> to <any>"], 'do_tt]>], 'do_dfn]>, " ", <$format, ["p", [], [], 'do_p]>, "Used by an administrator to enable full system priveliges."], #[['this, $help_cmd_mojo]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["ADMIN COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@mojo on|off"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Used by an administrator to enable full system priveliges."], #[]]>; var $help_node index = $help_index_cmds; var $help_node links = #[]; var $root created_on = 848119784; diff -rwu src-3.0a7/help_cmd_new.cdc ColdCore-3.0a9.02/src/help_cmd_new.cdc --- src-3.0a7/help_cmd_new.cdc Sat Aug 9 19:09:45 1997 +++ ColdCore-3.0a9.02/src/help_cmd_new.cdc Tue Aug 19 12:15:32 1997 @@ -2,9 +2,9 @@ new object $help_cmd_new: $help_cmds; var $has_name name = ['prop, "@new", "@new"]; -var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "Syntax: ", <$format, ["tt", [], ["@new <parent>[named <name>]"], 'do_tt]>, " ", <$format, ["np", [], [], 'do_np]>, "Create a new object with the given parent, and optionally set the name. This command is preferred when working with VR objects, as it will correctly handle both real and Frob instances. The alternative is ", <$format, ["link", [["node", "$help_cmd_spawn"]], ["@spawn"], 'do_link]>, " which will always create new objects."], #[['this, $help_cmd_new]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@new <parent> [named <name>]"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Creates a new object with the given parent, and optionally set the name. This command is preferred when working with VR objects, as it will correctly handle both real and ", <$format, ["link", [["node", "$help_coldc_types_frobs"]], ["Frob"], 'do_link]>, " instances. The alternative is ", <$format, ["link", [["node", "$help_cmd_spawn"]], ["@spawn"], 'do_link]>, " which will always create new objects.", <$format, ["p", [], [], 'do_p]>, "See also: ", <$format, ["link", [["node", "$help_cmd_destroy"]], ["@destroy"], 'do_link]>], #[['links, #[["Frob", "$help_coldc_types_frobs"], ["@spawn", "$help_cmd_spawn"], ["@destroy", "$help_cmd_destroy"]]]]]>; var $help_node index = $help_index_cmds; -var $help_node links = #[["@spawn", $help_cmd_spawn]]; +var $help_node links = #[["Frob", $help_coldc_types_frobs], ["@spawn", $help_cmd_spawn], ["@destroy", $help_cmd_destroy]]; var $root created_on = 856032830; var $root flags = ['variables, 'methods, 'code, 'core]; var $root inited = 1; diff -rwu src-3.0a7/help_cmd_nh.cdc ColdCore-3.0a9.02/src/help_cmd_nh.cdc --- src-3.0a7/help_cmd_nh.cdc Sat Aug 9 19:09:46 1997 +++ ColdCore-3.0a9.02/src/help_cmd_nh.cdc Tue Aug 19 12:15:32 1997 @@ -2,7 +2,7 @@ new object $help_cmd_nh: $help_cmds; var $has_name name = ['prop, "@nh|@new-help-node", "@nh|@new-help-node"]; -var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "Syntax: `", <$format, ["tt", [], ["@nh [<node>] [options]"], 'do_tt]>, "` ", <$format, ["np", [], [], 'do_np]>, "The argument ", <$format, ["i", [], ["node"], 'do_i]>, " is the parent node to descend from, or if unspecified it will defualt to the current node. Options can be:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["+i?ndex=index", <$format, ["br", [], [], 'do_br]>, "+o?bjname=objname", <$format, ["br", [], [], 'do_br]>, "+n?ame=\"name of node\""], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "A seperate entry is made in the index for each branch in the name (seperated by the | character)."], #[['this, $help_cmd_nh]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "Syntax: `", <$format, ["tt", [], ["@nh [<node>] [options]"], 'do_tt]>, "` ", <$format, ["np", [], [], 'do_np]>, "The argument ", <$format, ["i", [], ["node"], 'do_i]>, " is the parent node to descend from, or if unspecified it will default to the current node. Options can be:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["+i?ndex=index", <$format, ["br", [], [], 'do_br]>, "+o?bjname=objname", <$format, ["br", [], [], 'do_br]>, "+n?ame=\"name of node\""], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "A seperate entry is made in the index for each branch in the name (seperated by the | character)."], #[]]>; var $help_node index = $help_index_cmds; var $help_node links = #[]; var $root created_on = 856455556; diff -rwu src-3.0a7/help_cmd_page.cdc ColdCore-3.0a9.02/src/help_cmd_page.cdc --- src-3.0a7/help_cmd_page.cdc Sat Aug 9 19:09:45 1997 +++ ColdCore-3.0a9.02/src/help_cmd_page.cdc Tue Aug 19 12:15:32 1997 @@ -10,6 +10,5 @@ var $root inited = 1; var $root managed = [$help_cmd_page]; var $root manager = $help_cmd_page; -var $root owned = [$help_cmd_page]; diff -rwu src-3.0a7/help_cmd_paste.cdc ColdCore-3.0a9.02/src/help_cmd_paste.cdc --- src-3.0a7/help_cmd_paste.cdc Sat Aug 9 19:09:45 1997 +++ ColdCore-3.0a9.02/src/help_cmd_paste.cdc Tue Aug 19 12:15:32 1997 @@ -1,7 +1,7 @@ new object $help_cmd_paste: $help_cmds; -var $has_name name = ['prop, "@paste", "@paste"]; +var $has_name name = ['prop, "@paste|@paste-to", "@paste|@paste-to"]; var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "Syntax: ", <$format, ["tt", [], ["@paste [to <target>]"], 'do_tt]>, <$format, ["p", [], [], 'do_p]>, <$format, ["p", [], [], 'do_p]>, "The non-VR interaction command ", <$format, ["tt", [], ["@paste"], 'do_tt]>, " is used to display blocks of text either to the room or to a specific person (<target>). If no target is specified, it is displayed to the room. You will be prompted for the text. When you are finished typing in the text, type a period at the beginning of a line, followed bo no other characters. Example:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], [<$format, ["quote", [], ["> @paste\nReceiving input. Enter \".\" to finish or \"@abort\" to abort.\n> USER PID %CPU %MEM VSZ RSS COMMAND\n> brandon 10267 0.0 19.4 5800 5928 ./genesis\n> .\n-------------- Brandon (@paste's) ---------------\nUSER PID %CPU %MEM VSZ RSS COMMAND\nbrandon 10267 0.0 19.4 5800 5928 ./genesis\n------------------- + Finis + -------------------\n2 lines of text pasted"], 'do_quote]>], 'do_dfn]>], #[['this, $help_cmd_paste]]]>; var $help_node index = $help_index_cmds; var $help_node links = #[]; @@ -10,6 +10,5 @@ var $root inited = 1; var $root managed = [$help_cmd_paste]; var $root manager = $help_cmd_paste; -var $root owned = [$help_cmd_paste]; diff -rwu src-3.0a7/help_cmd_program.cdc ColdCore-3.0a9.02/src/help_cmd_program.cdc --- src-3.0a7/help_cmd_program.cdc Sat Aug 9 19:09:45 1997 +++ ColdCore-3.0a9.02/src/help_cmd_program.cdc Tue Aug 19 12:15:32 1997 @@ -2,7 +2,7 @@ new object $help_cmd_program: $help_cmds; var $has_name name = ['prop, "@program", "@program"]; -var $help_node body = <$ctext_frob, [[<$format, ["subj", [["level", "3"]], [<$format, ["quote", [], ["@program <objref: +w?arnings +e?dited=1 +a?ccess=1 +f?lags=1n [with <any>]>"], 'do_quote]>], 'do_subj]>, "Set the code for a method.", <$format, ["br", [], [], 'do_br]>, <$format, ["dl", [], [<$format, ["dt", [], ["+warnings"], 'do_dt]>, <$format, ["dd", [], ["Do not warn about recursion."], 'do_dd]>, <$format, ["dt", [], ["+edited[=message]"], 'do_dt]>, <$format, ["dd", [], ["set or override the edited comment. (admin only)"], 'do_dd]>, <$format, ["dt", [], ["+access=permission"], 'do_dt]>, <$format, ["dd", [], ["Set the method access to one of public, protected, private, root or driver"], 'do_dd]>, <$format, ["dt", [], ["+flags=flags"], 'do_dt]>, <$format, ["dd", [], ["Set the flags to some of nooverride, locked, fork or native."], 'do_dd]>], 'do_dl]>, "Optionally, 'with' preposition causes it to read the code from the command line instead of prompting the user for it."], #[['this, $help_cmd_program]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["PROGRAMMER COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax ", <$format, ["tt", [], ["@program <objref>.<method> [options] [with <any>]"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Sets the code for <method> on <object>. ", <$format, ["np", [], [], 'do_np]>, " Options can be: ", <$format, ["dfn", [["nobound", 1], [" ", 1], ["ind", "4"]], [<$format, ["table", [["cols", "30%,70%"]], [<$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["+warnings"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Do not warn about recursion."], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["+edited[=message]"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Set or override the edited comment. (admin only)."], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["+access=permission"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Set the method access to one of public, protected, private, root or driver."], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["+flags=flags"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Set the flags to some of nooverride, locked, fork or native."], 'do_td]>], 'do_tr]>], 'do_table]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Optionally, 'with' preposition causes it to read the code from the command line instead of prompting the user for it."], #[]]>; var $help_node index = $help_index_cmds; var $help_node links = #[]; var $root created_on = 838059477; @@ -10,6 +10,5 @@ var $root inited = 1; var $root managed = [$help_cmd_program]; var $root manager = $help_cmd_program; -var $root owned = [$help_cmd_program]; diff -rwu src-3.0a7/help_cmd_reap.cdc ColdCore-3.0a9.02/src/help_cmd_reap.cdc --- src-3.0a7/help_cmd_reap.cdc Sat Aug 9 19:09:45 1997 +++ ColdCore-3.0a9.02/src/help_cmd_reap.cdc Tue Aug 19 12:15:32 1997 @@ -2,7 +2,7 @@ new object $help_cmd_reap: $help_cmds; var $has_name name = ['prop, "@reap", "@reap"]; -var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["ADMIN COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@reap [options] [<user>]"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Used in reaping users. Can have various possible behaviours. If no user is specified, it will list all reap possibilities, where possibilities are considered after the user has not logged in for three months. This time can be changed with the ", <$format, ["tt", [], ["time"], 'do_tt]>, " option, which is given as an english explanation of the time, such as:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["> @reap +time=\"1 month\""], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "If a user is given, it will enter an interactive user reaping system. At any time during the reaping process you can use @abort to cancel any further actions. ", <$format, ["np", [], [], 'do_np]>, "If a user is given, and the ", <$format, ["tt", [], ["mail"], 'do_tt]>, " option is given, it will mail a one week notice to the user instead of immediatly reaping them (if the ", <$format, ["tt", [], ["time"], 'do_tt]>, " option is also given, it will use that as the interval before reaping, instead of a week). Example:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["> @reap Bob +mail +time=\"5 days\""], 'do_dfn]>], #[['this, $help_cmd_reap]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["ADMIN COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@reap [options] [<user>]"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Used in reaping users. Can have various possible behaviours. If only a user is given (no options), @reap will enter an interactive user reaping system. At any time during the reaping process you can use @abort to cancel any further actions. ", <$format, ["np", [], [], 'do_np]>, "If no user is given, it will list all reap possibilities, where possibilities are considered after the user has not logged in for three months. This time can be changed with the ", <$format, ["tt", [], ["time"], 'do_tt]>, " option, which is given as an english explanation of the time, such as:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["> @reap +time=\"1 month\""], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "In the listing the column ", <$format, ["tt", [], ["E"], 'do_tt]>, " will have an exclamation point if the user's email address is invalid. The column ", <$format, ["tt", [], ["MNG"], 'do_tt]>, " represents how many objects the user manages (always at least one). The column ", <$format, ["tt", [], ["Notified"], 'do_tt]>, " shows if and when the last reap notification was mailed, using the ", <$format, ["tt", [], ["mail"], 'do_tt]>, " option. The columns ", <$format, ["tt", [], ["Last On"], 'do_tt]>, " and ", <$format, ["tt", [], ["Age"], 'do_tt]>, " represent when the user was last connected, and how long it has been since they were created. ", <$format, ["np", [], [], 'do_np]>, "If the ", <$format, ["tt", [], ["mail"], 'do_tt]>, " option is given, instead of reaping it will send a message to the user's email address, notifying them of the imminent reaping. The ", <$format, ["tt", [], ["time"], 'do_tt]>, " option can also be used to change the grace period, such as:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["> @reap Bob +mail +time=\"5 days\""], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "A user is automatically removed from reapable status when they connect. The grace period is enforcable only by the administrations. This command does not make any assumptions, and an administrator will have to followup with a full reaping at the end of the grace period."], #[]]>; var $help_node index = $help_index_cmds; var $help_node links = #[]; var $root created_on = 848426641; diff -rwu src-3.0a7/help_cmd_say.cdc ColdCore-3.0a9.02/src/help_cmd_say.cdc --- src-3.0a7/help_cmd_say.cdc Sat Aug 9 19:09:44 1997 +++ ColdCore-3.0a9.02/src/help_cmd_say.cdc Tue Aug 19 12:15:31 1997 @@ -10,6 +10,5 @@ var $root inited = 1; var $root managed = [$help_cmd_say]; var $root manager = $help_cmd_say; -var $root owned = [$help_cmd_say]; diff -rwu src-3.0a7/help_cmd_set.cdc ColdCore-3.0a9.02/src/help_cmd_set.cdc --- src-3.0a7/help_cmd_set.cdc Sat Aug 9 19:09:45 1997 +++ ColdCore-3.0a9.02/src/help_cmd_set.cdc Tue Aug 19 12:15:32 1997 @@ -10,6 +10,5 @@ var $root inited = 1; var $root managed = [$help_cmd_set]; var $root manager = $help_cmd_set; -var $root owned = [$help_cmd_set]; diff -rwu src-3.0a7/help_cmd_shortcuts.cdc ColdCore-3.0a9.02/src/help_cmd_shortcuts.cdc --- src-3.0a7/help_cmd_shortcuts.cdc Sat Aug 9 19:09:45 1997 +++ ColdCore-3.0a9.02/src/help_cmd_shortcuts.cdc Tue Aug 19 12:15:32 1997 @@ -9,6 +9,5 @@ var $root inited = 1; var $root managed = [$help_cmd_shortcuts]; var $root manager = $help_cmd_shortcuts; -var $root owned = [$help_cmd_shortcuts]; diff -rwu src-3.0a7/help_cmd_spoof.cdc ColdCore-3.0a9.02/src/help_cmd_spoof.cdc --- src-3.0a7/help_cmd_spoof.cdc Sat Aug 9 19:09:45 1997 +++ ColdCore-3.0a9.02/src/help_cmd_spoof.cdc Tue Aug 19 12:15:32 1997 @@ -10,6 +10,5 @@ var $root inited = 1; var $root managed = [$help_cmd_spoof]; var $root manager = $help_cmd_spoof; -var $root owned = [$help_cmd_spoof]; diff -rwu src-3.0a7/help_cmd_think.cdc ColdCore-3.0a9.02/src/help_cmd_think.cdc --- src-3.0a7/help_cmd_think.cdc Sat Aug 9 19:09:45 1997 +++ ColdCore-3.0a9.02/src/help_cmd_think.cdc Tue Aug 19 12:15:32 1997 @@ -10,6 +10,5 @@ var $root inited = 1; var $root managed = [$help_cmd_think]; var $root manager = $help_cmd_think; -var $root owned = [$help_cmd_think]; diff -rwu src-3.0a7/help_cmd_tosay.cdc ColdCore-3.0a9.02/src/help_cmd_tosay.cdc --- src-3.0a7/help_cmd_tosay.cdc Sat Aug 9 19:09:44 1997 +++ ColdCore-3.0a9.02/src/help_cmd_tosay.cdc Tue Aug 19 12:15:32 1997 @@ -10,6 +10,5 @@ var $root inited = 1; var $root managed = [$help_cmd_tosay]; var $root manager = $help_cmd_tosay; -var $root owned = [$help_cmd_tosay]; diff -rwu src-3.0a7/help_cmd_wear.cdc ColdCore-3.0a9.02/src/help_cmd_wear.cdc --- src-3.0a7/help_cmd_wear.cdc Sat Aug 9 19:09:45 1997 +++ ColdCore-3.0a9.02/src/help_cmd_wear.cdc Tue Aug 19 12:15:32 1997 @@ -1,7 +1,7 @@ new object $help_cmd_wear: $help_cmds; -var $has_name name = ['prop, "wear|shed", "wear|shed"]; +var $has_name name = ['prop, "wear|shed|remove", "wear|shed|remove"]; var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "Syntax: ", <$format, ["tt", [], ["wear <article>"], 'do_tt]>, " OR ", <$format, ["tt", [], ["shed|remove <article>"], 'do_tt]>, " ", <$format, ["np", [], [], 'do_np]>, "Wear or remove an article of clothing. You must be holding (or wearing, as applicable) the article of clothing. The clothing must also be a $wearable_frob. You can create clothing with the ", <$format, ["link", [["node", "$help_cmd_new"]], ["@new"], 'do_link]>, " cmd. For example:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["@new $wearable_frob named Trenchcoat", <$format, ["br", [], [], 'do_br]>, "wear trenchcoat", <$format, ["br", [], [], 'do_br]>, "shed trenchcoat"], 'do_dfn]>], #[['this, $help_cmd_wear]]]>; var $help_node index = $help_index_cmds; var $help_node links = #[["@new", $help_cmd_new]]; diff -rwu src-3.0a7/help_cmd_whisper.cdc ColdCore-3.0a9.02/src/help_cmd_whisper.cdc --- src-3.0a7/help_cmd_whisper.cdc Sat Aug 9 19:09:44 1997 +++ ColdCore-3.0a9.02/src/help_cmd_whisper.cdc Tue Aug 19 12:15:32 1997 @@ -10,6 +10,5 @@ var $root inited = 1; var $root managed = [$help_cmd_whisper]; var $root manager = $help_cmd_whisper; -var $root owned = [$help_cmd_whisper]; diff -rwu src-3.0a7/help_cmds.cdc ColdCore-3.0a9.02/src/help_cmds.cdc --- src-3.0a7/help_cmds.cdc Sat Aug 9 19:09:44 1997 +++ ColdCore-3.0a9.02/src/help_cmds.cdc Tue Aug 19 12:15:31 1997 @@ -4,29 +4,24 @@ var $has_name name = ['prop, "Commands", "Commands"]; var $help_node body = <$ctext_frob, [["This node is simply a place holder, and should not be linked in through an index or anything. If you see it, something has gone wrong."], #[['this, $help_cmds]]]>; var $help_node group = 1; +var $help_node holder = 1; var $help_node links = #[]; var $help_node nolist = 1; *var $root child_index = '-' help_cmds.cdc var $root created_on = 847128224; -var $root flags = ['variables, 'methods, 'code, 'core]; +var $root flags = ['variables, 'methods, 'code, 'core, 'fertile]; var $root inited = 1; var $root managed = [$help_cmds]; var $root manager = $help_cmds; -var $root owned = [$help_cmds]; public method .nolist() { arg @args; // all 'command' nodes are nolist return 1; - - // $#Edited: 10 Nov 96 13:25 $brandon }; public method .top_of_help_heirarchy() { return definer() == this(); - - // $#Edited: 11 Nov 96 22:41 $brandon }; diff -rwu src-3.0a7/help_cml.cdc ColdCore-3.0a9.02/src/help_cml.cdc --- src-3.0a7/help_cml.cdc Sat Aug 9 19:09:35 1997 +++ ColdCore-3.0a9.02/src/help_cml.cdc Tue Aug 19 12:15:22 1997 @@ -6,13 +6,11 @@ var $help_node index = $help_index_core; var $help_node links = #[["Formatters", $help_cml_formatters], ["Generators", $help_cml_generators], ["Customizing", $help_cml_customizing]]; var $help_node nolist = 0; *var $root child_index = '-' help_cml.cdc var $root created_on = 796268969; var $root fertile = 1; var $root flags = ['methods, 'code, 'fertile, 'variables, 'core]; var $root inited = 1; var $root managed = [$help_cml]; var $root manager = $help_cml; -var $root owned = [$help_cml]; diff -rwu src-3.0a7/help_cml_customizing.cdc ColdCore-3.0a9.02/src/help_cml_customizing.cdc --- src-3.0a7/help_cml_customizing.cdc Sat Aug 9 19:09:35 1997 +++ ColdCore-3.0a9.02/src/help_cml_customizing.cdc Tue Aug 19 12:15:22 1997 @@ -10,6 +10,5 @@ var $root inited = 1; var $root managed = [$help_cml_customizing]; var $root manager = $help_cml_customizing; -var $root owned = [$help_cml_customizing]; diff -rwu src-3.0a7/help_cml_formatters.cdc ColdCore-3.0a9.02/src/help_cml_formatters.cdc --- src-3.0a7/help_cml_formatters.cdc Sat Aug 9 19:09:35 1997 +++ ColdCore-3.0a9.02/src/help_cml_formatters.cdc Tue Aug 19 12:15:22 1997 @@ -11,6 +11,5 @@ var $root inited = 1; var $root managed = [$help_cml_formatters]; var $root manager = $help_cml_formatters; -var $root owned = [$help_cml_formatters]; diff -rwu src-3.0a7/help_cml_generators.cdc ColdCore-3.0a9.02/src/help_cml_generators.cdc --- src-3.0a7/help_cml_generators.cdc Sat Aug 9 19:09:35 1997 +++ ColdCore-3.0a9.02/src/help_cml_generators.cdc Tue Aug 19 12:15:22 1997 @@ -11,6 +11,5 @@ var $root inited = 1; var $root managed = [$help_cml_generators]; var $root manager = $help_cml_generators; -var $root owned = [$help_cml_generators]; diff -rwu src-3.0a7/help_coldc_func.cdc ColdCore-3.0a9.02/src/help_coldc_func.cdc --- src-3.0a7/help_coldc_func.cdc Sat Aug 9 19:09:38 1997 +++ ColdCore-3.0a9.02/src/help_coldc_func.cdc Tue Aug 19 12:15:26 1997 @@ -33,10 +32,8 @@ funcs = (fdict.keys()).sort(); max = ((fdict.keys()).element_maxlength()) + 4; cols = 75 / max; - if (cols < 1) { - $brandon.tell("fdict: " + (fdict.keys())); + if (cols < 1) throw(~type, (("Columns are less than one: " + cols) + " ") + max); - } col = toint((max / 75.0) * 100) + "%"; out += "{table cols=" + col; if (cols > 1) @@ -58,8 +55,6 @@ } out += "}"; .set_body(out); - - // $#Edited: 14 Feb 97 22:52 $brandon }; diff -rwu src-3.0a7/help_coldc_objs_ref.cdc ColdCore-3.0a9.02/src/help_coldc_objs_ref.cdc --- src-3.0a7/help_coldc_objs_ref.cdc Sat Aug 9 19:09:35 1997 +++ ColdCore-3.0a9.02/src/help_coldc_objs_ref.cdc Tue Aug 19 12:15:23 1997 @@ -2,7 +2,7 @@ new object $help_coldc_objs_ref: $help_coldc_objs; var $has_name name = ['prop, "Referencing Objects", "Referencing Objects"]; -var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "Objects exist within the database, and are referenced with a unique number or ", <$format, ["i", [], ["Object Number"], 'do_i]>, " (", <$format, ["i", [], ["objnum"], 'do_i]>, "), which is assigned to the object upon its creation in the database. ", <$format, ["i", [], ["Object numbers"], 'do_i]>, " cannot be changed after an object is created. When an object is destroyed, it's ", <$format, ["i", [], ["objnum"], 'do_i]>, " is not re-used by the driver unless the database is decompiled to text and recompiled.", <$format, ["p", [], [], 'do_p]>, "An object can also have an ", <$format, ["i", [], ["Object Name"], 'do_i]>, " assigned to it, which can be changed througout the life of the object. Object Name's are only unique to that object, while the object has the name. Once the name is changed the old name can be taken by another object. Object Names exist for practical functionality, as it is easier to remember references which consist of alphabetic and numeric characters, compared to references which are simply numeric.", <$format, ["p", [], [], 'do_p]>, "In ColdC an object number is designated with a hash mark ('#') followed by the object's number. For instance ", <$format, ["tt", [], ["#23"], 'do_tt]>, " refers to ", <$format, ["i", [], ["object number"], 'do_i]>, " ", <$format, ["tt", [], ["23"], 'do_tt]>, ". An object name is designated as an ", <$format, ["link", [["node", "$help_coldc_tokens"]], ["identifier"], 'do_link]>, " beginning with a dollar sign (", <$format, ["tt", [], ["$"], 'do_tt]>, "). For instance, if the object ", <$format, ["tt", [], ["#23"], 'do_tt]>, " has the name ", <$format, ["i", [], ["object_23"], 'do_i]>, " assigned to it, it would be formatted in ColdC as: ", <$format, ["tt", [], ["$object_23"], 'do_tt]>, ".", <$format, ["p", [], [], 'do_p]>, "Both the object number and object name are generically called ", <$format, ["i", [], ["database references"], 'do_i]>, " (", <$format, ["i", [], ["dbrefs"], 'do_i]>, "). When the driver formats a database reference the Object Name will take precedence over an Object Number, because the name is generally easier to remember and comprehend.", <$format, ["p", [], [], 'do_p]>, "When the interpreter encounters an object name, it looks up the number associated with that name in a table. If no object has been assigned to that name, a ", <$format, ["tt", [], ["~namenf"], 'do_tt]>, " error is thrown; otherwise the object name is equivalent to the object number when executing."], #[['this, $help_coldc_objs_ref]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "Objects exist within the database, and are referenced with a unique number or ", <$format, ["i", [], ["Object Number"], 'do_i]>, " (", <$format, ["i", [], ["objnum"], 'do_i]>, "), which is assigned to the object upon its creation in the database. ", <$format, ["i", [], ["Object numbers"], 'do_i]>, " cannot be changed after an object is created. When an object is destroyed, it's ", <$format, ["i", [], ["objnum"], 'do_i]>, " is not re-used by the driver unless the database is decompiled to text and recompiled. ", <$format, ["np", [], [], 'do_np]>, "An object can also have an ", <$format, ["i", [], ["Object Name"], 'do_i]>, " assigned to it, which can be changed througout the life of the object. Object Name's are only unique to that object, while the object has the name. Once the name is changed the old name can be taken by another object. Object Names exist for practical functionality, as it is easier to remember references which consist of alphabetic and numeric characters, compared to references which are simply numeric. ", <$format, ["np", [], [], 'do_np]>, "In ColdC an object number is designated with a hash mark ('#') followed by the object's number. For instance ", <$format, ["tt", [], ["#23"], 'do_tt]>, " refers to ", <$format, ["i", [], ["object number"], 'do_i]>, " ", <$format, ["tt", [], ["23"], 'do_tt]>, ". An object name is designated as an ", <$format, ["link", [["node", "$help_coldc_tokens"]], ["identifier"], 'do_link]>, " beginning with a dollar sign (", <$format, ["tt", [], ["$"], 'do_tt]>, "). For instance, if the object ", <$format, ["tt", [], ["#23"], 'do_tt]>, " has the name ", <$format, ["i", [], ["object_23"], 'do_i]>, " assigned to it, it would be formatted in ColdC as: ", <$format, ["tt", [], ["$object_23"], 'do_tt]>, ". ", <$format, ["np", [], [], 'do_np]>, "A negative object number will appear if there is no object in the database with the given object number--i.e. if it is an invalid object number. This is true for all cases, except ", <$format, ["tt", [], ["#-1"], 'do_tt]>, ", which is the generic ", <$format, ["i", [], ["Invalid Object Number"], 'do_i]>, ". ", <$format, ["np", [], [], 'do_np]>, "Both the object number and object name are generically called ", <$format, ["i", [], ["database references"], 'do_i]>, " (", <$format, ["i", [], ["dbrefs"], 'do_i]>, "). When the driver formats a database reference the Object Name will take precedence over an Object Number, because the name is generally easier to remember and comprehend. ", <$format, ["np", [], [], 'do_np]>, "When the interpreter encounters an object name, it looks up the number associated with that name in a table. If no object has been assigned to that name, a ", <$format, ["tt", [], ["~namenf"], 'do_tt]>, " error is thrown; otherwise the object name is equivalent to the object number when executing."], #[['links, #[["identifier", "$help_coldc_tokens"]]]]]>; var $help_node index = $help_index_driver; var $help_node links = #[["identifier", $help_coldc_tokens]]; var $help_node nolist = 0; diff -rwu src-3.0a7/help_coldc_regexp.cdc ColdCore-3.0a9.02/src/help_coldc_regexp.cdc --- src-3.0a7/help_coldc_regexp.cdc Sat Aug 9 19:09:38 1997 +++ ColdCore-3.0a9.02/src/help_coldc_regexp.cdc Tue Aug 19 12:15:26 1997 @@ -2,7 +2,7 @@ new object $help_coldc_regexp: $help_coldc_imp; var $has_name name = ['prop, "Regexps|Regular Expressions", "Regexps|Regular Expressions"]; -var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "ColdC Regular Expressions use Henry Spencer's Regular Expression package with further extensions similar to those Perl has implemented. ", <$format, ["np", [], [], 'do_np]>, "A Regular Expression is an abstract way of matching text. The simplest Regular Expression is a direct match. For instance, the string \"that\" exists within the string \"this and that are here.\", therefore \"that\" is a Regular Expression. ", <$format, ["np", [], [], 'do_np]>, "However, regular expressions can be much more complex than this case, as there are many possibilities which may be matched in strings. Wildcard matching is a common way of matching more than a simple instance of text. Wildcard matching generally matches any number of anything where a ", <$format, ["tt", [], ["`*'"], 'do_tt]>, " is found in the wildcard. Although useful it does have its restrictions. Wildcard matching is not used in Regular Expressions because of its lack of control. ", <$format, ["subj", [["level", "2"]], ["ColdC Regular Expressions Explained"], 'do_subj]>, <$format, ["p", [], [], 'do_p]>, "The first concept of Regular Expressions are ", <$format, ["i", [], ["branches"], 'do_i]>, ". There can be zero or more ", <$format, ["i", [], ["branches"], 'do_i]>, " in a Regular Expression, seperated by the pipe character (\"|\"). A Regular Expression will match anything in one of the branches. An example of this is:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], [<$format, ["quote", [], ["this|that|there"], 'do_quote]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This Regular Expression will match \"this\" OR \"that\" OR \"there\". It is easiest to logically think of branches in this manner. ", <$format, ["np", [], [], 'do_np]>, "A branch is further defined as zero or more ", <$format, ["i", [], ["pieces"], 'do_i]>, " joined together. A ", <$format, ["i", [], ["piece"], 'do_i]>, " is an ", <$format, ["i", [], ["atom"], 'do_i]>, " possibly followed by an asterisk, a plus sign, or a question mark (\"*\", \"+\", or \"?\"). The asterisk, plus sign, or question mark defines how to match the atom. An atom followed by an asterisk matches zero or more occurances of the atom. An atom followed by a plus sign matches one or more occurances of the atom. An atom followed by a question mark matches zero or one occurance of the atom. ", <$format, ["np", [], [], 'do_np]>, "An ", <$format, ["i", [], ["atom"], 'do_i]>, " is either a Regular Expression in parentheses, a range (see below), or one of the following: a period (\".\"), a carat (\"^\"), a dollar sign (\"$\"), a back-slash (\"\") followed by a single character, or a single character with no other significance. A period matches any single character in the input text, a carat matches the beginning of the input text, a dollar-sign matches the end of the input text, and a back-slash followed by a single character either has special significance--such as matching all white space or all digits--or it removes special significance from the following character. For instance, \"$\" would match a dollar-sign in the input text, rather than matching the end of the line (which is what the dollar-sign usually does). The following characters have special meaning when matching (similar to PERL Regular Expressions): ", <$format, ["dfn", [["nobound", 1], [" ", 1], ["ind", "4"]], [<$format, ["table", [["cols", "10%,90%"]], [<$format, ["tr", [], [<$format, ["td", [], ["\"\w\""], 'do_td]>, <$format, ["td", [], ["Match a word word character (alphanumeric plus \"_\")"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], ["\"\W\""], 'do_td]>, <$format, ["td", [], ["Match a non-word character"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], ["\"\s\""], 'do_td]>, <$format, ["td", [], ["Match a whitespace character"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], ["\"\S\""], 'do_td]>, <$format, ["td", [], ["Match a non-whitespace character"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], ["\"\d\""], 'do_td]>, <$format, ["td", [], ["Match a digit character"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], ["\"\D\""], 'do_td]>, <$format, ["td", [], ["Match a non-digit character"], 'do_td]>], 'do_tr]>], 'do_table]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, <$format, ["i", [], ["Note: the above escape characters have not yet been integrated into the regular expression matcher."], 'do_i]>, " ", <$format, ["np", [], [], 'do_np]>, "A range is a sequence of characters enclosed in square brackets (", <$format, ["tt", [], ["\"[]\""], 'do_tt]>, "). It normally matches any single character contained within the range sequence. Characters which normally have special significance (such as a dollar-sign, period and a back-slash) loose that significance when enclosed in a range. However, a range has its own special characters. If the range begins with a carat (", <$format, ["tt", [], ["\"^\""], 'do_tt]>, "), it matches any single character which is ", <$format, ["i", [], ["not"], 'do_i]>, " in the sequence. If two characters in the sequence are separated by a dash (", <$format, ["tt", [], ["\"-\""], 'do_tt]>, "), the full range of ASCII characters between the two are matched, including the two. For instance, ", <$format, ["tt", [], ["\"[0-9]\""], 'do_tt]>, " matches any single decimal digit from zero to nine. To include a literal square bracket (", <$format, ["tt", [], ["\"]\""], 'do_tt]>, ") in the sequence do not use the back-slash to escape it (as the back-slash does not have special meaning when in a range), instead place it at the begining of the range (following a possible ", <$format, ["tt", [], ["\"^\""], 'do_tt]>, "). To include a literal dash (", <$format, ["tt", [], ["\"-\""], 'do_tt]>, ") place it the start or end of the range."], #[['this, $help_coldc_regexp]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "ColdC Regular Expressions use Henry Spencer's Regular Expression package with further extensions similar to those Perl has implemented. ", <$format, ["np", [], [], 'do_np]>, "A Regular Expression is an abstract way of matching text. The simplest Regular Expression is a direct match. For instance, the string \"that\" exists within the string \"this and that are here.\", therefore \"that\" is a Regular Expression. ", <$format, ["np", [], [], 'do_np]>, "However, regular expressions can be much more complex than this case, as there are many possibilities which may be matched in strings. Wildcard matching is a common way of matching more than a simple instance of text. Wildcard matching generally matches any number of anything where a ", <$format, ["tt", [], ["`*'"], 'do_tt]>, " is found in the wildcard. Although useful it does have its restrictions. Wildcard matching is not used in Regular Expressions because of its lack of control. ", <$format, ["np", [], [], 'do_np]>, "The following is a list of all possible special characters in a regular expression which have special meaning: ", <$format, ["dfn", [["nobound", 1], [" ", 1], ["ind", "4"]], [<$format, ["table", [["cols", "10%,90%"]], [<$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["\\"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Escape Mechanism, changes the meaning of the next character"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["^"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Match the beginning of a string, or if at the beginning of a range, logically inverts the value (i.e. anything NOT in this range)"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["$"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Match the end of a string"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["|"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Branch Seperator"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["()"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Grouping"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["[]"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Range"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["."], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Match any one character"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["*"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Match zero or more of the previous"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["+"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Match one or more of the previous"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["?"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Match zero or one of the previous"], 'do_td]>], 'do_tr]>], 'do_table]>], 'do_dfn]>, " ", <$format, ["subj", [["level", "2"]], ["ColdC Regular Expressions Explained"], 'do_subj]>, <$format, ["p", [], [], 'do_p]>, "The first concept of Regular Expressions are ", <$format, ["i", [], ["branches"], 'do_i]>, ". There can be zero or more ", <$format, ["i", [], ["branches"], 'do_i]>, " in a Regular Expression, seperated by the pipe character (\"|\"). A Regular Expression will match anything in one of the branches. An example of this is:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], [<$format, ["tt", [], ["this|that|there"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This Regular Expression will match \"this\" OR \"that\" OR \"there\". It is easiest to logically think of branches in this manner. ", <$format, ["np", [], [], 'do_np]>, "A branch is further defined as zero or more ", <$format, ["i", [], ["pieces"], 'do_i]>, " joined together. A ", <$format, ["i", [], ["piece"], 'do_i]>, " is an ", <$format, ["i", [], ["atom"], 'do_i]>, " possibly followed by an asterisk, a plus sign, or a question mark (\"*\", \"+\", or \"?\"). The asterisk, plus sign, or question mark defines how to match the atom. An atom followed by an asterisk matches zero or more occurances of the atom. An atom followed by a plus sign matches one or more occurances of the atom. An atom followed by a question mark matches zero or one occurance of the atom. ", <$format, ["np", [], [], 'do_np]>, "An ", <$format, ["i", [], ["atom"], 'do_i]>, " is either a Regular Expression Group or Range (see below), or one of the following: a period (\".\"), a carat (\"^\"), a dollar sign (\"$\"), a back-slash (\"\\\") followed by a single character, or a single character with no other significance. A period matches any single character in the input text, a carat matches the beginning of the input text, a dollar-sign matches the end of the input text, and a back-slash followed by a single character either has special significance--such as matching all white space or all digits--or it removes special significance from the following character. For instance, \"$\" would match a dollar-sign in the input text, rather than matching the end of the line (which is what the dollar-sign usually does). ", <$format, ["np", [], [], 'do_np]>, "A Group is anything enclosed within a set of parenthesis (", <$format, ["tt", [], ["\"()\""], 'do_tt]>, "). Groups will help to clarify how the Regular Expression should match, in addition to what results should be returned from the Regular Expression. If one or more groups exist, the result of the regular expression will include the groups, possibly in addition to the entire area matched in the string (what is returned will depend upon the function). ", <$format, ["np", [], [], 'do_np]>, "A range is a sequence of characters enclosed in square brackets (", <$format, ["tt", [], ["\"[]\""], 'do_tt]>, "). It normally matches any single character contained within the range sequence. Characters which normally have special significance (such as a dollar-sign, period and a back-slash) loose that significance when enclosed in a range. However, a range has its own special characters. If the range begins with a carat (", <$format, ["tt", [], ["\"^\""], 'do_tt]>, "), it matches any single character which is ", <$format, ["i", [], ["not"], 'do_i]>, " in the sequence. If two characters in the sequence are separated by a dash (", <$format, ["tt", [], ["\"-\""], 'do_tt]>, "), the full range of ASCII characters between the two are matched, including the two. For instance, ", <$format, ["tt", [], ["\"[0-9]\""], 'do_tt]>, " matches any single decimal digit from zero to nine. To include a literal square bracket (", <$format, ["tt", [], ["\"]\""], 'do_tt]>, ") in the sequence do not use the back-slash to escape it (as the back-slash does not have special meaning when in a range), instead place it at the begining of the range (following a possible ", <$format, ["tt", [], ["\"^\""], 'do_tt]>, "). To include a literal dash (", <$format, ["tt", [], ["\"-\""], 'do_tt]>, ") place it the start or end of the range. ", <$format, ["np", [], [], 'do_np]>, "Consider the following examples: ", <$format, ["dfn", [["nobound", 1], [" ", 1], ["ind", "4"]], [<$format, ["table", [["cols", "50%,50%"]], [<$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["a?"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Match zero or one 'a' characters"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["(this|that)*"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Match zero or more occurances of \"this\" or \"that\""], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["[a-z]+"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Match one or more occurances of any alphabetic character (a through z)"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["[^0-9]?"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Match zero or one occurance of any non-digit character"], 'do_td]>], 'do_tr]>], 'do_table]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "The following characters have special meaning when matching (similar to PERL Regular Expressions): ", <$format, ["dfn", [["nobound", 1], [" ", 1], ["ind", "4"]], [<$format, ["table", [["cols", "10%,90%"]], [<$format, ["tr", [], [<$format, ["td", [], ["\"\w\""], 'do_td]>, <$format, ["td", [], ["Match a word word character (alphanumeric plus \"_\")"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], ["\"\W\""], 'do_td]>, <$format, ["td", [], ["Match a non-word character"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], ["\"\s\""], 'do_td]>, <$format, ["td", [], ["Match a whitespace character"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], ["\"\S\""], 'do_td]>, <$format, ["td", [], ["Match a non-whitespace character"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], ["\"\d\""], 'do_td]>, <$format, ["td", [], ["Match a digit character"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], ["\"\D\""], 'do_td]>, <$format, ["td", [], ["Match a non-digit character"], 'do_td]>], 'do_tr]>], 'do_table]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, <$format, ["i", [], ["Note: the above escape characters have not yet been integrated into the regular expression matcher."], 'do_i]>], #[]]>; var $help_node index = $help_index_driver; var $help_node links = #[]; var $help_node nolist = 0; diff -rwu src-3.0a7/help_coldc_tasks_preempt.cdc ColdCore-3.0a9.02/src/help_coldc_tasks_preempt.cdc --- src-3.0a7/help_coldc_tasks_preempt.cdc Sat Aug 9 19:09:37 1997 +++ ColdCore-3.0a9.02/src/help_coldc_tasks_preempt.cdc Tue Aug 19 12:15:26 1997 @@ -2,11 +2,10 @@ new object $help_coldc_tasks_preempt: $help_coldc_tasks; var $has_name name = ['prop, "Preempting", "Preempting"]; -var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "When a task is preempted it stops executing and is queued behind other current tasks. When these tasks are finished executing the preempted task continues, with a refreshed tick amount. Preempting can be caused by calling either ", <$format, ["tt", [], [<$format, ["link", [["node", "$help_coldc_func_pause"]], ["pause()"], 'do_link]>], 'do_tt]>, " or ", <$format, ["tt", [], [<$format, ["link", [["node", "$help_coldc_func_refresh"]], ["refresh()"], 'do_link]>], 'do_tt]>, ". ", <$format, ["tt", [], ["pause()"], 'do_tt]>, " will always preempt immediately. ", <$format, ["tt", [], ["refresh()"], 'do_tt]>, " will only preempt if the tick count is nearly exhausted. Furthermore, if executing atomically ", <$format, ["tt", [], ["refresh()"], 'do_tt]>, " will not preempt, but will immediately refresh the tick count and continue executing. ", <$format, ["np", [], [], 'do_np]>, "Tasks may also be suspended indefinitely by using the function ", <$format, ["tt", [], [<$format, ["link", [["node", "$help_coldc_func_suspend"]], ["suspend()"], 'do_link]>], 'do_tt]>, ". The function ", <$format, ["tt", [], [<$format, ["link", [["node", "$help_coldc_func_resume"]], ["resume()"], 'do_link]>], 'do_tt]>, " will resume a suspended task. The function ", <$format, ["tt", [], [<$format, ["link", [["node", "$help_coldc_func_cancel"]], ["cancel()"], 'do_link]>], 'do_tt]>, " will cancel a suspended task. ", <$format, ["np", [], [], 'do_np]>, "For more information see ", <$format, ["link", [["node", "$help_coldc_tasks_preempt_examp"]], ["A Preempting Example"], 'do_link]>, "."], #[['this, $help_coldc_tasks_preempt]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "When a task is preempted it stops executing and is queued behind other current tasks. When these tasks are finished executing the preempted task continues, with a refreshed tick amount. Preempting can be caused by calling either ", <$format, ["tt", [], [<$format, ["link", [["node", "$help_func_pause"]], ["pause()"], 'do_link]>], 'do_tt]>, " or ", <$format, ["tt", [], [<$format, ["link", [["node", "$help_func_refresh"]], ["refresh()"], 'do_link]>], 'do_tt]>, ". ", <$format, ["tt", [], ["pause()"], 'do_tt]>, " will always preempt immediately. ", <$format, ["tt", [], ["refresh()"], 'do_tt]>, " will only preempt if the tick count is nearly exhausted. Furthermore, if executing atomically ", <$format, ["tt", [], ["refresh()"], 'do_tt]>, " will not preempt, but will immediately refresh the tick count and continue executing. ", <$format, ["np", [], [], 'do_np]>, "Tasks may also be suspended indefinitely by using the function ", <$format, ["tt", [], [<$format, ["link", [["node", "$help_func_suspend"]], ["suspend()"], 'do_link]>], 'do_tt]>, ". The function ", <$format, ["tt", [], [<$format, ["link", [["node", "$help_func_resume"]], ["resume()"], 'do_link]>], 'do_tt]>, " will resume a suspended task. The function ", <$format, ["tt", [], [<$format, ["link", [["node", "$help_func_cancel"]], ["cancel()"], 'do_link]>], 'do_tt]>, " will cancel a suspended task. ", <$format, ["np", [], [], 'do_np]>, "For more information see ", <$format, ["link", [["node", "$help_coldc_tasks_preempt_examp"]], ["A Preempting Example"], 'do_link]>, "."], #[['links, #[["pause()", "$help_func_pause"], ["refresh()", "$help_func_refresh"], ["suspend()", "$help_func_suspend"], ["resume()", "$help_func_resume"], ["cancel()", "$help_func_cancel"], ["A Preempting Example", "$help_coldc_tasks_preempt_examp"]]]]]>; var $help_node index = $help_index_driver; -var $help_node links = #[]; +var $help_node links = #[["pause()", $help_func_pause], ["refresh()", $help_func_refresh], ["suspend()", $help_func_suspend], ["resume()", $help_func_resume], ["cancel()", $help_func_cancel], ["A Preempting Example", $help_coldc_tasks_preempt_examp]]; var $help_node nolist = 0; *var $root child_index = '-' help_coldc_tasks_preempt.cdc var $root created_on = 854946002; var $root flags = ['variables, 'methods, 'code, 'core]; var $root inited = 1; diff -rwu src-3.0a7/help_coldc_types_dicts.cdc ColdCore-3.0a9.02/src/help_coldc_types_dicts.cdc --- src-3.0a7/help_coldc_types_dicts.cdc Sat Aug 9 19:09:36 1997 +++ ColdCore-3.0a9.02/src/help_coldc_types_dicts.cdc Tue Aug 19 12:15:23 1997 @@ -2,9 +2,9 @@ new object $help_coldc_types_dicts: $help_coldc_types; var $has_name name = ['prop, "Dictionary", "Dictionary"]; -var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "A ", <$format, ["i", [], ["dictionary"], 'do_i]>, " is a collection of data associations, each of which has a key and a value. Dictionaries are similar to lists, however, lookup in a dictionary is with the key (returning the value), rather than with the location in the list. Dictionaries generally take up more storage space in memory than lists, and are slightly slower to add to and remove from than lists, but searching for items in dictionaries is much faster than searching for items in a list. ", <$format, ["p", [], [], 'do_p]>, "Dictionaries are denoted by a list of two-element lists, preceded with a hash mark (", <$format, ["tt", [], ["#"], 'do_tt]>, "). Each of the two-element lists is an association, where the first element is the key and the second element is the value. Dictionaries are logically true unless empty. The following are all valid dictionaries: ", <$format, ["p", [], [], 'do_p]>, " ", <$format, ["dfn", [], ["#[[\"foo\", 3], ['bar, 'baz]] ", <$format, ["br", [], [], 'do_br]>, "#[[\"something\", 'blue], [\"one\", 1], [\"two\", 2]]"], 'do_dfn]>, " ", <$format, ["p", [], [], 'do_p]>, "When evaluating the key for the value in the dictionary is indexed, rather than the position as in a list, such as: ", <$format, ["p", [], [], 'do_p]>, " ", <$format, ["dfn", [], ["dict=#[[\"foo\", 3], ['bar, 'baz]]; ", <$format, ["br", [], [], 'do_br]>, "dict['bar]; ", <$format, ["br", [], [], 'do_br]>, "=> 'baz"], 'do_dfn]>], #[['this, $help_coldc_types_dicts]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "A ", <$format, ["i", [], ["dictionary"], 'do_i]>, " is a collection of data associations, each of which has a key and a value. Dictionaries are similar to lists, however, lookup in a dictionary is with the key (returning the value), rather than with the location in the list. Dictionaries generally take up more storage space in memory than lists, and are slightly slower to add to and remove from than lists, but searching for items in dictionaries is much faster than searching for items in a list.", <$format, ["np", [], [], 'do_np]>, "Dictionaries are denoted by a list of two-element lists, preceded with a hash mark (", <$format, ["tt", [], ["#"], 'do_tt]>, "). Each of the two-element lists is an association, where the first element is the key and the second element is the value. Dictionaries are logically true unless empty. The following are all valid dictionaries:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["#[[\"foo\", 3], ['bar, 'baz]]", <$format, ["br", [], [], 'do_br]>, "#[[\"something\", 'blue], [\"one\", 1], [\"two\", 2]]"], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "When evaluating the key for the value in the dictionary is indexed, rather than the position as in a list, such as:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["dict=#[[\"foo\", 3], ['bar, 'baz]];", <$format, ["br", [], [], 'do_br]>, "dict['bar];", <$format, ["br", [], [], 'do_br]>, "=> 'baz"], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "See Also: ", <$format, ["link", [["node", "$help_funcs_dict"]], ["Dictionary Functions"], 'do_link]>], #[['links, #[["Dictionary Functions", "$help_funcs_dict"]]]]]>; var $help_node index = $help_index_driver; -var $help_node links = #[]; +var $help_node links = #[["Dictionary Functions", $help_funcs_dict]]; var $help_node nolist = 0; var $root created_on = 853698066; var $root flags = ['variables, 'methods, 'code, 'core]; diff -rwu src-3.0a7/help_coldc_types_floats.cdc ColdCore-3.0a9.02/src/help_coldc_types_floats.cdc --- src-3.0a7/help_coldc_types_floats.cdc Sat Aug 9 19:09:35 1997 +++ ColdCore-3.0a9.02/src/help_coldc_types_floats.cdc Tue Aug 19 12:15:23 1997 @@ -2,9 +2,9 @@ new object $help_coldc_types_floats: $help_coldc_types; var $has_name name = ['prop, "Float", "Float"]; -var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "A ", <$format, ["i", [], ["float"], 'do_i]>, " is a real number (in mathematical terms). A float is logically true if it is not zero. Floats are denoted in ColdC with two numbers seperated by a period and optionally preceded with a plus (", <$format, ["tt", [], ["+"], 'do_tt]>, ") or minus (", <$format, ["tt", [], ["-"], 'do_tt]>, ") sign. If the float has small enough precision it may be formatted in scientific notation. Both forms are acceptable. For instance, the two floats are equivalent: ", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["0.000000001", <$format, ["br", [], [], 'do_br]>, "1e-09"], 'do_dfn]>], #[['this, $help_coldc_types_floats]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "A ", <$format, ["i", [], ["float"], 'do_i]>, " is a real number (in mathematical terms). A float is logically true if it is not zero. Floats are denoted in ColdC with two numbers seperated by a period and optionally preceded with a plus (", <$format, ["tt", [], ["+"], 'do_tt]>, ") or minus (", <$format, ["tt", [], ["-"], 'do_tt]>, ") sign. If the float has small enough precision it may be formatted in scientific notation. Both forms are acceptable. For instance, the two floats are equivalent:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["0.000000001", <$format, ["br", [], [], 'do_br]>, "1e-09"], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "See also: ", <$format, ["link", [["node", "$help_funcs_num"]], ["Numeric Functions"], 'do_link]>], #[['links, #[["Numeric Functions", "$help_funcs_num"]]]]]>; var $help_node index = $help_index_driver; -var $help_node links = #[]; +var $help_node links = #[["Numeric Functions", $help_funcs_num]]; var $help_node nolist = 0; var $root created_on = 853698066; var $root flags = ['variables, 'methods, 'code, 'core]; diff -rwu src-3.0a7/help_coldc_types_frobs.cdc ColdCore-3.0a9.02/src/help_coldc_types_frobs.cdc --- src-3.0a7/help_coldc_types_frobs.cdc Sat Aug 9 19:09:36 1997 +++ ColdCore-3.0a9.02/src/help_coldc_types_frobs.cdc Tue Aug 19 12:15:23 1997 @@ -2,9 +2,9 @@ new object $help_coldc_types_frobs: $help_coldc_types; var $has_name name = ['prop, "Frob", "Frob"]; -var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["i", [], ["Frobs"], 'do_i]>, " are an advanced data type in ColdC. They consist of a ", <$format, ["i", [], ["class"], 'do_i]>, " (the controlling object) and a ", <$format, ["i", [], ["representation"], 'do_i]>, " (a list or dictionary). Frobs are useful for grouping, abstracting and encapsulating a set of similar data by associating it with a handler object. Frobs are constructed by enclosing the class and representation within a less-than sign (", <$format, ["tt", [], ["<"], 'do_tt]>, ") and a greater-than sign (", <$format, ["tt", [], [">"], 'do_tt]>, "), seperated by a comma. All of the following are valid frobs:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["<$thing_frob, #[['desc, \"worthless\"], ['name, \"coin\"]]> ", <$format, ["br", [], [], 'do_br]>, "<$coins, [923]> ", <$format, ["br", [], [], 'do_br]>, "<#73, [1, 2]>"], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "The usefullness of a frob becomes apparent when used as the recipient in a ", <$format, ["link", [["node", "$help_coldc_mcall"]], ["method-call"], 'do_link]>, " expression. In this instance the ", <$format, ["i", [], ["frob class"], 'do_i]>, " becomes the recipient and the ", <$format, ["i", [], ["frob value"], 'do_i]>, " becomes the first argument sent to the method. For instance, the following two method calls are equivalent:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["$list.reverse([1, 2, 3], 'do_this) ", <$format, ["br", [], [], 'do_br]>, "(<$list, [1, 2, 3]>).reverse('do_this)"], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Because of the difference in how a frob method is called, it is possible to define a method as a frob-only method. If a method is defined as a frob-only method it is ", <$format, ["i", [], ["only"], 'do_i]>, " called when called by a frob. Calling it in the standard syntax would not retrieve the frob-only method, but would instead look for the same method further up the ancestor heirarchy. For more information see ", <$format, ["link", [["node", "$help_coldc_methods"]], ["Defining Methods"], 'do_link]>, ". ", <$format, ["np", [], [], 'do_np]>, "Frobs are always logically true."], #[['this, $help_coldc_types_frobs]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["i", [], ["Frobs"], 'do_i]>, " are an abstract data type used for dynamically handling data when using it as the receiver of a ", <$format, ["link", [["node", "$help_coldc_mcall"]], ["method-call"], 'do_link]>, " expression. Normally, when data is used as the receiver for a method call, the interpreter will actually lookup and use an object with an object name that is the same as the type of data being used (such as an object named ", <$format, ["tt", [], ["$string"], 'do_tt]>, " if the data is a ", <$format, ["tt", [], ["'string"], 'do_tt]>, "). In the case of a frob, the receiver is specified within the frob, as the ", <$format, ["i", [], ["Frob Class"], 'do_i]>, ". Frobs also give the ability to specify special method to handle the call with. ", <$format, ["np", [], [], 'do_np]>, " Frobs are useful for grouping, abstracting and encapsulating a set of similar data by associating it with a handler object. Frobs are constructed by enclosing the class and representation within a less-than sign (", <$format, ["tt", [], ["<"], 'do_tt]>, ") and a greater-than sign (", <$format, ["tt", [], [">"], 'do_tt]>, "), seperated by a comma. All of the following are valid frobs: ", <$format, ["dfn", [], ["<$thing_frob, #[['desc, \"worthless\"], ['name, \"coin\"]]>", <$format, ["br", [], [], 'do_br]>, "<$coins, [923]>", <$format, ["br", [], [], 'do_br]>, "<#73, [1, 2]>"], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "The usefullness of a frob becomes apparent when used as the recipient in a ", <$format, ["link", [["node", "$help_coldc_mcall"]], ["method-call"], 'do_link]>, " expression. In this instance the ", <$format, ["i", [], ["frob class"], 'do_i]>, " becomes the recipient and the ", <$format, ["i", [], ["frob value"], 'do_i]>, " becomes the first argument sent to the method. For instance, the following two method calls are equivalent:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["(<$list, [1, 2, 3]>).reverse('do_this)", <$format, ["br", [], [], 'do_br]>, "$list.reverse([1, 2, 3], 'do_this)"], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Furthermore, if a handler is used, the handler is called as the method, and the expected method is sent as a symbol argument. The following two method calls are equivalent:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["(<$obj, #[], 'handle_it>).tell(\"foof\")", <$format, ["br", [], [], 'do_br]>, "$obj.handle_it(#[], 'tell, \"foof\")"], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Because of the difference in how a frob method is called, it is possible to define a method as a frob-only method. If a method is defined as a frob-only method it is ", <$format, ["i", [], ["only"], 'do_i]>, " called when called by a frob. Calling it in the standard syntax would not retrieve the frob-only method, but would instead look for the same method further up the ancestor heirarchy. For more information see ", <$format, ["link", [["node", "$help_coldc_methods"]], ["Defining Methods"], 'do_link]>, ". ", <$format, ["np", [], [], 'do_np]>, "Frobs are always logically true. ", <$format, ["np", [], [], 'do_np]>, "See Also: ", <$format, ["link", [["node", "$help_func_class"]], ["frob_class()"], 'do_link]>, ", ", <$format, ["link", [["node", "$help_func_frob_value"]], ["frob_value()"], 'do_link]>, " and ", <$format, ["link", [["node", "$help_func_frob_handler"]], ["frob_handler()"], 'do_link]>], #[['links, #[["method-call", "$help_coldc_mcall"], ["Defining Methods", "$help_coldc_methods"], ["frob_class()", "$help_func_class"], ["frob_value()", "$help_func_frob_value"], ["frob_handler()", "$help_func_frob_handler"]]]]]>; var $help_node index = $help_index_driver; -var $help_node links = #[["method-call", $help_coldc_mcall], ["Defining Methods", $help_coldc_methods]]; +var $help_node links = #[["method-call", $help_coldc_mcall], ["Defining Methods", $help_coldc_methods], ["frob_class()", $help_func_class], ["frob_value()", $help_func_frob_value], ["frob_handler()", $help_func_frob_handler]]; var $help_node nolist = 0; var $root created_on = 853698066; var $root flags = ['variables, 'methods, 'code, 'core]; diff -rwu src-3.0a7/help_coldc_types_ints.cdc ColdCore-3.0a9.02/src/help_coldc_types_ints.cdc --- src-3.0a7/help_coldc_types_ints.cdc Sat Aug 9 19:09:35 1997 +++ ColdCore-3.0a9.02/src/help_coldc_types_ints.cdc Tue Aug 19 12:15:23 1997 @@ -2,9 +2,9 @@ new object $help_coldc_types_ints: $help_coldc_types; var $has_name name = ['prop, "Integer|Number", "Integer|Number"]; -var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "An ", <$format, ["i", [], ["integer"], 'do_i]>, " is a rational number (in mathematical terms). Integers can reliably be from 2147483647 to -2147483648 (unless the driver has been compiled with BIG_NUMBERS, in which case they are larger). An integer is logically true if it is not zero (negative numbers are logically true). Integers are denoted in ColdC with a series of digits, optionally preceded with a plus (", <$format, ["tt", [], ["+"], 'do_tt]>, ") or minus (", <$format, ["tt", [], ["-"], 'do_tt]>, ") sign."], #[['this, $help_coldc_types_ints]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "An ", <$format, ["i", [], ["integer"], 'do_i]>, " is a rational number (in mathematical terms). Integers can reliably be from 2147483647 to -2147483648 (unless the driver has been compiled with BIG_NUMBERS, in which case they are larger). An integer is logically true if it is not zero (negative numbers are logically true). Integers are denoted in ColdC with a series of digits, optionally preceded with a plus (", <$format, ["tt", [], ["+"], 'do_tt]>, ") or minus (", <$format, ["tt", [], ["-"], 'do_tt]>, ") sign. ", <$format, ["np", [], [], 'do_np]>, "See also: ", <$format, ["link", [["node", "$help_funcs_num"]], ["Numeric Functions"], 'do_link]>], #[['links, #[["Numeric Functions", "$help_funcs_num"]]]]]>; var $help_node index = $help_index_driver; -var $help_node links = #[]; +var $help_node links = #[["Numeric Functions", $help_funcs_num]]; var $help_node nolist = 0; var $root created_on = 853698066; var $root flags = ['variables, 'methods, 'code, 'core]; diff -rwu src-3.0a7/help_coldc_types_lists.cdc ColdCore-3.0a9.02/src/help_coldc_types_lists.cdc --- src-3.0a7/help_coldc_types_lists.cdc Sat Aug 9 19:09:35 1997 +++ ColdCore-3.0a9.02/src/help_coldc_types_lists.cdc Tue Aug 19 12:15:23 1997 @@ -2,9 +2,9 @@ new object $help_coldc_types_lists: $help_coldc_types; var $has_name name = ['prop, "List", "List"]; -var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "A ", <$format, ["i", [], ["list"], 'do_i]>, " is an ordered grouping of data. The data contained within a list can be of any type, and does not have to be the same type througout the list. Lists are useful for grouping different data elements together. A list is logically true if it contains one or more elements, and is logically false if it is empty. A list is constructed by enclosing a comma-separated series of data elements within square brackets. For example both of the following are both valid lists: ", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["[1, 2, 3] ", <$format, ["br", [], [], 'do_br]>, "[1, [\"foo\", 'bar], $sys]"], 'do_dfn]>], #[['this, $help_coldc_types_lists]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "A ", <$format, ["i", [], ["list"], 'do_i]>, " is an ordered grouping of data. The data contained within a list can be of any type, and does not have to be the same type througout the list. Lists are useful for grouping different data elements together. A list is logically true if it contains one or more elements, and is logically false if it is empty. A list is constructed by enclosing a comma-separated series of data elements within square brackets. For example both of the following are both valid lists:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["[1, 2, 3] ", <$format, ["br", [], [], 'do_br]>, "[1, [\"foo\", 'bar], $sys]"], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "See Also: ", <$format, ["link", [["node", "$help_funcs_list"]], ["List Functions"], 'do_link]>], #[['links, #[["List Functions", "$help_funcs_list"]]]]]>; var $help_node index = $help_index_driver; -var $help_node links = #[]; +var $help_node links = #[["List Functions", $help_funcs_list]]; var $help_node nolist = 0; var $root created_on = 853698066; var $root flags = ['variables, 'methods, 'code, 'core]; diff -rwu src-3.0a7/help_coldc_types_strings.cdc ColdCore-3.0a9.02/src/help_coldc_types_strings.cdc --- src-3.0a7/help_coldc_types_strings.cdc Sat Aug 9 19:09:35 1997 +++ ColdCore-3.0a9.02/src/help_coldc_types_strings.cdc Tue Aug 19 12:15:23 1997 @@ -2,9 +2,9 @@ new object $help_coldc_types_strings: $help_coldc_types; var $has_name name = ['prop, "String", "String"]; -var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "A ", <$format, ["i", [], ["string"], 'do_i]>, " is a sequence of printable characters. A string is logically true if it is not empty. A string is denoted in ColdC by enclosing the printable characters within double quote characters (", <$format, ["tt", [], ["\""], 'do_tt]>, "). To include a double quote inside a string precede it with a backslash. Any other occurance of a backslash in a string has no special meaning. The following are some examples of strings: ", <$format, ["dfn", [], [<$format, ["quote", [], ["\n\"foo\"\n\"\\\"foo\\\" is a metasyntactic variable.\"\n\"The backslash (`\') is a much-abused character in many languages.\""], 'do_quote]>], 'do_dfn]>], #[['this, $help_coldc_types_strings]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "A ", <$format, ["i", [], ["string"], 'do_i]>, " is a sequence of printable characters. A string is logically true if it is not empty. A string is denoted in ColdC by enclosing the printable characters within double quote characters (", <$format, ["tt", [], ["\""], 'do_tt]>, "). To include a double quote inside a string precede it with a backslash. Any other occurance of a backslash in a string has no special meaning. The following are some examples of strings: ", <$format, ["dfn", [], [<$format, ["quote", [], ["\n\"foo\"\n\"\\\"foo\\\" is a metasyntactic variable.\"\n\"The backslash (`\') is a much-abused character in many languages.\""], 'do_quote]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "See Also: ", <$format, ["link", [["node", "$help_funcs_str"]], ["String Functions"], 'do_link]>], #[['links, #[["String Functions", "$help_funcs_str"]]]]]>; var $help_node index = $help_index_driver; -var $help_node links = #[]; +var $help_node links = #[["String Functions", $help_funcs_str]]; var $help_node nolist = 0; var $root created_on = 853698066; var $root flags = ['variables, 'methods, 'code, 'core]; diff -rwu src-3.0a7/help_coldcore.cdc ColdCore-3.0a9.02/src/help_coldcore.cdc --- src-3.0a7/help_coldcore.cdc Sat Aug 9 19:09:34 1997 +++ ColdCore-3.0a9.02/src/help_coldcore.cdc Tue Aug 19 12:15:21 1997 @@ -2,17 +2,15 @@ new object $help_coldcore: $help_node; var $has_name name = ['prop, "Cold Help System", "Cold Help System"]; -var $help_node body = <$ctext_frob, [[<$format, ["quote", [], ["\n ___ _ _ _ _ _ ___ _\n / __|___| |__| | | || |___| |_ __ / __|_ _ __| |_ ___ _ __\n | (__/ _ \ / _` | | __ / -_) | '_ \ \__ \ || (_-< _/ -_) ' \ \n \___\___/_\__,_| |_||_\___|_| .__/ |___/\_, /__/\__\___|_|_|_|\n |_| |__/\n"], 'do_quote]>, <$format, ["p", [], [], 'do_p]>, "Welcome to ", <$generator, ["servname", [], [], 'gen_servname]>, ". This is a hypertext help system. If you are on an interactive login you can type ", <$format, ["tt", [], ["@help help"], 'do_tt]>, " for help on how to use this help system. Following is a list of Launch Points to the help system:", <$format, ["p", [], [], 'do_p]>, <$format, ["dl", [["columned", 1]], [<$format, ["dt", [], [<$format, ["b", [], [<$format, ["link", [["node", "$help_help"]], ["Help"], 'do_link]>], 'do_b]>], 'do_dt]>, <$format, ["dd", [], ["How to use this help system"], 'do_dd]>, <$format, ["dt", [], [<$format, ["b", [], [<$format, ["link", [["node", "$help_general"]], ["General"], 'do_link]>], 'do_b]>], 'do_dt]>, <$format, ["dd", [], ["General Information"], 'do_dd]>, <$format, ["dt", [], [<$format, ["b", [], [<$format, ["link", [["node", "$help_building"]], ["Building"], 'do_link]>], 'do_b]>], 'do_dt]>, <$format, ["dd", [], ["Extending your Environment"], 'do_dd]>, <$format, ["dt", [], [<$format, ["b", [], [<$format, ["link", [["node", "$help_prog"]], ["Programming"], 'do_link]>], 'do_b]>], 'do_dt]>, <$format, ["dd", [], ["Topics about programming"], 'do_dd]>, <$format, ["dt", [], [<$format, ["b", [], [<$format, ["link", [["node", "$help_reference"]], ["Reference"], 'do_link]>], 'do_b]>], 'do_dt]>, <$format, ["dd", [], ["Core Reference Information"], 'do_dd]>, <$format, ["dt", [], [<$format, ["b", [], [<$format, ["link", [["node", "$help_updates"]], ["Updates"], 'do_link]>], 'do_b]>], 'do_dt]>, <$format, ["dd", [], ["ChangeLog for this system"], 'do_dd]>], 'do_dl]>], #[['this, $help_coldcore]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["img", [["plain", <$format, ["quote", [], ["\n ___ _ _ _ _ _ ___ _\n / __|___| |__| | | || |___| |_ __ / __|_ _ __| |_ ___ _ __\n | (__/ _ \ / _` | | __ / -_) | '_ \ \__ \ || (_-< _/ -_) ' \ \n \___\___/_\__,_| |_||_\___|_| .__/ |___/\_, /__/\__\___|_|_|_|\n |_| |__/\n"], 'do_quote]>], ["src", "http://www.cold.org/images/coldcore/cold-help.jpg"]], [], 'do_img]>, <$format, ["p", [], [], 'do_p]>, "Welcome to ", <$generator, ["servname", [], [], 'gen_servname]>, ". This is a hypertext help system. If you are on an interactive login you can type ", <$format, ["tt", [], ["@help help"], 'do_tt]>, " for help on how to use this help system. Following is a list of Launch Points to the help system:", <$format, ["p", [], [], 'do_p]>, <$format, ["dl", [["columned", 1]], [<$format, ["dt", [], [<$format, ["b", [], [<$format, ["link", [["node", "$help_help"]], ["Help"], 'do_link]>], 'do_b]>], 'do_dt]>, <$format, ["dd", [], ["How to use this help system"], 'do_dd]>, <$format, ["dt", [], [<$format, ["b", [], [<$format, ["link", [["node", "$help_general"]], ["General"], 'do_link]>], 'do_b]>], 'do_dt]>, <$format, ["dd", [], ["General Information"], 'do_dd]>, <$format, ["dt", [], [<$format, ["b", [], [<$format, ["link", [["node", "$help_building"]], ["Building"], 'do_link]>], 'do_b]>], 'do_dt]>, <$format, ["dd", [], ["Extending your Environment"], 'do_dd]>, <$format, ["dt", [], [<$format, ["b", [], [<$format, ["link", [["node", "$help_prog"]], ["Programming"], 'do_link]>], 'do_b]>], 'do_dt]>, <$format, ["dd", [], ["Topics about programming"], 'do_dd]>, <$format, ["dt", [], [<$format, ["b", [], [<$format, ["link", [["node", "$help_admin"]], ["Administration"], 'do_link]>], 'do_b]>], 'do_dt]>, <$format, ["dd", [], ["ColdCore Administration"], 'do_dd]>, <$format, ["dt", [], [<$format, ["b", [], [<$format, ["link", [["node", "$help_reference"]], ["Reference"], 'do_link]>], 'do_b]>], 'do_dt]>, <$format, ["dd", [], ["Core Reference Information"], 'do_dd]>, <$format, ["dt", [], [<$format, ["b", [], [<$format, ["link", [["node", "$help_updates"]], ["Updates"], 'do_link]>], 'do_b]>], 'do_dt]>, <$format, ["dd", [], ["ChangeLog for this system"], 'do_dd]>], 'do_dl]>], #[['links, #[["Help", "$help_help"], ["General", "$help_general"], ["Building", "$help_building"], ["Programming", "$help_prog"], ["Administration", "$help_admin"], ["Reference", "$help_reference"], ["Updates", "$help_updates"]]]]]>; var $help_node group = 1; var $help_node index = $help_index_core; -var $help_node links = #[["Help", $help_help], ["General", $help_general], ["Building", $help_building], ["Programming", $help_prog], ["Reference", $help_reference], ["Updates", $help_updates]]; +var $help_node links = #[["Help", $help_help], ["General", $help_general], ["Building", $help_building], ["Programming", $help_prog], ["Administration", $help_admin], ["Reference", $help_reference], ["Updates", $help_updates]]; var $help_node nolist = 0; *var $root child_index = '-' help_coldcore.cdc var $root created_on = 796268969; var $root flags = ['methods, 'code, 'variables, 'core]; var $root inited = 1; var $root managed = [$help_coldcore]; var $root manager = $help_coldcore; -var $root owned = [$help_coldcore]; diff -rwu src-3.0a7/help_commands.cdc ColdCore-3.0a9.02/src/help_commands.cdc --- src-3.0a7/help_commands.cdc Sat Aug 9 19:09:34 1997 +++ ColdCore-3.0a9.02/src/help_commands.cdc Tue Aug 19 12:15:22 1997 @@ -6,13 +6,11 @@ var $help_node index = $help_index_core; var $help_node links = #[["VR vs Non-VR", $help_commands_vr], ["Types", $help_commands_types], ["Matching", $help_commands_matching], ["Enhanced", $help_commands_enhanced], ["All Commands", $help_index_cmds], ["Programming", $help_prog_commands]]; var $help_node nolist = 0; *var $root child_index = '-' help_commands.cdc var $root created_on = 796268969; var $root fertile = 1; var $root flags = ['methods, 'code, 'fertile, 'variables, 'core]; var $root inited = 1; var $root managed = [$help_commands]; var $root manager = $help_commands; -var $root owned = [$help_commands]; diff -rwu src-3.0a7/help_commands_enhanced.cdc ColdCore-3.0a9.02/src/help_commands_enhanced.cdc --- src-3.0a7/help_commands_enhanced.cdc Sat Aug 9 19:09:34 1997 +++ ColdCore-3.0a9.02/src/help_commands_enhanced.cdc Tue Aug 19 12:15:22 1997 @@ -10,6 +10,5 @@ var $root inited = 1; var $root managed = [$help_commands_enhanced]; var $root manager = $help_commands_enhanced; -var $root owned = [$help_commands_enhanced]; diff -rwu src-3.0a7/help_commands_matching.cdc ColdCore-3.0a9.02/src/help_commands_matching.cdc --- src-3.0a7/help_commands_matching.cdc Sat Aug 9 19:09:34 1997 +++ ColdCore-3.0a9.02/src/help_commands_matching.cdc Tue Aug 19 12:15:22 1997 @@ -11,6 +11,5 @@ var $root inited = 1; var $root managed = [$help_commands_matching]; var $root manager = $help_commands_matching; -var $root owned = [$help_commands_matching]; diff -rwu src-3.0a7/help_commands_types.cdc ColdCore-3.0a9.02/src/help_commands_types.cdc --- src-3.0a7/help_commands_types.cdc Sat Aug 9 19:09:34 1997 +++ ColdCore-3.0a9.02/src/help_commands_types.cdc Tue Aug 19 12:15:22 1997 @@ -10,6 +10,5 @@ var $root inited = 1; var $root managed = [$help_commands_types]; var $root manager = $help_commands_types; -var $root owned = [$help_commands_types]; diff -rwu src-3.0a7/help_commands_vr.cdc ColdCore-3.0a9.02/src/help_commands_vr.cdc --- src-3.0a7/help_commands_vr.cdc Sat Aug 9 19:09:34 1997 +++ ColdCore-3.0a9.02/src/help_commands_vr.cdc Tue Aug 19 12:15:22 1997 @@ -11,6 +11,5 @@ var $root inited = 1; var $root managed = [$help_commands_vr]; var $root manager = $help_commands_vr; -var $root owned = [$help_commands_vr]; diff -rwu src-3.0a7/help_conventions.cdc ColdCore-3.0a9.02/src/help_conventions.cdc --- src-3.0a7/help_conventions.cdc Sat Aug 9 19:09:34 1997 +++ ColdCore-3.0a9.02/src/help_conventions.cdc Tue Aug 19 12:15:22 1997 @@ -11,6 +11,5 @@ var $root inited = 1; var $root managed = [$help_conventions]; var $root manager = $help_conventions; -var $root owned = [$help_conventions]; diff -rwu src-3.0a7/help_core.cdc ColdCore-3.0a9.02/src/help_core.cdc --- src-3.0a7/help_core.cdc Sat Aug 9 19:09:44 1997 +++ ColdCore-3.0a9.02/src/help_core.cdc Tue Aug 19 12:15:31 1997 @@ -5,12 +5,23 @@ var $help_node body = <$ctext_frob, [["This node isn't written yet"], #[['this, $help_core]]]>; var $help_node holder = 1; var $help_node links = #[]; -var $help_node nolist = 0; *var $root child_index = '-' help_core.cdc +var $help_node nolist = 1; var $root created_on = 848184185; var $root flags = ['variables, 'methods, 'code, 'core]; var $root inited = 1; var $root managed = [$help_core]; var $root manager = $help_core; + +public method .node_name() { + var name; + + // just reprog this for now, later we should have a 'top of tree' setting + if (this() == definer()) + return ""; + name = ((.parents())[1]).node_name(); + if (!name) + return (.name()).word(1, "|"); + return (name + ": ") + ((.name()).word(1, "|")); +}; diff -rwu src-3.0a7/help_environment.cdc ColdCore-3.0a9.02/src/help_environment.cdc --- src-3.0a7/help_environment.cdc Sat Aug 9 19:09:34 1997 +++ ColdCore-3.0a9.02/src/help_environment.cdc Tue Aug 19 12:15:22 1997 @@ -2,7 +2,7 @@ new object $help_environment: $help_general; var $has_name name = ['prop, "Environment", "Environment"]; -var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "Your environment is where the system tries to find things, when you name something. It does this by first checking everything in your contents, and everything in the location you are in. ", <$format, ["np", [], [], 'do_np]>, "The system will also check your recent context. The server records the last object you named, as well as all of the last objects you named (with a gender). You can list your recent context with the command @context, receiving a result similar to:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], [<$format, ["quote", [], ["Last thing: the Magazine Rack\nLast it: the Magazine Rack \nLast her: Squeak the lemming\nLast him: Miro"], 'do_quote]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "When the system is attempting to find a named object, it first checks in your context. This allows you to name objects by their gender (if you remember it correctly). For instance:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], [<$format, ["quote", [], ["> get bottle\nYou take the bottle.\n> drop it\nYou drop the bottle."], 'do_quote]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Furthermore, if you do not name an object, it will return the last object you named:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], [<$format, ["quote", [], ["> get bottle\nYou take the bottle.\n> drop\nYou drop the bottle."], 'do_quote]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "There are also two words known by the system. The first is ", <$format, ["tt", [], ["me"], 'do_tt]>, ", which is always you. The second is ", <$format, ["tt", [], ["here"], 'do_tt]>, ", which is always your location. ", <$format, ["np", [], [], 'do_np]>, "If you are having a hard time remembering an items object name, or typing it's full name, you can remember it as a shorter name, with the command ", <$format, ["link", [["node", "$help_cmd_remember"]], ["@remember"], 'do_link]>, "."], #[['this, $help_environment]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "Your environment is where the system tries to find things, when you name something. It does this by first checking everything in your contents, and everything in the location you are in. ", <$format, ["subj", [["level", "2"]], ["Context"], 'do_subj]>, <$format, ["p", [], [], 'do_p]>, "The system will also check your recent context. The server records the last object you named, as well as all of the last objects you named (with a gender). You can list your recent context with the command @context, receiving a result similar to:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], [<$format, ["quote", [], ["Last thing: the Magazine Rack\nLast it: the Magazine Rack \nLast her: Squeak the lemming\nLast him: Miro"], 'do_quote]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "When the system is attempting to find a named object, it first checks in your context. This allows you to name objects by their gender (if you remember it correctly). For instance:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], [<$format, ["quote", [], ["> get bottle\nYou take the bottle.\n> drop it\nYou drop the bottle."], 'do_quote]>], 'do_dfn]>, " ", <$format, ["subj", [["level", "2"]], ["Last Object"], 'do_subj]>, <$format, ["p", [], [], 'do_p]>, "If you do not name an object, it will return the last object you named:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], [<$format, ["quote", [], ["> get bottle\nYou take the bottle.\n> drop\nYou drop the bottle."], 'do_quote]>], 'do_dfn]>, " ", <$format, ["subj", [["level", "2"]], ["Multiple Matches"], 'do_subj]>, <$format, ["p", [], [], 'do_p]>, "In the case where multiple objects would match a single name, you can use ordinal references, such as ", <$format, ["tt", [], ["the 3rd bottle"], 'do_tt]>, " or ", <$format, ["tt", [], ["the second key"], 'do_tt]>, ". ", <$format, ["subj", [["level", "2"]], ["Keywords"], 'do_subj]>, <$format, ["p", [], [], 'do_p]>, "There are also two words known by the system. The first is ", <$format, ["tt", [], ["me"], 'do_tt]>, ", which is always you. The second is ", <$format, ["tt", [], ["here"], 'do_tt]>, ", which is always your location. ", <$format, ["subj", [["level", "2"]], ["Remembering"], 'do_subj]>, <$format, ["p", [], [], 'do_p]>, "If you are having a hard time remembering an items object name, or typing it's full name, you can remember it as a shorter name, with the command ", <$format, ["link", [["node", "$help_cmd_remember"]], ["@remember"], 'do_link]>, "."], #[['links, #[["@remember", "$help_cmd_remember"]]]]]>; var $help_node index = $help_index_core; var $help_node links = #[["@remember", $help_cmd_remember]]; var $help_node nolist = 0; @@ -11,6 +11,5 @@ var $root inited = 1; var $root managed = [$help_environment]; var $root manager = $help_environment; -var $root owned = [$help_environment]; diff -rwu src-3.0a7/help_func_ancestors.cdc ColdCore-3.0a9.02/src/help_func_ancestors.cdc --- src-3.0a7/help_func_ancestors.cdc Sat Aug 9 19:09:38 1997 +++ ColdCore-3.0a9.02/src/help_func_ancestors.cdc Tue Aug 19 12:15:26 1997 @@ -2,7 +2,7 @@ new object $help_func_ancestors: $help_funcs_obj; var $has_name name = ['prop, "ancestors()", "ancestors()"]; -var $help_node body = <$ctext_frob, [[<$format, ["dfn", [], [<$format, ["tt", [], [<$format, ["i", [], ["LIST"], 'do_i]>, " ancestors()"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This function returns a list of the objnums of the ancestors of the current object, in the order that they would normally be searched for methods. The objnums of the current object will be the first element of the list."], #[['this, $help_func_ancestors]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["dfn", [], [<$format, ["tt", [], [<$format, ["i", [], ["LIST"], 'do_i]>, " ancestors([", <$format, ["i", [], ["SYMBOL order"], 'do_i]>, "])"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This function returns a list of the ancestors of the current object. The order of the list is specified by sending either ", <$format, ["tt", [], ["'depth"], 'do_tt]>, " or ", <$format, ["tt", [], ["'breadth"], 'do_tt]>, " (for a depth-first or breadth-first order, respectively). If no order is specified, the order is depth-first (similar to methods). The current object is always the first element in this list. The heirarchy:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], [<$format, ["quote", [], [" $root\n / \\\\\n$obj_a |\n | |\n$obj_b $obj_c\n \\\ /\n $obj_d"], 'do_quote]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Is used in the following examples, as called from ", <$format, ["tt", [], ["$obj_d"], 'do_tt]>, ":", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["ancestors()", <$format, ["br", [], [], 'do_br]>, "=> [$obj_d, $obj_b, $obj_a, $obj_c, $root]"], 'do_dfn]>, " ", <$format, ["dfn", [], ["ancestors('breadth)", <$format, ["br", [], [], 'do_br]>, "=> [$obj_d, $obj_b, $obj_c, $obj_a, $root]"], 'do_dfn]>], #[]]>; var $help_node index = $help_index_function; var $help_node links = #[]; var $help_node nolist = 0; diff -rwu src-3.0a7/help_func_buf_to_str.cdc ColdCore-3.0a9.02/src/help_func_buf_to_str.cdc --- src-3.0a7/help_func_buf_to_str.cdc Sat Aug 9 19:09:42 1997 +++ ColdCore-3.0a9.02/src/help_func_buf_to_str.cdc Tue Aug 19 12:15:29 1997 @@ -2,9 +2,10 @@ new object $help_func_buf_to_str: $help_funcs_buf; var $has_name name = ['prop, "buf_to_str()", "buf_to_str()"]; -var $help_node body = <$ctext_frob, [[<$format, ["dfn", [], [<$format, ["tt", [], [<$format, ["i", [], ["STRING"], 'do_i]>, " buf_to_str(", <$format, ["i", [], ["BUFFER buf"], 'do_i]>, ")"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This function converts the entire buffer specified by ", <$format, ["i", [], ["buf"], 'do_i]>, " to a string. Newlines are converted to ", <$format, ["tt", [], ["\"\\\n\""], 'do_tt]>, ". To just get the first string in the buffer (seperated by a newline) do: ", <$format, ["dfn", [], [<$format, ["quote", [], ["\ni = bufidx(buffer, 10);\nstr = buf_to_str(subbuf(buffer, 1, i - 1));\nbuffer = subbuf(buffer, i + 1);"], 'do_quote]>], 'do_dfn]>], #[['this, $help_func_buf_to_str]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["dfn", [], [<$format, ["tt", [], [<$format, ["i", [], ["BUFFER"], 'do_i]>, " str_to_buf(", <$format, ["i", [], ["BUFFER buf"], 'do_i]>, "[, ", <$format, ["i", [], ["BUFFER sep"], 'do_i]>, "])"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This function converts the buffer specified by buf to a list of printable strings, with a final buffer element. Each string is a line in the buffer, terminated by a newline. If any characters remain unterminted, they are placed in the last element as a buffer. The last element will always be a buffer, regarless of whether any characters are in it. ", <$format, ["np", [], [], 'do_np]>, "buf_to_strings() will alternatively split the strings based off the optional second argument. Note: it is not necessary to specify both a carriage return and a newline as the seperator--if both exist--as the newline will be sufficient to break the string, and the carriage return will be discarded as an unprintable character in the string."], #[]]>; var $help_node index = $help_index_function; var $help_node links = #[]; +var $help_node linnverts = 0; var $help_node nolist = 0; var $root created_on = 855384455; var $root flags = ['variables, 'methods, 'code, 'core]; diff -rwu src-3.0a7/help_func_class.cdc ColdCore-3.0a9.02/src/help_func_class.cdc --- src-3.0a7/help_func_class.cdc Sat Aug 9 19:09:41 1997 +++ ColdCore-3.0a9.02/src/help_func_class.cdc Tue Aug 19 12:15:29 1997 @@ -1,10 +1,10 @@ new object $help_func_class: $help_funcs_data; -var $has_name name = ['prop, "class()", "class()"]; -var $help_node body = <$ctext_frob, [[<$format, ["dfn", [], [<$format, ["tt", [], [<$format, ["i", [], ["OBJNUM"], 'do_i]>, " class(", <$format, ["i", [], ["FROB frob"], 'do_i]>, ")"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This function returns the class of a frob. See ", <$format, ["link", [["node", "$help_coldc_types"]], ["Frobs"], 'do_link]>, " for more details on Frobs."], #[['this, $help_func_class]]]>; +var $has_name name = ['prop, "frob_class()", "frob_class()"]; +var $help_node body = <$ctext_frob, [[<$format, ["dfn", [], [<$format, ["tt", [], [<$format, ["i", [], ["OBJNUM"], 'do_i]>, " frob_class(", <$format, ["i", [], ["FROB frob"], 'do_i]>, ")"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This function returns the class of a frob. See ", <$format, ["link", [["node", "$help_coldc_types_frobs"]], ["Frobs"], 'do_link]>, " for more details on Frobs."], #[['links, #[["Frobs", "$help_coldc_types_frobs"]]]]]>; var $help_node index = $help_index_function; -var $help_node links = #[["Frobs", $help_coldc_types]]; +var $help_node links = #[["Frobs", $help_coldc_types_frobs]]; var $help_node nolist = 0; var $root created_on = 855384455; var $root flags = ['variables, 'methods, 'code, 'core]; diff -rwu src-3.0a7/help_func_dict_union.cdc ColdCore-3.0a9.02/src/help_func_dict_union.cdc --- src-3.0a7/help_func_dict_union.cdc Sat Aug 9 19:09:42 1997 +++ ColdCore-3.0a9.02/src/help_func_dict_union.cdc Tue Aug 19 12:15:30 1997 @@ -2,7 +2,7 @@ new object $help_func_dict_union: $help_funcs_dict; var $has_name name = ['prop, "dict_union()", "dict_union()"]; -var $help_node body = <$ctext_frob, [[<$format, ["dfn", [], [<$format, ["tt", [], [<$format, ["i", [], ["DICTIONARY"], 'do_i]>, " dict_union(", <$format, ["i", [], ["DICTIONARY dict1"], 'do_i]>, ", ", <$format, ["i", [], ["DICTIONARY dict2"], 'do_i]>, ")"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This function mergest the two dictionaries by adding each association from ", <$format, ["i", [], ["dict2"], 'do_i]>, " into ", <$format, ["i", [], ["dict1"], 'do_i]>, ". In the case of conflicts, the values in ", <$format, ["i", [], ["dict2"], 'do_i]>, " take precedence. Example:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["dict_union(#[[\"foo\", 1], ['baz, 3]], #[[\"foo\", 2], [\"bar\", 2]])", <$format, ["br", [], [], 'do_br]>, "=> #[[\"foo\", 2], ['baz, 3], [\"bar\", 2]]"], 'do_dfn]>], #[['this, $help_func_dict_union]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["dfn", [], [<$format, ["tt", [], [<$format, ["i", [], ["DICTIONARY"], 'do_i]>, " dict_union(", <$format, ["i", [], ["DICTIONARY dict1"], 'do_i]>, ", ", <$format, ["i", [], ["DICTIONARY dict2"], 'do_i]>, ")"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This function mergest the two dictionaries by adding each association from ", <$format, ["i", [], ["dict2"], 'do_i]>, " into ", <$format, ["i", [], ["dict1"], 'do_i]>, ". In the case of conflicts, the values in ", <$format, ["i", [], ["dict1"], 'do_i]>, " take precedence. Example:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["dict_union(#[[\"foo\", 1], ['baz, 3]], #[[\"foo\", 2], [\"bar\", 2]])", <$format, ["br", [], [], 'do_br]>, "=> #[[\"foo\", 2], ['baz, 3], [\"bar\", 2]]"], 'do_dfn]>], #[]]>; var $help_node index = $help_index_function; var $help_node links = #[]; var $help_node nolist = 0; diff -rwu src-3.0a7/help_func_regexp.cdc ColdCore-3.0a9.02/src/help_func_regexp.cdc --- src-3.0a7/help_func_regexp.cdc Sat Aug 9 19:09:43 1997 +++ ColdCore-3.0a9.02/src/help_func_regexp.cdc Tue Aug 19 12:15:31 1997 @@ -2,7 +2,7 @@ new object $help_func_regexp: $help_funcs_str; var $has_name name = ['prop, "regexp()", "regexp()"]; -var $help_node body = <$ctext_frob, [[<$format, ["dfn", [], [<$format, ["tt", [], [<$format, ["i", [], ["LIST"], 'do_i]>, " regexp(", <$format, ["i", [], ["STRING str"], 'do_i]>, ", ", <$format, ["i", [], ["STRING regexp"], 'do_i]>, "[, ", <$format, ["i", [], ["INTEGER cs"], 'do_i]>, "])"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This function matches the regular expression argument ", <$format, ["i", [], ["regexp"], 'do_i]>, " against the argument ", <$format, ["i", [], ["str"], 'do_i]>, ". If ", <$format, ["i", [], ["cs"], 'do_i]>, " is specified and is true, the match is case-sensitive; otherwise, it is case-insensitive. If the match succeeds, ", <$format, ["tt", [], ["regexp()"], 'do_tt]>, " returns a list of the matches in ", <$format, ["i", [], ["string"], 'do_i]>, ", or zero if it did not match. If ", <$format, ["i", [], ["regexp"], 'do_i]>, " is not a valid regular expression the error ", <$format, ["tt", [], ["~regexp"], 'do_tt]>, " is thrown. ", <$format, ["np", [], [], 'do_np]>, "For more information on Regular Expressions see the section ", <$format, ["link", [["node", "$help_coldc_regexp"]], ["ColdC Regular Expressions"], 'do_link]>, ". The function ", <$format, ["tt", [], [<$format, ["link", [["node", "$help_func_match_regexp"]], ["match_regexp()"], 'do_link]>], 'do_tt]>, " is similar, and better when all that is desired is whether the regexp matches or not. Examples:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["regexp(\"bar\", \"fooBAR\")", <$format, ["br", [], [], 'do_br]>, "=> [\"BAR\"]"], 'do_dfn]>, " ", <$format, ["dfn", [], ["regexp(\"^([^ ]+) says, '(.*)'$\", \"Greg says, 'Hello.'\")", <$format, ["br", [], [], 'do_br]>, "=> [\"Greg\", \"Hello.\"]"], 'do_dfn]>, " ", <$format, ["dfn", [], ["regexp(\"[0-9]+\", \" 300 100 200 \")", <$format, ["br", [], [], 'do_br]>, "=> [\"300\"]"], 'do_dfn]>, " ", <$format, ["dfn", [], ["regexp(\"foo\", \"bar\")", <$format, ["br", [], [], 'do_br]>, "=> 0"], 'do_dfn]>, " ", <$format, ["dfn", [], ["regexp(\"foo\", \"Foo\", 1)", <$format, ["br", [], [], 'do_br]>, "=> 0"], 'do_dfn]>], #[['this, $help_func_regexp]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["dfn", [], [<$format, ["tt", [], [<$format, ["i", [], ["LIST"], 'do_i]>, " regexp(", <$format, ["i", [], ["STRING str"], 'do_i]>, ", ", <$format, ["i", [], ["STRING regexp"], 'do_i]>, "[, ", <$format, ["i", [], ["INTEGER cs"], 'do_i]>, "])"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This function matches the regular expression argument ", <$format, ["i", [], ["regexp"], 'do_i]>, " against the argument ", <$format, ["i", [], ["str"], 'do_i]>, ". If ", <$format, ["i", [], ["cs"], 'do_i]>, " is specified and is true, the match is case-sensitive; otherwise, it is case-insensitive. If the match succeeds, ", <$format, ["tt", [], ["regexp()"], 'do_tt]>, " returns a list of the matches in ", <$format, ["i", [], ["string"], 'do_i]>, ", or zero if it did not match. If ", <$format, ["i", [], ["regexp"], 'do_i]>, " is not a valid regular expression the error ", <$format, ["tt", [], ["~regexp"], 'do_tt]>, " is thrown. ", <$format, ["np", [], [], 'do_np]>, "For more information on Regular Expressions see the section ", <$format, ["link", [["node", "$help_coldc_regexp"]], ["ColdC Regular Expressions"], 'do_link]>, ". The function ", <$format, ["tt", [], [<$format, ["link", [["node", "$help_func_match_regexp"]], ["match_regexp()"], 'do_link]>], 'do_tt]>, " is similar, and better when all that is desired is whether the regexp matches or not. Examples:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["regexp(\"fooBAR\", \"bar\")", <$format, ["br", [], [], 'do_br]>, "=> [\"BAR\"]"], 'do_dfn]>, " ", <$format, ["dfn", [], ["regexp(\"Greg says, 'Hello.'\", \"^([^ ]+) says, '(.*)'$\")", <$format, ["br", [], [], 'do_br]>, "=> [\"Greg\", \"Hello.\"]"], 'do_dfn]>, " ", <$format, ["dfn", [], ["regexp(\" 300 100 200 \", \"[0-9]+\")", <$format, ["br", [], [], 'do_br]>, "=> [\"300\"]"], 'do_dfn]>, " ", <$format, ["dfn", [], ["regexp(\"bar\", \"foo\")", <$format, ["br", [], [], 'do_br]>, "=> 0"], 'do_dfn]>, " ", <$format, ["dfn", [], ["regexp(\"Foo\", \"foo\", 1)", <$format, ["br", [], [], 'do_br]>, "=> 0"], 'do_dfn]>], #[['links, #[["ColdC Regular Expressions", "$help_coldc_regexp"], ["match_regexp()", "$help_func_match_regexp"]]]]]>; var $help_node index = $help_index_function; var $help_node links = #[["ColdC Regular Expressions", $help_coldc_regexp], ["match_regexp()", $help_func_match_regexp]]; var $help_node nolist = 0; diff -rwu src-3.0a7/help_func_set_heartbeat.cdc ColdCore-3.0a9.02/src/help_func_set_heartbeat.cdc --- src-3.0a7/help_func_set_heartbeat.cdc Sat Aug 9 19:09:39 1997 +++ ColdCore-3.0a9.02/src/help_func_set_heartbeat.cdc Tue Aug 19 12:15:27 1997 @@ -2,7 +2,7 @@ new object $help_func_set_heartbeat: $help_funcs_sys; var $has_name name = ['prop, "set_heartbeat()", "set_heartbeat()"]; -var $help_node body = <$ctext_frob, [[<$format, ["dfn", [], [<$format, ["tt", [], [<$format, ["i", [], ["INTEGER"], 'do_i]>, " set_heartbeat(", <$format, ["i", [], ["INTEGER interval"], 'do_i]>, ")"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This function sets the peridic heartbeat for the database to the argument ", <$format, ["i", [], ["interval"], 'do_i]>, ", where ", <$format, ["i", [], ["interval"], 'do_i]>, " is in the delay in seconds. The heartbeat can be disabled by setting the interval to zero or a negative number. The default heartbeat interval is five seconds. The heartbeat is sent by the driver calling the method ", <$format, ["tt", [], ["$sys.heartbeat()"], 'do_tt]>, "."], #[['this, $help_func_set_heartbeat]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["dfn", [], [<$format, ["tt", [], [<$format, ["i", [], ["INTEGER"], 'do_i]>, " set_heartbeat(", <$format, ["i", [], ["INTEGER interval"], 'do_i]>, ")"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This function sets the periodic global heartbeat for the database to the argument ", <$format, ["i", [], ["interval"], 'do_i]>, ", where ", <$format, ["i", [], ["interval"], 'do_i]>, " is in the delay in seconds. The heartbeat can be disabled by setting the interval to zero or a negative number. The default heartbeat interval is five seconds. The heartbeat is sent by the driver calling the method ", <$format, ["tt", [], ["$sys.heartbeat()"], 'do_tt]>, "."], #[]]>; var $help_node index = $help_index_function; var $help_node links = #[]; var $help_node nolist = 0; diff -rwu src-3.0a7/help_funcs_obj.cdc ColdCore-3.0a9.02/src/help_funcs_obj.cdc --- src-3.0a7/help_funcs_obj.cdc Sat Aug 9 19:09:38 1997 +++ ColdCore-3.0a9.02/src/help_funcs_obj.cdc Tue Aug 19 12:15:26 1997 @@ -2,10 +2,9 @@ new object $help_funcs_obj: $help_coldc_func; var $has_name name = ['prop, "Object", "Object"]; -var $help_node body = <$ctext_frob, [[<$format, ["table", [["cols", "24%,24%,24%,24%"]], [<$format, ["tr", [], [<$format, ["td", [], [<$format, ["link", [["node", "$help_func_ancestors"]], ["ancestors()"], 'do_link]>], 'do_td]>, <$format, ["td", [], [<$format, ["link", [["node", "$help_func_children"]], ["children()"], 'do_link]>], 'do_td]>, <$format, ["td", [], [<$format, ["link", [["node", "$help_func_chparents"]], ["chparents()"], 'do_link]>], 'do_td]>, <$format, ["td", [], [<$format, ["link", [["node", "$help_func_create"]], ["create()"], 'do_link]>], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["link", [["node", "$help_func_data"]], ["data()"], 'do_link]>], 'do_td]>, <$format, ["td", [], [<$format, ["link", [["node", "$help_func_del_objname"]], ["del_objname()"], 'do_link]>], 'do_td]>, <$format, ["td", [], [<$format, ["link", [["node", "$help_func_destroy"]], ["destroy()"], 'do_link]>], 'do_td]>, <$format, ["td", [], [<$format, ["link", [["node", "$help_func_has_ancestor"]], ["has_ancestor()"], 'do_link]>], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["link", [["node", "$help_func_lookup"]], ["lookup()"], 'do_link]>], 'do_td]>, <$format, ["td", [], [<$format, ["link", [["node", "$help_func_objname"]], ["objname()"], 'do_link]>], 'do_td]>, <$format, ["td", [], [<$format, ["link", [["node", "$help_func_objnum"]], ["objnum()"], 'do_link]>], 'do_td]>, <$format, ["td", [], [<$format, ["link", [["node", "$help_func_parents"]], ["parents()"], 'do_link]>], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["link", [["node", "$help_func_set_objname"]], ["set_objname()"], 'do_link]>], 'do_td]>, <$format, ["td", [], [], 'do_td]>, <$format, ["td", [], [], 'do_td]>, <$format, ["td", [], [], 'do_td]>], 'do_tr]>], 'do_table]>], #[['this, $help_funcs_obj]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["table", [["cols", "24%,24%,24%,24%"]], [<$format, ["tr", [], [<$format, ["td", [], [<$format, ["link", [["node", "$help_func_ancestors"]], ["ancestors()"], 'do_link]>], 'do_td]>, <$format, ["td", [], [<$format, ["link", [["node", "$help_func_children"]], ["children()"], 'do_link]>], 'do_td]>, <$format, ["td", [], [<$format, ["link", [["node", "$help_func_chparents"]], ["chparents()"], 'do_link]>], 'do_td]>, <$format, ["td", [], [<$format, ["link", [["node", "$help_func_create"]], ["create()"], 'do_link]>], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["link", [["node", "$help_func_data"]], ["data()"], 'do_link]>], 'do_td]>, <$format, ["td", [], [<$format, ["link", [["node", "$help_func_del_objname"]], ["del_objname()"], 'do_link]>], 'do_td]>, <$format, ["td", [], [<$format, ["link", [["node", "$help_func_destroy"]], ["destroy()"], 'do_link]>], 'do_td]>, <$format, ["td", [], [<$format, ["link", [["node", "$help_func_has_ancestor"]], ["has_ancestor()"], 'do_link]>], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["link", [["node", "$help_func_lookup"]], ["lookup()"], 'do_link]>], 'do_td]>, <$format, ["td", [], [<$format, ["link", [["node", "$help_func_objname"]], ["objname()"], 'do_link]>], 'do_td]>, <$format, ["td", [], [<$format, ["link", [["node", "$help_func_objnum"]], ["objnum()"], 'do_link]>], 'do_td]>, <$format, ["td", [], [<$format, ["link", [["node", "$help_func_parents"]], ["parents()"], 'do_link]>], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["link", [["node", "$help_func_set_objname"]], ["set_objname()"], 'do_link]>], 'do_td]>, <$format, ["td", [], [], 'do_td]>, <$format, ["td", [], [], 'do_td]>, <$format, ["td", [], [], 'do_td]>], 'do_tr]>], 'do_table]>], #[['links, #[["ancestors()", "$help_func_ancestors"], ["children()", "$help_func_children"], ["chparents()", "$help_func_chparents"], ["create()", "$help_func_create"], ["data()", "$help_func_data"], ["del_objname()", "$help_func_del_objname"], ["destroy()", "$help_func_destroy"], ["has_ancestor()", "$help_func_has_ancestor"], ["lookup()", "$help_func_lookup"], ["objname()", "$help_func_objname"], ["objnum()", "$help_func_objnum"], ["parents()", "$help_func_parents"], ["set_objname()", "$help_func_set_objname"]]]]]>; var $help_node links = #[["ancestors()", $help_func_ancestors], ["children()", $help_func_children], ["chparents()", $help_func_chparents], ["create()", $help_func_create], ["data()", $help_func_data], ["del_objname()", $help_func_del_objname], ["destroy()", $help_func_destroy], ["has_ancestor()", $help_func_has_ancestor], ["lookup()", $help_func_lookup], ["objname()", $help_func_objname], ["objnum()", $help_func_objnum], ["parents()", $help_func_parents], ["set_objname()", $help_func_set_objname]]; var $help_node nolist = 0; *var $root child_index = '-' help_funcs_obj.cdc var $root created_on = 855384021; var $root flags = ['variables, 'methods, 'code, 'core]; var $root inited = 1; diff -rwu src-3.0a7/help_general.cdc ColdCore-3.0a9.02/src/help_general.cdc --- src-3.0a7/help_general.cdc Sat Aug 9 19:09:34 1997 +++ ColdCore-3.0a9.02/src/help_general.cdc Tue Aug 19 12:15:22 1997 @@ -11,6 +11,5 @@ var $root inited = 1; var $root managed = [$help_general]; var $root manager = $help_general; -var $root owned = [$help_general]; diff -rwu src-3.0a7/help_heap.cdc ColdCore-3.0a9.02/src/help_heap.cdc --- src-3.0a7/help_heap.cdc Sat Aug 9 19:09:46 1997 +++ ColdCore-3.0a9.02/src/help_heap.cdc Tue Aug 19 12:15:34 1997 @@ -1,8 +1,9 @@ -new object $help_heap: $help_core; +new object $help_heap: $help_obj; var $has_name name = ['prop, "Heap", "Heap"]; var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "The heap is an efficient implementation of the priority queue. It is currently used by $scheduler and $graph. When you use it only in assignment calls (", <$format, ["tt", [], ["list = $heap.method(args)"], 'do_tt]>, ", in other words), it will operate in the logarithmic time (very fast).", <$format, ["p", [], [], 'do_p]>, "Heap is a list with the property that ", <$format, ["i", [], ["i"], 'do_i]>, "-th element of the list has lower priority than either ", <$format, ["i", [], ["2*i"], 'do_i]>, "-th and ", <$format, ["i", [], ["2*i+1"], 'do_i]>, "-st element of the list. Obviously, the first element of the list will have the lowest priority.", <$format, ["p", [], [], 'do_p]>, <$format, ["dl", [], [<$format, ["dt", [], [<$format, ["tt", [], ["$heap.add(heap, element, priority_index)"], 'do_tt]>], 'do_dt]>, <$format, ["dd", [], ["Add a new element to the heap. In this implementation, heap is assumed to be list of lists, with priority_index determining the priority field of each element."], 'do_dd]>, <$format, ["dt", [], [<$format, ["tt", [], ["$heap.del(heap, index, priority_index)"], 'do_tt]>], 'do_dt]>, <$format, ["dd", [], ["Delete an element at index ", <$format, ["i", [], ["i"], 'do_i]>, " of the heap. if index is greater than length of the heap, the method will throw."], 'do_dd]>], 'do_dl]>, <$format, ["p", [], [], 'do_p]>, "Both methods assume that their first argument already is a heap."], #[['this, $help_heap]]]>; +var $help_node group = 1; var $help_node index = $help_index_core; var $help_node links = #[]; var $root created_on = 858400875; diff -rwu src-3.0a7/help_help.cdc ColdCore-3.0a9.02/src/help_help.cdc --- src-3.0a7/help_help.cdc Sat Aug 9 19:09:34 1997 +++ ColdCore-3.0a9.02/src/help_help.cdc Tue Aug 19 12:15:21 1997 @@ -11,6 +11,5 @@ var $root inited = 1; var $root managed = [$help_help]; var $root manager = $help_help; -var $root owned = [$help_help]; diff -rwu src-3.0a7/help_help_navigating.cdc ColdCore-3.0a9.02/src/help_help_navigating.cdc --- src-3.0a7/help_help_navigating.cdc Sat Aug 9 19:09:34 1997 +++ ColdCore-3.0a9.02/src/help_help_navigating.cdc Tue Aug 19 12:15:21 1997 @@ -11,6 +11,5 @@ var $root inited = 1; var $root managed = [$help_help_navigating]; var $root manager = $help_help_navigating; -var $root owned = [$help_help_navigating]; diff -rwu src-3.0a7/help_help_options.cdc ColdCore-3.0a9.02/src/help_help_options.cdc --- src-3.0a7/help_help_options.cdc Sat Aug 9 19:09:34 1997 +++ ColdCore-3.0a9.02/src/help_help_options.cdc Tue Aug 19 12:15:21 1997 @@ -11,6 +11,5 @@ var $root inited = 1; var $root managed = [$help_help_options]; var $root manager = $help_help_options; -var $root owned = [$help_help_options]; diff -rwu src-3.0a7/help_index.cdc ColdCore-3.0a9.02/src/help_index.cdc --- src-3.0a7/help_index.cdc Sat Aug 9 19:09:44 1997 +++ ColdCore-3.0a9.02/src/help_index.cdc Tue Aug 19 12:15:21 1997 @@ -8,13 +8,11 @@ var $help_node holder = 1; var $help_node links = #[]; var $help_node nolist = 0; *var $root child_index = '-' help_index.cdc var $root created_on = 796268969; var $root flags = ['methods, 'code, 'variables, 'core]; var $root inited = 1; var $root managed = [$help_index]; var $root manager = $help_index; -var $root owned = [$help_index]; public method .add_help_node() { arg node; @@ -67,7 +65,7 @@ if ((!(caller() in [$help_node, definer()])) && ((!(.is_writable_by(sender()))) && (sender() != this()))) throw(~perm, "Permission denied."); for part in ((node.name()).explode("|")) - .remove(node.name()); + .remove(part); }; public method .html_node_name() { @@ -78,8 +76,6 @@ root method .init_help_index() { .add_trusted($help_node); - - // $#Edited: 20 Feb 97 08:40 $miro }; public method .insert() { diff -rwu src-3.0a7/help_index_cmds.cdc ColdCore-3.0a9.02/src/help_index_cmds.cdc --- src-3.0a7/help_index_cmds.cdc Sat Aug 9 19:09:44 1997 +++ ColdCore-3.0a9.02/src/help_index_cmds.cdc Tue Aug 19 12:15:21 1997 @@ -1,20 +1,18 @@ new object $help_index_cmds: $help_index; *var $db database = ' ' help_index_cmds.cdc var $has_name name = ['prop, "Commands", "Commands"]; -var $help_index dirty = 1; +var $help_index dirty = 36; var $help_node body = <$ctext_frob, [[], #[]]>; var $help_node links = #[]; var $help_node nolist = 0; *var $registry stripped_characters = ' ' help_index_cmds.cdc DEFAULT "!#^$&*()" *var $root child_index = '-' help_index_cmds.cdc var $root created_on = 847043048; var $root flags = ['variables, 'methods, 'code, 'core]; var $root inited = 1; var $root managed = [$help_index_cmds]; var $root manager = $help_index_cmds; -var $root owned = [$help_index_cmds]; var $root trusted = [$help_node]; diff -rwu src-3.0a7/help_index_core.cdc ColdCore-3.0a9.02/src/help_index_core.cdc --- src-3.0a7/help_index_core.cdc Sat Aug 9 19:09:44 1997 +++ ColdCore-3.0a9.02/src/help_index_core.cdc Tue Aug 19 12:15:21 1997 @@ -13,7 +13,6 @@ var $root inited = 1; var $root managed = [$help_index_core]; var $root manager = $help_index_core; -var $root owned = [$help_index_core]; var $root trusted = [$help_node]; diff -rwu src-3.0a7/help_index_driver.cdc ColdCore-3.0a9.02/src/help_index_driver.cdc --- src-3.0a7/help_index_driver.cdc Sat Aug 9 19:09:44 1997 +++ ColdCore-3.0a9.02/src/help_index_driver.cdc Tue Aug 19 12:15:21 1997 @@ -1,9 +1,9 @@ new object $help_index_driver: $help_index; *var $db database = ' ' help_index_driver.cdc var $has_name name = ['prop, "Driver", "Driver"]; -var $help_index dirty = 155; +var $help_index dirty = 1; var $help_node body = <$ctext_frob, [[], #[]]>; var $help_node links = #[]; var $help_node nolist = 0; @@ -13,7 +13,6 @@ var $root inited = 1; var $root managed = [$help_index_driver]; var $root manager = $help_index_driver; -var $root owned = [$help_index_driver]; var $root trusted = [$help_node]; diff -rwu src-3.0a7/help_index_function.cdc ColdCore-3.0a9.02/src/help_index_function.cdc --- src-3.0a7/help_index_function.cdc Sat Aug 9 19:09:44 1997 +++ ColdCore-3.0a9.02/src/help_index_function.cdc Tue Aug 19 12:15:21 1997 @@ -1,9 +1,9 @@ new object $help_index_function: $help_index; *var $db database = ' ' help_index_function.cdc var $has_name name = ['prop, "Function", "Function"]; -var $help_index dirty = 325; +var $help_index dirty = 1; var $help_node body = <$ctext_frob, [[], #[]]>; var $help_node links = #[]; var $help_node nolist = 0; @@ -13,7 +13,6 @@ var $root inited = 1; var $root managed = [$help_index_function]; var $root manager = $help_index_function; -var $root owned = [$help_index_function]; var $root trusted = [$help_node]; diff -rwu src-3.0a7/help_index_objects.cdc ColdCore-3.0a9.02/src/help_index_objects.cdc --- src-3.0a7/help_index_objects.cdc Sat Aug 9 19:09:44 1997 +++ ColdCore-3.0a9.02/src/help_index_objects.cdc Tue Aug 19 12:15:21 1997 @@ -13,7 +13,6 @@ var $root inited = 1; var $root managed = [$help_index_objects]; var $root manager = $help_index_objects; -var $root owned = [$help_index_objects]; var $root trusted = [$help_node]; diff -rwu src-3.0a7/help_index_subsystem.cdc ColdCore-3.0a9.02/src/help_index_subsystem.cdc --- src-3.0a7/help_index_subsystem.cdc Sat Aug 9 19:09:44 1997 +++ ColdCore-3.0a9.02/src/help_index_subsystem.cdc Tue Aug 19 12:15:21 1997 @@ -13,7 +13,6 @@ var $root inited = 1; var $root managed = [$help_index_subsystem]; var $root manager = $help_index_subsystem; -var $root owned = [$help_index_subsystem]; var $root trusted = [$help_node]; diff -rwu src-3.0a7/help_interaction.cdc ColdCore-3.0a9.02/src/help_interaction.cdc --- src-3.0a7/help_interaction.cdc Sat Aug 9 19:09:34 1997 +++ ColdCore-3.0a9.02/src/help_interaction.cdc Tue Aug 19 12:15:22 1997 @@ -11,6 +11,5 @@ var $root inited = 1; var $root managed = [$help_interaction]; var $root manager = $help_interaction; -var $root owned = [$help_interaction]; diff -rwu src-3.0a7/help_interface.cdc ColdCore-3.0a9.02/src/help_interface.cdc --- src-3.0a7/help_interface.cdc Sat Aug 9 19:09:34 1997 +++ ColdCore-3.0a9.02/src/help_interface.cdc Tue Aug 19 12:15:22 1997 @@ -11,6 +11,5 @@ var $root inited = 1; var $root managed = [$help_interface]; var $root manager = $help_interface; -var $root owned = [$help_interface]; diff -rwu src-3.0a7/help_interface_client.cdc ColdCore-3.0a9.02/src/help_interface_client.cdc --- src-3.0a7/help_interface_client.cdc Sat Aug 9 19:09:34 1997 +++ ColdCore-3.0a9.02/src/help_interface_client.cdc Tue Aug 19 12:15:22 1997 @@ -11,6 +11,5 @@ var $root inited = 1; var $root managed = [$help_interface_client]; var $root manager = $help_interface_client; -var $root owned = [$help_interface_client]; diff -rwu src-3.0a7/help_interface_format.cdc ColdCore-3.0a9.02/src/help_interface_format.cdc --- src-3.0a7/help_interface_format.cdc Sat Aug 9 19:09:34 1997 +++ ColdCore-3.0a9.02/src/help_interface_format.cdc Tue Aug 19 12:15:22 1997 @@ -11,6 +11,5 @@ var $root inited = 1; var $root managed = [$help_interface_format]; var $root manager = $help_interface_format; -var $root owned = [$help_interface_format]; diff -rwu src-3.0a7/help_interface_settings.cdc ColdCore-3.0a9.02/src/help_interface_settings.cdc --- src-3.0a7/help_interface_settings.cdc Sat Aug 9 19:09:34 1997 +++ ColdCore-3.0a9.02/src/help_interface_settings.cdc Tue Aug 19 12:15:22 1997 @@ -11,6 +11,5 @@ var $root inited = 1; var $root managed = [$help_interface_settings]; var $root manager = $help_interface_settings; -var $root owned = [$help_interface_settings]; diff -rwu src-3.0a7/help_lib.cdc ColdCore-3.0a9.02/src/help_lib.cdc --- src-3.0a7/help_lib.cdc Sat Aug 9 19:09:29 1997 +++ ColdCore-3.0a9.02/src/help_lib.cdc Tue Aug 19 12:15:16 1997 @@ -2,13 +2,12 @@ new object $help_lib: $libraries; var $help_lib default_node = $help_coldcore; -var $help_lib indices = [$help_index_core, $help_index_cmds, $help_index_driver, $help_index_subsystem, $help_index_function, $help_index_objects]; +var $help_lib indices = [$help_index_function, $help_index_objects, $help_index_subsystem, $help_index_driver, $help_index_cmds, $help_index_core]; var $root created_on = 805931416; var $root flags = ['methods, 'code, 'variables, 'core]; var $root inited = 1; var $root managed = [$help_lib]; var $root manager = $help_lib; -var $root owned = [$help_lib]; public method .default_node() { return default_node; @@ -27,8 +26,6 @@ names += [name]; } return names.to_english(@args); - - // $#Edited: 30 Nov 96 21:22 $miro }; public method .history_cap() { @@ -37,8 +34,6 @@ public method .indices() { return indices; - - // $#Edited: 15 Nov 96 11:02 $brandon }; public method .node_name_in_html() { diff -rwu src-3.0a7/help_list_element.cdc ColdCore-3.0a9.02/src/help_list_element.cdc --- src-3.0a7/help_list_element.cdc Sat Aug 9 19:09:44 1997 +++ ColdCore-3.0a9.02/src/help_list_element.cdc Tue Aug 19 12:15:34 1997 @@ -2,8 +2,7 @@ new object $help_list_element: $help_obj_list; var $has_name name = ['prop, "Element", "Element"]; -var $help_node body = <$ctext_frob, [[<$format, ["dl", [], [<$format, ["dt", [], [<$format, ["quote", [], ["length(list)"], 'do_quote]>, " ", <$format, ["i", [], ["native"], 'do_i]>], 'do_dt]>, <$format, ["dd", [], ["Length of the list."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["replace(list, n, elt)"], 'do_quote]>, " ", <$format, ["i", [], ["native"], 'do_i]>], 'do_dt]>, <$format, ["dd", [], ["Replace nth element with elt."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["delete(list, n)"], 'do_quote]>, " ", <$format, ["i", [], ["native"], 'do_i]>], 'do_dt]>, <$format, ["dd", [], ["Deletes nth element from the list."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["insert(list,n,elt)"], 'do_quote]>, " ", <$format, ["i", [], ["native"], 'do_i]>], 'do_dt]>, <$format, ["dd", [], ["insert x at the nth place of the list."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["subrange(list,n,len)"], 'do_quote]>, " ", <$format, ["i", [], ["native"], 'do_i]>], 'do_dt]>, <$format, ["dd", [], ["sublist starting at l, with len elements."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["last(list)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Last element of the list"], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["msort(list[,keys])"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Sort the list by the keys list. Keys default to the list itself."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["chop(list[,count])"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Removes count elements from the tail of the list. Default is 1 element."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["swap(list, index1, index2)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Swaps the two elements of the list."], 'do_dd]>], 'do_dl]>], #[['this, $help_list_element]]]>; -var $help_node index = $help_index_core; +var $help_node body = <$ctext_frob, [[<$format, ["dl", [], [<$format, ["dt", [], [".", <$format, ["method", [["list.length", 1]], ["length"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ") ", <$format, ["i", [], ["native"], 'do_i]>], 'do_dt]>, <$format, ["dd", [], ["Length of the ", <$format, ["var", [], ["list"], 'do_var]>, "."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.replace", 1]], ["replace"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ", ", <$format, ["var", [], ["n"], 'do_var]>, ", ", <$format, ["var", [], ["elt"], 'do_var]>, ") ", <$format, ["i", [], ["native"], 'do_i]>], 'do_dt]>, <$format, ["dd", [], ["Replaces ", <$format, ["var", [], ["n"], 'do_var]>, "th element with ", <$format, ["var", [], ["elt"], 'do_var]>, "."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.delete", 1]], ["delete"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ", ", <$format, ["var", [], ["n"], 'do_var]>, ") ", <$format, ["i", [], ["native"], 'do_i]>], 'do_dt]>, <$format, ["dd", [], ["Deletes ", <$format, ["var", [], ["n"], 'do_var]>, "th element from the list."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.insert", 1]], ["insert"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ", ", <$format, ["var", [], ["n"], 'do_var]>, ", ", <$format, ["var", [], ["elt"], 'do_var]>, ") ", <$format, ["i", [], ["native"], 'do_i]>], 'do_dt]>, <$format, ["dd", [], ["Inserts ", <$format, ["var", [], ["elt"], 'do_var]>, " at the ", <$format, ["var", [], ["n"], 'do_var]>, "th place of the list."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.subrange", 1]], ["subrange"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ", ", <$format, ["var", [], ["n"], 'do_var]>, ", ", <$format, ["var", [], ["len"], 'do_var]>, ") ", <$format, ["i", [], ["native"], 'do_i]>], 'do_dt]>, <$format, ["dd", [], ["Returns sublist starting at ", <$format, ["var", [], ["l"], 'do_var]>, ", with ", <$format, ["var", [], ["len"], 'do_var]>, " elements."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.last", 1]], ["last"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Returns last element of the list."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.msort", 1]], ["msort"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, "[, ", <$format, ["var", [], ["keys"], 'do_var]>, "])"], 'do_dt]>, <$format, ["dd", [], ["Sorts the list by the keys list. Keys default to the list itself."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.chop", 1]], ["chop"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, "[, ", <$format, ["var", [], ["count"], 'do_var]>, "])"], 'do_dt]>, <$format, ["dd", [], ["Removes count elements from the tail of the list. Default is 1 element."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.swap", 1]], ["swap"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ", ", <$format, ["var", [], ["index1"], 'do_var]>, ", ", <$format, ["var", [], ["index2"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Swaps the two elements of the list."], 'do_dd]>], 'do_dl]>], #[]]>; var $help_node links = #[]; var $help_node nolist = 0; var $root created_on = 850833025; diff -rwu src-3.0a7/help_list_formatting.cdc ColdCore-3.0a9.02/src/help_list_formatting.cdc --- src-3.0a7/help_list_formatting.cdc Sat Aug 9 19:09:44 1997 +++ ColdCore-3.0a9.02/src/help_list_formatting.cdc Tue Aug 19 12:15:34 1997 @@ -2,8 +2,7 @@ new object $help_list_formatting: $help_obj_list; var $has_name name = ['prop, "Formatting", "Formatting"]; -var $help_node body = <$ctext_frob, [[<$format, ["dl", [], [<$format, ["dt", [], [<$format, ["quote", [], ["join(list[, separator])"], 'do_quote]>, " ", <$format, ["i", [], ["native"], 'do_i]>], 'do_dt]>, <$format, ["dd", [], ["Format the list by converting its elements to strings, and putting separator between them."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], [".to_english(list[,empty[,and[,sep]]])"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Convert the elements of the list to strings, put separator between them, except the last two elements, that will be separated with and. Defaults for the arguments are: empty = 'nothing', and = ' and ', sep = ', '."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["columnize(list, cols[, separator[, linelength]])"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Format the line in cols columns, adding the separators. Linelength defaults to 78."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["lcolumnize(list, [len, [sep]])"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Columnizes by detecting the maximal length of the list elements."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["vcolumnize(list, cols[, linelen])"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Columnizes in the stanard manner (consecutive elements are aligned vertically)."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["center_lines(list,width,[args])"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Calls $string.center on each line in the list, with extra args."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["prefix(list, prefix)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Prepends a prefix to each element of the list"], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["affix(l1, l2)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Appends l2 to l1, with adding the first element of l2 to the last element of l1."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["tabulate(list, headers, [colsizes, trim_cols, header_sep, len])"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Output the list as a table, with given headers. Colsizes, if 0, are automatically calculated."], 'do_dd]>], 'do_dl]>], #[['this, $help_list_formatting]]]>; -var $help_node index = $help_index_core; +var $help_node body = <$ctext_frob, [[<$format, ["dl", [], [<$format, ["dt", [], [".", <$format, ["method", [["list.join", 1]], ["join"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, "[, ", <$format, ["var", [], ["separator"], 'do_var]>, "]) ", <$format, ["var", [], ["native"], 'do_var]>], 'do_dt]>, <$format, ["dd", [], ["Format the ", <$format, ["var", [], ["list"], 'do_var]>, " by converting its elements to strings, and putting ", <$format, ["var", [], ["separator"], 'do_var]>, " between them."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.to_english", 1]], ["to_english"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, "[, ", <$format, ["var", [], ["empty"], 'do_var]>, "[, ", <$format, ["var", [], ["and"], 'do_var]>, "[, ", <$format, ["var", [], ["sep"], 'do_var]>, "]]])"], 'do_dt]>, <$format, ["dd", [], ["Convert the elements of the ", <$format, ["var", [], ["list"], 'do_var]>, " to strings, put ", <$format, ["var", [], ["separator"], 'do_var]>, " between them, except the last two elements, that will be separated with ", <$format, ["var", [], ["and"], 'do_var]>, ". Defaults for the arguments are: ", <$format, ["var", [], ["empty"], 'do_var]>, " = 'nothing', ", <$format, ["var", [], ["and"], 'do_var]>, " = ' and ', ", <$format, ["var", [], ["sep"], 'do_var]>, " = ', '."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.columnize", 1]], ["columnize"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ", ", <$format, ["var", [], ["cols"], 'do_var]>, "[, ", <$format, ["var", [], ["separator"], 'do_var]>, "[, ", <$format, ["var", [], ["linelength"], 'do_var]>, "]])"], 'do_dt]>, <$format, ["dd", [], ["Format the line in ", <$format, ["var", [], ["cols"], 'do_var]>, " columns, adding the ", <$format, ["var", [], ["separators"], 'do_var]>, ". ", <$format, ["var", [], ["Linelength"], 'do_var]>, " defaults to 78."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.lcolumnize", 1]], ["lcolumnize"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, "[, ", <$format, ["var", [], ["len"], 'do_var]>, "[, ", <$format, ["var", [], ["sep"], 'do_var]>, "]])"], 'do_dt]>, <$format, ["dd", [], ["Columnizes by detecting the maximal length of the list elements."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.vcolumnize", 1]], ["vcolumnize"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ", ", <$format, ["var", [], ["cols"], 'do_var]>, "[, ", <$format, ["var", [], ["linelen"], 'do_var]>, "])"], 'do_dt]>, <$format, ["dd", [], ["Columnizes in the stanard manner (consecutive elements are aligned vertically)."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.center_lines", 1]], ["center_lines"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ", ", <$format, ["var", [], ["width"], 'do_var]>, "[, ", <$format, ["var", [], ["args"], 'do_var]>, "])"], 'do_dt]>, <$format, ["dd", [], ["Calls ", <$format, ["method", [["string.center", 1]], ["$string.center"], 'do_method]>, " on each line in the ", <$format, ["var", [], ["list"], 'do_var]>, ", with extra ", <$format, ["var", [], ["args"], 'do_var]>, "."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.prefix", 1]], ["prefix"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ", ", <$format, ["var", [], ["prefix"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Prepends a ", <$format, ["var", [], ["prefix"], 'do_var]>, " to each element of the ", <$format, ["var", [], ["list"], 'do_var]>, "."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.affix", 1]], ["affix"], 'do_method]>, "(", <$format, ["var", [], ["l1"], 'do_var]>, ", ", <$format, ["var", [], ["l2"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Appends ", <$format, ["var", [], ["l2"], 'do_var]>, " to ", <$format, ["var", [], ["l1"], 'do_var]>, ", with adding the first element of ", <$format, ["var", [], ["l2"], 'do_var]>, " to the last element of ", <$format, ["var", [], ["l1"], 'do_var]>, "."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.tabulate", 1]], ["tabulate"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ", ", <$format, ["var", [], ["headers"], 'do_var]>, "[, ", <$format, ["var", [], ["colsizes"], 'do_var]>, ", ", <$format, ["var", [], ["trim_cols"], 'do_var]>, ", ", <$format, ["var", [], ["header_sep"], 'do_var]>, ", ", <$format, ["var", [], ["len"], 'do_var]>, "])"], 'do_dt]>, <$format, ["dd", [], ["Output the ", <$format, ["var", [], ["list"], 'do_var]>, " as a table, with given ", <$format, ["var", [], ["headers"], 'do_var]>, ". ", <$format, ["var", [], ["Colsizes"], 'do_var]>, ", if 0, are automatically calculated."], 'do_dd]>], 'do_dl]>], #[]]>; var $help_node links = #[]; var $help_node nolist = 0; var $root created_on = 850833050; diff -rwu src-3.0a7/help_list_maps.cdc ColdCore-3.0a9.02/src/help_list_maps.cdc --- src-3.0a7/help_list_maps.cdc Sat Aug 9 19:09:44 1997 +++ ColdCore-3.0a9.02/src/help_list_maps.cdc Tue Aug 19 12:15:34 1997 @@ -2,9 +2,8 @@ new object $help_list_maps: $help_obj_list; var $has_name name = ['prop, "Maps", "Maps"]; -var $help_node body = <$ctext_frob, [[<$format, ["dl", [], [<$format, ["dt", [], [<$format, ["quote", [], ["make(n[,elt])"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Makes a list of n copies of elt. Elt defaults to 0."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["mmap(list, method, args...)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Calls method on each element (with additional arguments, if specified), returns the results."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["mfilter(list, method, args...)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Similar to mmap, but returns the list of objects for which method returned true value."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["lmap(list, method, args...)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Calls sender().method on each element of the list, returns the results."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["omap(list, object, method, args...)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Calls object.method on each element."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["map_to_english(list, method, args...)"], 'do_quote]>], 'do_dt]>, <$format, ["dt", [], [<$format, ["quote", [], ["map_to_string(list, method, args...)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Shorthand for mmap followed with .to_english/.to_string."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["element_maxlength(list)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Finds the longest element (measuring by string representation)."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["nth_element_maxlength(list,n)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Same as list.slice(n).element_maxlength()."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["reverse(list)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Reverse the order of the elements of the list."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["compress(list)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Removes the repeated elements."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["slice(list, n)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Returns the list of nth elements from a list of lists. If n is a list, it will return a list of lists."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["numbered_text(text)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Returns the text with line numbers prepended."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["max(list)"], 'do_quote]>], 'do_dt]>, <$format, ["dt", [], [<$format, ["quote", [], ["min(list)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Returns minimal/maximal element of the list (0 if empty)."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["fold(list, object, method, args...)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Fold operation from the functional programming. For empty list, it returns 0, for a 1 element list, it returns the first element. Otherwise, it calls the method for the first two elements, then calls it with the result and the third element, etc. It returns the last result."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["valid_objects(list)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Removes invalid objects from the list"], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["grep(list,regexp)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["For each line that matches regexp, returns [linenumber, regexp match regions, the line text]."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["count(list, elem)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Counts the number of occurences of element in the list."], 'do_dd]>], 'do_dl]>], #[['this, $help_list_maps]]]>; -var $help_node index = $help_index_core; -var $help_node links = #[]; +var $help_node body = <$ctext_frob, [[<$format, ["dl", [], [<$format, ["dt", [], [".", <$format, ["method", [["list.make", 1]], ["make"], 'do_method]>, "(", <$format, ["var", [], ["n"], 'do_var]>, "[,", <$format, ["var", [], ["elt"], 'do_var]>, "])"], 'do_dt]>, <$format, ["dd", [], ["Makes a list of ", <$format, ["var", [], ["n"], 'do_var]>, " copies of ", <$format, ["var", [], ["elt"], 'do_var]>, ". ", <$format, ["var", [], ["Elt"], 'do_var]>, " defaults to 0."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.mmap", 1]], ["mmap"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ", ", <$format, ["var", [], ["method"], 'do_var]>, ", ", <$format, ["var", [], ["args"], 'do_var]>, "...)"], 'do_dt]>, <$format, ["dd", [], ["Calls ", <$format, ["var", [], ["method"], 'do_var]>, " on each element (with additional arguments, if specified), returns the results."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.mfilter", 1]], ["mfilter"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ", ", <$format, ["var", [], ["method"], 'do_var]>, ", ", <$format, ["var", [], ["args"], 'do_var]>, "...)"], 'do_dt]>, <$format, ["dd", [], ["Similar to .", <$format, ["method", [["list.mmap", 1]], ["mmap"], 'do_method]>, "(), but returns the list of objects for which ", <$format, ["var", [], ["method"], 'do_var]>, " returned a true value."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.lmap", 1]], ["lmap"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ", ", <$format, ["var", [], ["method"], 'do_var]>, ", ", <$format, ["var", [], ["args"], 'do_var]>, "...)"], 'do_dt]>, <$format, ["dd", [], ["Calls ", <$format, ["link", [["node", "$help_func_sender"]], ["sender"], 'do_link]>, "().", <$format, ["var", [], ["method"], 'do_var]>, " on each element of the list, returns the results."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.omap", 1]], ["omap"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ", ", <$format, ["var", [], ["object"], 'do_var]>, ", ", <$format, ["var", [], ["method"], 'do_var]>, ", ", <$format, ["var", [], ["args"], 'do_var]>, "...)"], 'do_dt]>, <$format, ["dd", [], ["Calls ", <$format, ["var", [], ["object"], 'do_var]>, ".", <$format, ["var", [], ["method"], 'do_var]>, " on each element."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.map_to_english", 1]], ["map_to_english"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ", ", <$format, ["var", [], ["method"], 'do_var]>, ", ", <$format, ["var", [], ["args"], 'do_var]>, "...)"], 'do_dt]>, <$format, ["dt", [], [".", <$format, ["method", [["list.map_to_string", 1]], ["map_to_string"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ", ", <$format, ["var", [], ["method"], 'do_var]>, ", ", <$format, ["var", [], ["args"], 'do_var]>, "...)"], 'do_dt]>, <$format, ["dd", [], ["Shorthand for .", <$format, ["method", [["list.mmap", 1]], ["mmap"], 'do_method]>, "() followed with .", <$format, ["method", [["list.to_english", 1]], ["to_english"], 'do_method]>, "()/.", <$format, ["method", [["list.to_string", 1]], ["to_string"], 'do_method]>, "()."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.element_maxlength", 1]], ["element_maxlength"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Finds the longest element (measuring by string representation)."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.nth_element_maxlength", 1]], ["nth_element_maxlength"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ", ", <$format, ["var", [], ["n"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Same as list.", <$format, ["method", [["list.slice", 1]], ["slice"], 'do_method]>, "(", <$format, ["var", [], ["n"], 'do_var]>, ").", <$format, ["method", [["list.element_maxlength", 1]], ["element_maxlength"], 'do_method]>, "()."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.reverse", 1]], ["reverse"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Reverse the order of the elements of the ", <$format, ["var", [], ["list"], 'do_var]>, "."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.compress", 1]], ["compress"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Removes the repeated elements."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.slice", 1]], ["slice"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ", ", <$format, ["var", [], ["n"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Returns the list of ", <$format, ["var", [], ["n"], 'do_var]>, "th elements from a list of lists. If ", <$format, ["var", [], ["n"], 'do_var]>, " is a list, it will return a list of lists."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.numbered_text", 1]], ["numbered_text"], 'do_method]>, "(", <$format, ["var", [], ["text"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Returns the ", <$format, ["var", [], ["text"], 'do_var]>, " with line numbers prepended."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.max", 1]], ["max"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dt", [], [".", <$format, ["method", [["list.min", 1]], ["min"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Returns minimal/maximal element of the ", <$format, ["var", [], ["list"], 'do_var]>, " (0 if empty)."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.fold", 1]], ["fold"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ", ", <$format, ["var", [], ["object"], 'do_var]>, ", ", <$format, ["var", [], ["method"], 'do_var]>, ", ", <$format, ["var", [], ["args"], 'do_var]>, "...)"], 'do_dt]>, <$format, ["dd", [], ["Fold operation from functional programming. For an empty list, it returns 0, for a 1 element list, it returns the first element. Otherwise, it calls the ", <$format, ["var", [], ["method"], 'do_var]>, " for the first two elements, then calls it with the result and the third element, etc. It returns the last result."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.valid_objects", 1]], ["valid_objects"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Removes invalid objects from the ", <$format, ["var", [], ["list"], 'do_var]>], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.grep", 1]], ["grep"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ",", <$format, ["var", [], ["regexp"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["For each line that matches ", <$format, ["var", [], ["regexp"], 'do_var]>, ", returns [linenumber, regexp match regions, the line text]."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.count", 1]], ["count"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ", ", <$format, ["var", [], ["elem"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Counts the number of occurences of element in the list."], 'do_dd]>], 'do_dl]>], #[['links, #[["sender", "$help_func_sender"]]]]]>; +var $help_node links = #[["sender", $help_func_sender]]; var $help_node nolist = 0; var $root created_on = 850833055; var $root flags = ['variables, 'methods, 'code, 'core]; diff -rwu src-3.0a7/help_list_other.cdc ColdCore-3.0a9.02/src/help_list_other.cdc --- src-3.0a7/help_list_other.cdc Sat Aug 9 19:09:44 1997 +++ ColdCore-3.0a9.02/src/help_list_other.cdc Tue Aug 19 12:15:34 1997 @@ -2,9 +2,8 @@ new object $help_list_other: $help_obj_list; var $has_name name = ['prop, "Other", "Other"]; -var $help_node body = <$ctext_frob, [[<$format, ["dl", [], [<$format, ["dt", [], [<$format, ["quote", [], ["flatten(list)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["RaisE Gll the sublists to the toplevel."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["sum(list)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Returns the sum of the elements of the list."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["non_alphanumeric()"], 'do_quote]>], 'do_dt]>, <$format, ["dt", [], [<$format, ["quote", [], ["numbers()"], 'do_quote]>], 'do_dt]>, <$format, ["dt", [], [<$format, ["quote", [], ["alphabet"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Returns the lists of characters in each class."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["to_buffer([args])"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Turns a list of strings into buffer, inserting a newlist (by default) as a separator."], 'do_dd]>], 'do_dl]>, " ", <$format, ["subj", [["level", "3"]], ["Associative lists"], 'do_subj]>, "Associative lists are lists of key/value pairs. Use them only when dealing with very few elements (fewer than 5, for instance). For larger databases, memory advantage of the associative lists ceases to matter, and they are much slower than dictionaries. ", <$format, ["p", [], [], 'do_p]>, " ", <$format, ["dl", [], [<$format, ["dt", [], [<$format, ["quote", [], ["addkey(l, key, val)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Adds a key/value pair to the list, or modifies the value associated with existing key."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["delkey(l, key)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Removes the key/value pair if exists."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["getkey(l, key)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Returns the value associated with the key, or throws ~keynf."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["getkey_index(l, key)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Returns the index if the key, or throws."], 'do_dd]>], 'do_dl]>], #[['this, $help_list_other]]]>; -var $help_node index = $help_index_core; -var $help_node links = #[]; +var $help_node body = <$ctext_frob, [[<$format, ["dl", [], [<$format, ["dt", [], [".", <$format, ["method", [["list.flatten", 1]], ["flatten"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Raise all the sublists to the toplevel."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.sum", 1]], ["sum"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Returns the sum of the elements of the list."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.non_alphanumeric", 1]], ["non_alphanumeric"], 'do_method]>, "()"], 'do_dt]>, <$format, ["dt", [], [".", <$format, ["method", [["list.numbers", 1]], ["numbers"], 'do_method]>, "()"], 'do_dt]>, <$format, ["dt", [], [".", <$format, ["method", [["list.alphabet", 1]], ["alphabet"], 'do_method]>, "()"], 'do_dt]>, <$format, ["dd", [], ["Returns the lists of characters in each class."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.to_buffer", 1]], ["to_buffer"], 'do_method]>, "([", <$format, ["var", [], ["args"], 'do_var]>, "])"], 'do_dt]>, <$format, ["dd", [], ["Turns a list of strings into ", <$format, ["link", [["node", "$help_coldc_types_buffers"]], ["buffer"], 'do_link]>, ", inserting a newlist (by default) as a separator."], 'do_dd]>], 'do_dl]>, <$format, ["subj", [["level", "3"]], ["Associative lists"], 'do_subj]>, "Associative lists are lists of key/value pairs. Use them only when dealing with very few elements (fewer than 5, for instance). For larger databases, memory advantage of the associative lists ceases to matter, and they are much slower than ", <$format, ["link", [["node", "$help_coldc_types_dicts"]], ["dictionaries"], 'do_link]>, ".", <$format, ["p", [], [], 'do_p]>, <$format, ["dl", [], [<$format, ["dt", [], [".", <$format, ["method", [["list.addkey", 1]], ["addkey"], 'do_method]>, "(", <$format, ["var", [], ["l"], 'do_var]>, ", ", <$format, ["var", [], ["key"], 'do_var]>, ", ", <$format, ["var", [], ["val"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Adds a key/value pair to the list, or modifies the value associated with existing key."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.delkey", 1]], ["delkey"], 'do_method]>, "(", <$format, ["var", [], ["l"], 'do_var]>, ", ", <$format, ["var", [], ["key"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Removes the key/value pair if exists."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.getkey", 1]], ["getkey"], 'do_method]>, "(", <$format, ["var", [], ["l"], 'do_var]>, ", ", <$format, ["var", [], ["key"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Returns the value associated with the key, or throws ~keynf."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.getkey_index", 1]], ["getkey_index"], 'do_method]>, "(", <$format, ["var", [], ["l"], 'do_var]>, ", ", <$format, ["var", [], ["key"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Returns the index if the key, or throws."], 'do_dd]>], 'do_dl]>], #[['links, #[["buffer", "$help_coldc_types_buffers"], ["dictionaries", "$help_coldc_types_dicts"]]]]]>; +var $help_node links = #[["buffer", $help_coldc_types_buffers], ["dictionaries", $help_coldc_types_dicts]]; var $help_node nolist = 0; var $root created_on = 850833064; var $root flags = ['variables, 'methods, 'code, 'core]; diff -rwu src-3.0a7/help_list_sets.cdc ColdCore-3.0a9.02/src/help_list_sets.cdc --- src-3.0a7/help_list_sets.cdc Sat Aug 9 19:09:44 1997 +++ ColdCore-3.0a9.02/src/help_list_sets.cdc Tue Aug 19 12:15:34 1997 @@ -2,8 +2,7 @@ new object $help_list_sets: $help_obj_list; var $has_name name = ['prop, "Sets", "Sets"]; -var $help_node body = <$ctext_frob, [[<$format, ["dl", [], [<$format, ["dt", [], [<$format, ["quote", [], ["setadd(list, elt)"], 'do_quote]>, " ", <$format, ["i", [], ["native"], 'do_i]>], 'do_dt]>, <$format, ["dd", [], ["Adds an element to the list unless it's already contained in the list."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["setremove(list, elt)"], 'do_quote]>, " ", <$format, ["i", [], ["native"], 'do_i]>], 'do_dt]>, <$format, ["dd", [], ["Removes the first occurence of the element from the list."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["union(list1,list2)"], 'do_quote]>, " ", <$format, ["i", [], ["native"], 'do_i]>], 'do_dt]>, <$format, ["dd", [], ["Union of the two lists. Use ", <$format, ["quote", [], ["big_list.fold($list,'union)"], 'do_quote]>, " to get a union of the family of lists."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["set_difference(list, l1, ...)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Removes the elements from l1, l2 etc from the list."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["intersection(l1, l2)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Returns the elements that occur on both lists. Use fold() for more lists."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["set_contains(l1, l2, ...)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Returns 1 if the first argument contains all the others."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], ["set_equal(l1, l2)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Returns 1 if the lists are equal as sets (that is, if l1 is contained in l2 and if l2 is contained in l1)."], 'do_dd]>], 'do_dl]>], #[['this, $help_list_sets]]]>; -var $help_node index = $help_index_core; +var $help_node body = <$ctext_frob, [[<$format, ["dl", [["ind", "8"]], [<$format, ["dt", [], [".", <$format, ["method", [["list.setadd", 1]], ["setadd"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ", ", <$format, ["var", [], ["elt"], 'do_var]>, ") ", <$format, ["i", [], ["native"], 'do_i]>], 'do_dt]>, <$format, ["dd", [], ["Adds an element to the list unless it's already contained in the list."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.setremove", 1]], ["setremove"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ", ", <$format, ["var", [], ["elt"], 'do_var]>, ") ", <$format, ["i", [], ["native"], 'do_i]>], 'do_dt]>, <$format, ["dd", [], ["Removes the first occurence of the element from the list."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.union", 1]], ["union"], 'do_method]>, "(", <$format, ["var", [], ["list1"], 'do_var]>, ",", <$format, ["var", [], ["list2"], 'do_var]>, ") ", <$format, ["i", [], ["native"], 'do_i]>], 'do_dt]>, <$format, ["dd", [], ["Union of the two lists. Use ", <$format, ["method", [["list.fold", 1]], ["big_list.fold"], 'do_method]>, "($list,'union) to get a union of the family of lists."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.set_difference", 1]], ["set_difference"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ", ", <$format, ["var", [], ["l1"], 'do_var]>, ", ...)"], 'do_dt]>, <$format, ["dd", [], ["Removes the elements from ", <$format, ["var", [], ["l1"], 'do_var]>, ", ", <$format, ["var", [], ["l2"], 'do_var]>, " etc from the list."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.intersection", 1]], ["intersection"], 'do_method]>, "(", <$format, ["var", [], ["l1"], 'do_var]>, ", ", <$format, ["var", [], ["l2"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Returns the elements that occur on both lists. Use ", <$format, ["method", [["list.fold", 1]], ["$list.fold()"], 'do_method]>, " for more lists."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.set_contains", 1]], ["set_contains"], 'do_method]>, "(", <$format, ["var", [], ["l1"], 'do_var]>, ", ", <$format, ["var", [], ["l2"], 'do_var]>, ", ...)"], 'do_dt]>, <$format, ["dd", [], ["Returns 1 if the first argument contains all the others."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["list.set_equal", 1]], ["set_equal"], 'do_method]>, "(", <$format, ["var", [], ["l1"], 'do_var]>, ", ", <$format, ["var", [], ["l2"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Returns 1 if the lists are equal as sets (that is, if ", <$format, ["var", [], ["l1"], 'do_var]>, " is contained in ", <$format, ["var", [], ["l2"], 'do_var]>, " and if ", <$format, ["var", [], ["l2"], 'do_var]>, " is contained in l1)."], 'do_dd]>], 'do_dl]>], #[]]>; var $help_node links = #[]; var $help_node nolist = 0; var $root created_on = 850833059; diff -rwu src-3.0a7/help_mutex.cdc ColdCore-3.0a9.02/src/help_mutex.cdc --- src-3.0a7/help_mutex.cdc Sat Aug 9 19:09:46 1997 +++ ColdCore-3.0a9.02/src/help_mutex.cdc Tue Aug 19 12:15:34 1997 @@ -1,8 +1,9 @@ -new object $help_mutex: $help_core; +new object $help_mutex: $help_obj; var $has_name name = ['prop, "Mutex", "Mutex"]; var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "Mutex is 'Mutual Exclusion'. Its purpose is preventing concurrent tasks from interfering with each other. A task grabbing mutex lock will suspend until all other tasks release the incompatible locks. Each lock has class and list of values. Two locks are ", <$format, ["i", [], ["incompatible"], 'do_i]>, " if:", <$format, ["p", [], [], 'do_p]>, <$format, ["ul", [], [<$format, ["li", [], ["Their class have common descendant (classes themselves are considered descendants for the purpose of this definition)"], 'do_li]>, <$format, ["li", [], ["Their values have common elements."], 'do_li]>], 'do_ul]>, <$format, ["np", [], [], 'do_np]>, "Primary mutex class is $mutex (note that grabbing $mutex will cause all attempts to grab locks with similar values to suspend). Its descendants allow programmer to set up finer locks, which allow multiple tasks to deal with nondisjoint value lists concurrently. ", <$format, ["np", [], [], 'do_np]>, "$mutex has the following functions:", <$format, ["p", [], [], 'do_p]>, <$format, ["dl", [], [<$format, ["dt", [], [".grab(@values)"], 'do_dt]>, <$format, ["dd", [], ["Grab the list of values on the called class."], 'do_dd]>, <$format, ["dt", [], [".release(@values)"], 'do_dt]>, <$format, ["dd", [], ["Release the list from the class."], 'do_dd]>, <$format, ["dt", [], [".release_all()"], 'do_dt]>, <$format, ["dd", [], ["Release all the locks held by the current class. Use this call from connection objects and such."], 'do_dd]>, <$format, ["dt", [], [".cleanup_dead_tasks()"], 'do_dt]>, <$format, ["dd", [], ["Remove the dead tasks from this class."], 'do_dd]>], 'do_dl]>], #[['this, $help_mutex]]]>; +var $help_node group = 1; var $help_node index = $help_index_core; var $help_node links = #[]; var $help_node nolist = 0; diff -rwu src-3.0a7/help_node.cdc ColdCore-3.0a9.02/src/help_node.cdc --- src-3.0a7/help_node.cdc Sat Aug 9 19:09:34 1997 +++ ColdCore-3.0a9.02/src/help_node.cdc Tue Aug 19 12:15:21 1997 @@ -9,23 +9,22 @@ var $help_node index = 0; var $help_node links = 0; var $help_node nolist = 1; *var $root child_index = '-' help_node.cdc var $root created_on = 796268969; var $root defined_settings = #[["nolist", #[['get, ['nolist]], ['set, ['set_nolist]], ['parse, ['is_boolean]], ['format, ['format_boolean]]]], ["group", #[['get, ['group]], ['set, ['set_group]], ['parse, ['is_boolean]], ['format, ['format_boolean]]]], ["index", #[['get, ['get_index_setting]], ['set, ['set_index_setting]], ['parse, ['parse_index_setting]], ['format, ['format_index]]]], ["holder", #[['get, ['get_holder_setting]], ['set, ['set_holder_setting]], ['parse, ['is_boolean]], ['format, ['format_boolean]]]]]; var $root fertile = 1; -var $root flags = ['methods, 'code, 'fertile, 'variables, 'core]; +var $root flags = ['methods, 'code, 'variables, 'core]; +var $root help_node = $help_obj_help_node; var $root inited = 1; var $root managed = [$help_node]; var $root manager = $help_node; -var $root owned = [$help_node]; var $root trusted_by = [$help_index_driver, $help_index_core, $help_index_cmds, $help_index_subsystem, $help_index_function, $help_index_objects, $help_updates, $help_sys_weather, $help_sys_weather_attributes, $help_sys_climate, $help_weather_system]; public method ._edit_help_callback() { arg text, client_data; - (> .perms(sender()) <); + (> .perms(caller(), $editor_reference) <); .set_body(text); - return "Help node body set."; + return ['success, ["Help node body set."]]; }; protected method ._set_index() { @@ -51,8 +50,6 @@ (> .perms(sender()) <); p = (.body()).uncompile(); (> sender().invoke_editor(this(), '_edit_help_callback, p, []) <); - - // $#Edited: 18 Aug 96 21:02 $jenner }; public method .format_index() { @@ -83,8 +80,6 @@ public method .holder() { return holder; - - // $#Edited: 20 Jan 97 20:44 $brandon }; public method .html_node_name() { @@ -107,8 +102,6 @@ public method .index() { return index; - - // $#Edited: 13 Nov 96 13:46 $brandon }; public method .index_going_away() { @@ -191,8 +184,6 @@ links = links.add(key, $object_lib.to_dbref(anchors[key])); if ((!(.has_ancestor($help_index))) && (!(this() == $help_updates))) $help_updates.touched(); - - // $#Edited: 20 Nov 96 18:42 $miro }; protected method .set_group() { @@ -213,8 +204,6 @@ holder = 1; else if (holder) clear_var('holder); - - // $#Edited: 19 Jan 97 15:57 $brandon }; public method .set_index() { @@ -250,14 +239,10 @@ public method .small_name() { return ((.name()).word(1, "|")).word(1); - - // $#Edited: 20 Jan 97 22:30 $brandon }; public method .top_of_help_heirarchy() { return definer() == this(); - - // $#Edited: 11 Nov 96 22:40 $brandon }; public method .traverse() { @@ -268,22 +253,16 @@ for n in (children()) out += n.traverse(); return out; - - // $#Edited: 17 Mar 97 09:10 $brandon }; root method .uninit_help_node() { var obj; - if (index) { - catch any - (> index.node_going_away() <); - with - $brandon.tell_traceback(traceback()); - } + if (index) + (| index.node_going_away() |); links = #[]; - title = ""; body = []; + $help_updates.touched(); }; diff -rwu src-3.0a7/help_node_editor_commands.cdc ColdCore-3.0a9.02/src/help_node_editor_commands.cdc --- src-3.0a7/help_node_editor_commands.cdc Sat Aug 9 19:09:44 1997 +++ ColdCore-3.0a9.02/src/help_node_editor_commands.cdc Tue Aug 19 12:15:34 1997 @@ -10,7 +10,6 @@ var $root inited = 1; var $root managed = [$help_node_editor_commands]; var $root manager = $help_node_editor_commands; -var $root owned = [$help_node_editor_commands]; public method .generate_body() { var helps, h, cmds, c, out, syn; @@ -32,8 +31,6 @@ out += ((("{dt:{subj level=3:{tt:" + syn) + "}}}{dd:") + h) + "}"; } .set_body(out + "}"); - - // $#Edited: 14 Feb 97 23:46 $brandon }; diff -rwu src-3.0a7/help_node_editor_invoking.cdc ColdCore-3.0a9.02/src/help_node_editor_invoking.cdc --- src-3.0a7/help_node_editor_invoking.cdc Sat Aug 9 19:09:44 1997 +++ ColdCore-3.0a9.02/src/help_node_editor_invoking.cdc Tue Aug 19 12:15:34 1997 @@ -10,6 +10,5 @@ var $root inited = 1; var $root managed = [$help_node_editor_invoking]; var $root manager = $help_node_editor_invoking; -var $root owned = [$help_node_editor_invoking]; diff -rwu src-3.0a7/help_node_editor_programming.cdc ColdCore-3.0a9.02/src/help_node_editor_programming.cdc --- src-3.0a7/help_node_editor_programming.cdc Sat Aug 9 19:09:44 1997 +++ ColdCore-3.0a9.02/src/help_node_editor_programming.cdc Tue Aug 19 12:15:34 1997 @@ -10,6 +10,5 @@ var $root inited = 1; var $root managed = [$help_node_editor_programming]; var $root manager = $help_node_editor_programming; -var $root owned = [$help_node_editor_programming]; diff -rwu src-3.0a7/help_obj_list.cdc ColdCore-3.0a9.02/src/help_obj_list.cdc --- src-3.0a7/help_obj_list.cdc Sat Aug 9 19:09:44 1997 +++ ColdCore-3.0a9.02/src/help_obj_list.cdc Tue Aug 19 12:15:34 1997 @@ -1,17 +1,16 @@ -new object $help_obj_list: $help_core; +new object $help_obj_list: $help_obj; var $has_name name = ['prop, "List Library", "List Library"]; var $help_node body = <$ctext_frob, [[<$format, ["dl", [["columned", 1]], [<$format, ["dt", [], [<$format, ["link", [["node", "$help_list_element"]], ["Elements"], 'do_link]>], 'do_dt]>, <$format, ["dd", [], ["Element operations"], 'do_dd]>, <$format, ["dt", [], [<$format, ["link", [["node", "$help_list_formatting"]], ["Formatting"], 'do_link]>], 'do_dt]>, <$format, ["dd", [], ["List formatting"], 'do_dd]>, <$format, ["dt", [], [<$format, ["link", [["node", "$help_list_maps"]], ["Maps"], 'do_link]>], 'do_dt]>, <$format, ["dd", [], ["Mapping and filtering"], 'do_dd]>, <$format, ["dt", [], [<$format, ["link", [["node", "$help_list_sets"]], ["Sets"], 'do_link]>], 'do_dt]>, <$format, ["dd", [], ["Set operations"], 'do_dd]>, <$format, ["dt", [], [<$format, ["link", [["node", "$help_list_other"]], ["Others"], 'do_link]>], 'do_dt]>, <$format, ["dd", [], ["Others"], 'do_dd]>], 'do_dl]>], #[['this, $help_obj_list]]]>; +var $help_node group = 1; var $help_node index = $help_index_objects; var $help_node links = #[["Elements", $help_list_element], ["Formatting", $help_list_formatting], ["Maps", $help_list_maps], ["Sets", $help_list_sets], ["Others", $help_list_other]]; var $help_node nolist = 0; *var $root child_index = '-' help_obj_list.cdc var $root created_on = 837714742; var $root flags = ['variables, 'methods, 'code, 'core]; var $root inited = 1; var $root managed = [$help_obj_list]; var $root manager = $help_obj_list; -var $root owned = [$help_obj_list]; diff -rwu src-3.0a7/help_obj_trie.cdc ColdCore-3.0a9.02/src/help_obj_trie.cdc --- src-3.0a7/help_obj_trie.cdc Sat Aug 9 19:09:44 1997 +++ ColdCore-3.0a9.02/src/help_obj_trie.cdc Tue Aug 19 12:15:34 1997 @@ -1,8 +1,9 @@ -new object $help_obj_trie: $help_core; +new object $help_obj_trie: $help_obj; var $has_name name = ['prop, "Trie", "Trie"]; var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "Trie is a datastructure that behaves like dictionary with string keys, except that it allows fast match_begin with all the keys. Also, key may be associated with a value list instead of a single value. Its memory overhead is about twice that of a dictionary, and all the operations are slower, except match_begin (which, unlike the dictionary's, does not have to loop through all the keys). Empty trie is represented as ", <$format, ["tt", [], ["<$trie,[0,\"\"]>"], 'do_tt]>, ".", <$format, ["p", [], [], 'do_p]>, <$format, ["subj", [["level", "3"]], ["Methods"], 'do_subj]>, <$format, ["dl", [], [<$format, ["dt", [], [<$format, ["quote", [], [".add(key, value[,value...])"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Associate a list of values with a key."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], [".del(key)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Remove the key from trie."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], [".match_exact(key)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Find an exact match to the key."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], [".match_begin(key)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Find an approximate match."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], [".keys()"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Get a list of the keys. This is very slow operation."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], [".to_dict(), $dictionary.to_trie(dict)"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Conversions. The first one converts a trie with a single-element values into dictionary, reverse converts a dictionary with string keys to trie."], 'do_dd]>], 'do_dl]>], #[['this, $help_obj_trie]]]>; +var $help_node group = 1; var $help_node index = $help_index_objects; var $help_node links = #[]; var $help_node nolist = 0; @@ -11,6 +12,5 @@ var $root inited = 1; var $root managed = [$help_obj_trie]; var $root manager = $help_obj_trie; -var $root owned = [$help_obj_trie]; diff -rwu src-3.0a7/help_objects.cdc ColdCore-3.0a9.02/src/help_objects.cdc --- src-3.0a7/help_objects.cdc Sat Aug 9 19:09:34 1997 +++ ColdCore-3.0a9.02/src/help_objects.cdc Tue Aug 19 12:15:22 1997 @@ -11,6 +11,5 @@ var $root inited = 1; var $root managed = [$help_objects]; var $root manager = $help_objects; -var $root owned = [$help_objects]; diff -rwu src-3.0a7/help_places_exen.cdc ColdCore-3.0a9.02/src/help_places_exen.cdc --- src-3.0a7/help_places_exen.cdc Sat Aug 9 19:09:35 1997 +++ ColdCore-3.0a9.02/src/help_places_exen.cdc Tue Aug 19 12:15:22 1997 @@ -2,7 +2,7 @@ new object $help_places_exen: $help_build_places; var $has_name name = ['prop, "Exits and Entrances", "Exits and Entrances"]; -var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "Entrances and Exits to a place are either created with the command ", <$format, ["link", [["node", "$help_cmd_build"]], ["@build"], 'do_link]>, " when rooms are built, or they can be linked later with the command ", <$format, ["link", [["node", "$help_cmd_dig"]], ["@dig"], 'do_link]>, ". Before you can link exits from a room you have to either manage the room you are building from, be trusted by it, or it has to be publicly extendable. You can create a disconnected room to start building from with the command:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["@dig My New Room"], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Which will create a new place with the name ", <$format, ["i", [], ["My New Room"], 'do_i]>, ". Otherwise, you may need to contact the manager of a room you wish to build from. ", <$format, ["np", [], [], 'do_np]>, "For generic building the command ", <$format, ["link", [["node", "$help_cmd_build"]], ["@build"], 'do_link]>, " is a good starting point. It will give explanations at each step as it prompts you for what is needed (to begin building just type ", <$format, ["tt", [], ["@build"], 'do_tt]>, ")."], #[['this, $help_places_exen]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "Entrances and Exits to a place are either created with the command ", <$format, ["link", [["node", "$help_cmd_build"]], ["@build"], 'do_link]>, " when rooms are built, or they can be linked later with the command ", <$format, ["link", [["node", "$help_cmd_dig"]], ["@dig"], 'do_link]>, ". Before you can link exits from a room you have to either manage the room you are building from, be trusted by it, or it has to be publicly extendable. You can create a disconnected room to start building from with the command:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["@dig My New Room"], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Which will create a new place with the name ", <$format, ["i", [], ["My New Room"], 'do_i]>, ". Otherwise, you may need to contact the manager of a room you wish to build from. ", <$format, ["np", [], [], 'do_np]>, "For generic building the command ", <$format, ["link", [["node", "$help_cmd_build"]], ["@build"], 'do_link]>, " is a good starting point. It will give explanations at each step as it prompts you for what is needed (to begin building just type ", <$format, ["tt", [], ["@build"], 'do_tt]>, ")."], #[['links, #[["@build", "$help_cmd_build"], ["@dig", "$help_cmd_dig"]]]]]>; var $help_node index = $help_index_core; var $help_node links = #[["@build", $help_cmd_build], ["@dig", $help_cmd_dig]]; var $help_node nolist = 0; diff -rwu src-3.0a7/help_places_realms.cdc ColdCore-3.0a9.02/src/help_places_realms.cdc --- src-3.0a7/help_places_realms.cdc Sat Aug 9 19:09:35 1997 +++ ColdCore-3.0a9.02/src/help_places_realms.cdc Tue Aug 19 12:15:22 1997 @@ -2,9 +2,9 @@ new object $help_places_realms: $help_build_places; var $has_name name = ['prop, "Realms", "Realms"]; -var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "Realms are used to group places, and can exist in a heirarchy structure. For instance, all rooms within a building would exist within one realm for that building, and that realm would exist within a realm for that sector of the city, which exists within a realm for the entire city. Realms are useful not only for grouping, but also for events and searching. When an event occurs it can be broadcast to the entire realm, rather than just to the local room. ", <$format, ["np", [], [], 'do_np]>, "New realms are created with the command ", <$format, ["link", [["node", "$help_cmd_new"]], ["@new"], 'do_link]>, ", such as:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["@new $realm named the Clocktower"], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "When creating a realm make sure to create it from the right parent, so as to keep the heirarchy intact. For instance, the above realm might be better spawned from a realm for the city."], #[['this, $help_places_realms]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "Realms are used to group places, and can exist in a heirarchy structure. For instance, all rooms within a building would exist within one realm for that building, and that realm would exist within a realm for that sector of the city, which exists within a realm for the entire city. Realms are useful not only for grouping, but also for events and searching. When an event occurs it can be broadcast to the entire realm, rather than just to the local room. ", <$format, ["np", [], [], 'do_np]>, "New realms are created with the command ", <$format, ["link", [["node", "$help_cmd_spawn"]], ["@spawn"], 'do_link]>, ", such as:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["@spawn $realm named the Clocktower"], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "When creating a realm make sure to create it from the right parent, so as to keep the heirarchy intact. For instance, the above realm might be better spawned from a realm for the city. ", <$format, ["np", [], [], 'do_np]>, "Realms keep track of all the rooms they contain. When room is created or destroyed, its realm is updated accordingly. You can change the room's realm using its :realm ", <$format, ["link", [["node", "$help_interface_settings"]], ["setting"], 'do_link]>, ". ", <$format, ["np", [], [], 'do_np]>, "Realms also keep track of realm properties. You can add your own realm property as you would add any other setting, but make sure that +get method is set to get_realm_setting (read ", <$format, ["link", [["node", "$help_cmd_addsetting"]], ["@add-setting"], 'do_link]>, " helpnode for information about this). Realm properties have special inheritance scheme: rooms inherit them from their realm, and realms inherit it from their parents. There are two default realm properties: propagate, which controls propagation mask from the parent realm, and weather-time, which sets the weather and time for the realm. ", <$format, ["np", [], [], 'do_np]>, "You can announce a message to all the players in a realm using realm_announce method on the realm object. Note that it will be propagated using the propagantion masks."], #[['links, #[["@spawn", "$help_cmd_spawn"], ["setting", "$help_interface_settings"], ["@add-setting", "$help_cmd_addsetting"]]]]]>; var $help_node index = $help_index_core; -var $help_node links = #[["@new", $help_cmd_new]]; +var $help_node links = #[["@spawn", $help_cmd_spawn], ["setting", $help_interface_settings], ["@add-setting", $help_cmd_addsetting]]; var $help_node nolist = 0; var $root created_on = 856037606; var $root flags = ['variables, 'methods, 'code, 'core]; diff -rwu src-3.0a7/help_prog.cdc ColdCore-3.0a9.02/src/help_prog.cdc --- src-3.0a7/help_prog.cdc Sat Aug 9 19:09:35 1997 +++ ColdCore-3.0a9.02/src/help_prog.cdc Tue Aug 19 12:15:22 1997 @@ -6,12 +6,10 @@ var $help_node index = $help_index_core; var $help_node links = #[["OOP", $help_coldc_oop], ["ColdC", $help_coldc], ["Commands", $help_prog_commands]]; var $help_node nolist = 0; *var $root child_index = '-' help_prog.cdc var $root created_on = 846999513; var $root flags = ['variables, 'methods, 'code, 'core]; var $root inited = 1; var $root managed = [$help_prog]; var $root manager = $help_prog; -var $root owned = [$help_prog]; diff -rwu src-3.0a7/help_prog_commands.cdc ColdCore-3.0a9.02/src/help_prog_commands.cdc --- src-3.0a7/help_prog_commands.cdc Sat Aug 9 19:09:35 1997 +++ ColdCore-3.0a9.02/src/help_prog_commands.cdc Tue Aug 19 12:15:22 1997 @@ -11,6 +11,5 @@ var $root inited = 1; var $root managed = [$help_prog_commands]; var $root manager = $help_prog_commands; -var $root owned = [$help_prog_commands]; diff -rwu src-3.0a7/help_reference.cdc ColdCore-3.0a9.02/src/help_reference.cdc --- src-3.0a7/help_reference.cdc Sat Aug 9 19:09:44 1997 +++ ColdCore-3.0a9.02/src/help_reference.cdc Tue Aug 19 12:15:31 1997 @@ -11,6 +11,5 @@ var $root inited = 1; var $root managed = [$help_reference]; var $root manager = $help_reference; -var $root owned = [$help_reference]; diff -rwu src-3.0a7/help_security.cdc ColdCore-3.0a9.02/src/help_security.cdc --- src-3.0a7/help_security.cdc Sat Aug 9 19:09:34 1997 +++ ColdCore-3.0a9.02/src/help_security.cdc Tue Aug 19 12:15:22 1997 @@ -2,7 +2,7 @@ new object $help_security: $help_general; var $has_name name = ['prop, "Security", "Security"]; -var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "Security in the ColdCore is setup in a level structure, with each subsequent level encompasing the previous. All access is on a per-object basis, with the exception of the top level (System Level) which is globally encompassing. Basically, you can manage several objects, be a writer on a few more and a trustee on some others. User classes (i.e. builder, programmer, admin) are not associated with any security level, they exist simply to group commands and more powerful interfaces. The levels are:", <$format, ["p", [], [], 'do_p]>, <$format, ["table", [["cols", "20%,80%"]], [<$format, ["tr", [], [<$format, ["td", [], [<$format, ["b", [], ["System Level"], 'do_b]>], 'do_td]>, <$format, ["td", [], ["This level is the top level, encompassing administrators and system-level objects (such as ", <$format, ["tt", [], ["$root"], 'do_tt]>, " and ", <$format, ["tt", [], ["$sys"], 'do_tt]>, "). By default Administrators do not have this level enabled (it can be enabled each session with the command ", <$format, ["link", [["node", "$help_cmd_mojo"]], ["@mojo"], 'do_link]>, ")."], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["b", [], ["Manager Level"], 'do_b]>], 'do_td]>, <$format, ["td", [], ["Every object has a manager. The manager has full permissions on the specific object. Quota usage is also based off the object Manager."], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["b", [], ["Writer Level"], 'do_b]>], 'do_td]>, <$format, ["td", [], ["An object can have any number of writers. Writer Level permissions give full access to an object, with a few exceptions:", <$format, ["ul", [], [<$format, ["li", [], ["Writers cannot change any access permissions on an object (this includes adding other writers or changing the Manager)."], 'do_li]>, <$format, ["li", [], ["Writers cannot change the object's parents."], 'do_li]>], 'do_ul]>], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["b", [], ["Trustee Level"], 'do_b]>], 'do_td]>, <$format, ["td", [], ["An object trustee is simply another object that is trusted more than random objects but less than a writer. The amount of access given depends upon the subsystem. For instance, adding a user as a trustee to a location they are not a Manager or Writer of will give them the ability to extend other rooms from it."], 'do_td]>], 'do_tr]>], 'do_table]>], #[['this, $help_security]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "Security in the ColdCore is setup in a level structure, with each subsequent level encompasing the previous. All access is on a per-object basis, with the exception of the top level (System Level) which is globally encompassing. Basically, you can manage several objects, be a writer on a few more and a trustee on some others. User classes (i.e. builder, programmer, admin) are not associated with any security level, they exist simply to group commands and more powerful interfaces. The levels are:", <$format, ["p", [], [], 'do_p]>, <$format, ["table", [["cols", "20%,80%"]], [<$format, ["tr", [], [<$format, ["td", [], [<$format, ["b", [], ["System Level"], 'do_b]>], 'do_td]>, <$format, ["td", [], ["This level is the top level, encompassing administrators and system-level objects (such as ", <$format, ["tt", [], ["$root"], 'do_tt]>, " and ", <$format, ["tt", [], ["$sys"], 'do_tt]>, "). By default Administrators do not have this level enabled (it can be enabled each session with the command ", <$format, ["link", [["node", "$help_cmd_mojo"]], ["@mojo"], 'do_link]>, ")."], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["b", [], ["Manager Level"], 'do_b]>], 'do_td]>, <$format, ["td", [], ["Every object has a manager. The manager has full permissions on the specific object. Quota usage is also based off the object Manager."], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["b", [], ["Writer Level"], 'do_b]>], 'do_td]>, <$format, ["td", [], ["An object can have any number of writers. Writer Level permissions give full access to an object, with a few exceptions:", <$format, ["ul", [], [<$format, ["li", [], ["Writers cannot change any access permissions on an object (this includes adding other writers or changing the Manager)."], 'do_li]>, <$format, ["li", [], ["Writers cannot change the object's parents."], 'do_li]>, <$format, ["li", [], ["Writers cannot destroy the object."], 'do_li]>], 'do_ul]>], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["b", [], ["Trustee Level"], 'do_b]>], 'do_td]>, <$format, ["td", [], ["An object trustee is simply another object that is trusted more than random objects but less than a writer. The amount of access given depends upon the subsystem. For instance, adding a user as a trustee to a location they are not a Manager or Writer of will give them the ability to extend other rooms from it."], 'do_td]>], 'do_tr]>], 'do_table]>], #[['links, #[["@mojo", "$help_cmd_mojo"]]]]]>; var $help_node index = $help_index_core; var $help_node links = #[["@mojo", $help_cmd_mojo]]; var $help_node nolist = 0; diff -rwu src-3.0a7/help_sys_channels.cdc ColdCore-3.0a9.02/src/help_sys_channels.cdc --- src-3.0a7/help_sys_channels.cdc Sat Aug 9 19:09:44 1997 +++ ColdCore-3.0a9.02/src/help_sys_channels.cdc Tue Aug 19 12:15:34 1997 @@ -1,8 +1,9 @@ -new object $help_sys_channels: $help_core; +new object $help_sys_channels: $help_sys; var $has_name name = ['prop, "Channels", "Channels"]; var $help_node body = <$ctext_frob, [["Channels are a global way to communicate with other users. Commands available for using channels:", <$format, ["dl", [], [<$format, ["dt", [], [<$format, ["subj", [["level", "3"]], [<$format, ["tt", [], ["@addcom <alias>=<channel>"], 'do_tt]>], 'do_subj]>], 'do_dt]>, <$format, ["dd", [], ["Adds a channel alias to a channel <channel>. Provides a shortcut way of referring to a channel. For example, typing '@addcom pub=Public' will create a shortcut called 'pub' which refers to the [Public] channel."], 'do_dd]>, <$format, ["dt", [], [<$format, ["subj", [["level", "3"]], [<$format, ["tt", [], ["@delcom <alias>"], 'do_tt]>], 'do_subj]>], 'do_dt]>, <$format, ["dd", [], ["@delcom <alias> deletes your alias for the given channel."], 'do_dd]>, <$format, ["dt", [], [<$format, ["subj", [["level", "3"]], [<$format, ["tt", [], ["@channels"], 'do_tt]>], 'do_subj]>], 'do_dt]>, <$format, ["dd", [], ["Show all of the channel aliases and their channels you have defined (this list is only applicable to you)."], 'do_dd]>, <$format, ["dt", [], [<$format, ["subj", [["level", "3"]], [<$format, ["tt", [], ["<channel alias> <msg>"], 'do_tt]>], 'do_subj]>], 'do_dt]>, <$format, ["dd", [], ["Used to speak on a channel. If the channel [Public] has the alias 'pub', you can send a message to it with the command 'pub Hi!'. Similarly, emotes work as well with 'pub :waves'"], 'do_dd]>, <$format, ["dt", [], [<$format, ["subj", [["level", "3"]], [<$format, ["tt", [], ["<channel alias> on"], 'do_tt]>], 'do_subj]>], 'do_dt]>, <$format, ["dd", [], ["Used to turn on a channel. Typing '<alias> on' will turn on the channel specified by <alias>, such as 'pub'. When a channel is turned on, you listen and receive messages from anyone chantting on that channel."], 'do_dd]>, <$format, ["dt", [], [<$format, ["subj", [["level", "3"]], [<$format, ["tt", [], ["<channel alias> off"], 'do_tt]>], 'do_subj]>], 'do_dt]>, <$format, ["dd", [], ["Used to leave a channel."], 'do_dd]>, <$format, ["dt", [], [<$format, ["subj", [["level", "3"]], [<$format, ["tt", [], ["<channel alias> who"], 'do_tt]>], 'do_subj]>], 'do_dt]>, <$format, ["dd", [], ["Used to determine who is listening to a given channel. Typing '<alias> who' will provide a listing of users currently listening. For example, 'pub who' will list the users chatting or idling on the public channel, from the example above."], 'do_dd]>], 'do_dl]>], #[['this, $help_sys_channels]]]>; +var $help_node group = 1; var $help_node index = $help_index_subsystem; var $help_node links = #[]; var $help_node nolist = 0; @@ -11,6 +12,5 @@ var $root inited = 1; var $root managed = [$help_sys_channels]; var $root manager = $help_sys_channels; -var $root owned = [$help_sys_channels]; diff -rwu src-3.0a7/help_sys_editor.cdc ColdCore-3.0a9.02/src/help_sys_editor.cdc --- src-3.0a7/help_sys_editor.cdc Sat Aug 9 19:09:44 1997 +++ ColdCore-3.0a9.02/src/help_sys_editor.cdc Tue Aug 19 12:15:34 1997 @@ -1,17 +1,16 @@ -new object $help_sys_editor: $help_core; +new object $help_sys_editor: $help_sys; var $has_name name = ['prop, "Editor", "Editor"]; var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "The ColdCore Editor is an integrated system, giving the ability to to edit methods or other data through a builtin line editor or by using your own local editor through MCP. Local editing is controlled through the local-editor setting (it can be set to either ", <$format, ["tt", [], ["none"], 'do_tt]>, " or ", <$format, ["tt", [], ["mcp"], 'do_tt]>, ", such as: ", <$format, ["tt", [], ["@set local-editor=mcp"], 'do_tt]>, "). Each user may have multiple editor sessions. Any coldcore system can create editor session for a user.", <$format, ["p", [], [], 'do_p]>, <$format, ["dl", [["columned", 1]], [<$format, ["dt", [], [<$format, ["link", [["node", "$help_node_editor_invoking"]], ["Invoking"], 'do_link]>], 'do_dt]>, <$format, ["dd", [], ["Comamnds used to invoke the editor"], 'do_dd]>, <$format, ["dt", [], [<$format, ["link", [["node", "$help_node_editor_commands"]], ["Commands"], 'do_link]>], 'do_dt]>, <$format, ["dd", [], ["Editor commands"], 'do_dd]>, <$format, ["dt", [], [<$format, ["link", [["node", "$help_node_editor_programming"]], ["Programming"], 'do_link]>], 'do_dt]>, <$format, ["dd", [], ["Editor: The Programmer's view"], 'do_dd]>], 'do_dl]>], #[['this, $help_sys_editor]]]>; +var $help_node group = 1; var $help_node index = $help_index_subsystem; var $help_node links = #[["Invoking", $help_node_editor_invoking], ["Commands", $help_node_editor_commands], ["Programming", $help_node_editor_programming]]; var $help_node nolist = 0; *var $root child_index = '-' help_sys_editor.cdc var $root created_on = 840585945; var $root flags = ['variables, 'methods, 'code, 'core]; var $root inited = 1; var $root managed = [$help_sys_editor]; var $root manager = $help_sys_editor; -var $root owned = [$help_sys_editor]; diff -rwu src-3.0a7/help_sys_events.cdc ColdCore-3.0a9.02/src/help_sys_events.cdc --- src-3.0a7/help_sys_events.cdc Sat Aug 9 19:09:44 1997 +++ ColdCore-3.0a9.02/src/help_sys_events.cdc Tue Aug 19 12:15:34 1997 @@ -1,11 +1,11 @@ -new object $help_sys_events: $help_core; +new object $help_sys_events: $help_sys; var $has_name name = ['prop, "Events", "Events"]; -var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "Events and Event Hooks allow objects to be notified of changes in their environment. They do this by selectively hooking into known events, such as movement and social interaction events. When the event occurs all objects which have hooked into it will be notified. ", <$format, ["p", [], [], 'do_p]>, "The following methods are defined on $event_handler. ", <$format, ["subj", [["level", "3"]], ["Event Hook Management"], 'do_subj]>, " ", <$format, ["table", [["cols", "35%,65%"]], [<$format, ["tr", [], [<$format, ["td", [], [".clear_event_hook(event)"], 'do_td]>, <$format, ["td", [], ["Unhook all objects from an event."], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [".event_hooks()"], 'do_td]>, <$format, ["td", [], ["Return a list of all current event hooks."], 'do_td]>], 'do_tr]>], 'do_table]>, " ", <$format, ["subj", [["level", "3"]], ["Hooking Events"], 'do_subj]>, " ", <$format, ["table", [["cols", "35%,65%"]], [<$format, ["tr", [], [<$format, ["td", [], [".hook_into_event(event)"], 'do_td]>, <$format, ["td", [], ["Hook into the specified event."], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [".unhook_from_event(event)"], 'do_td]>, <$format, ["td", [], ["Unhook from the specified event."], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [".unhook_from_all()"], 'do_td]>, <$format, ["td", [], ["Unhook from all events on the object."], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [".will_hook(event, object)"], 'do_td]>, <$format, ["td", [], ["Called by .hook_into_event() as a permissions check before adding an object to an event hook (pre-processing)."], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [".did_hook(event, object)"], 'do_td]>, <$format, ["td", [], ["Called after an object is hooked into an event (post-processing)."], 'do_td]>], 'do_tr]>], 'do_table]>, " ", <$format, ["subj", [["level", "3"]], ["Sending Events"], 'do_subj]>, " ", <$format, ["table", [["cols", "35%,65%"]], [<$format, ["tr", [], [<$format, ["td", [], [".send_event(event, [args])"], 'do_td]>, <$format, ["td", [], ["Notify all hooked objects that the event has occurred."], 'do_td]>], 'do_tr]>], 'do_table]>, " ", <$format, ["subj", [["level", "3"]], ["Receiving Events"], 'do_subj]>, " ", <$format, ["table", [["cols", "45%,55%"]], [<$format, ["tr", [], [<$format, ["td", [], [".event_notify(event, obj, [args])"], 'do_td]>, <$format, ["td", [], ["Notification of the event caused by 'obj'."], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [".event_hook_removed(event)"], 'do_td]>, <$format, ["td", [], ["Notification when an event hook definition is removed from an object (object is sender())."], 'do_td]>], 'do_tr]>], 'do_table]>, " ", <$format, ["subj", [["level", "3"]], ["Currently Known Events"], 'do_subj]>, " ", <$format, ["dl", [], [<$format, ["dt", [], ["$location events:"], 'do_dt]>, <$format, ["dd", [], [<$format, ["dl", [], [<$format, ["dt", [], ["'movement"], 'do_dt]>, <$format, ["dd", [], ["Occurs whenever an object moves into or from the location. Use is restricted to objects in the current environment. A single symbol is sent as an additional argument specifying 'arrive or 'leave."], 'do_dd]>, <$format, ["dt", [], ["'user_connect"], 'do_dt]>, <$format, ["dd", [], ["Occurs whenever a user logs in or out of the system and they are located in the room. Use is restricted to objects in the current environment. A single symbol is sent as an additional argument specifying 'login or 'logout."], 'do_dd]>], 'do_dl]>, " "], 'do_dd]>, <$format, ["dt", [], ["$body events:"], 'do_dt]>, <$format, ["dd", [], [<$format, ["dl", [], [<$format, ["dt", [], ["'social"], 'do_dt]>, <$format, ["dd", [], ["Occurs whenever social interaction is directed at the target body."], 'do_dd]>], 'do_dl]>, " "], 'do_dd]>], 'do_dl]>], #[['this, $help_sys_events]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "The Event System allows objects to be notified of changes in their environment. They do this by selectively hooking into known events, such as movement and social interaction events. When the event occurs all objects which have hooked into it will be notified. ", <$format, ["np", [], [], 'do_np]>, "The Event System is actually several subsystems all handled through the same parent object--this will often cause confusion. In general, the only subsystem most people will be interested with is the Registering ability of hooks. However, all of the subsystems are: Registering, Hooking, Sending/Receiving. ", <$format, ["np", [], [], 'do_np]>, "The Registering subsystem allows an object to register an event hook along with when it should be turned on/off and when it should be updated (such as when the object is moved). The Hooking subsystem deals with whether the object receives an event or not (the object must be hooked into an event to receive it). The Sending/Receiving subsystem deals with the initial and final stages of sending and receiving events. In general, a programmer is only interested in the Registering and Sending/Receiving subsystems (as Hooking is handled automatically once an event is Registered). ", <$format, ["np", [], [], 'do_np]>, "See Also:", <$format, ["p", [], [], 'do_p]>, <$format, ["ul", [], [<$format, ["li", [], [<$format, ["link", [["node", "$help_sys_event_register"]], ["Registering"], 'do_link]>, " Events"], 'do_li]>, <$format, ["li", [], [<$format, ["link", [["node", "$help_sys_event_hook"]], ["Hooking"], 'do_link]>, " Events"], 'do_li]>, <$format, ["li", [], [<$format, ["link", [["node", "$help_sys_event_send"]], ["Sending"], 'do_link]>, " Events"], 'do_li]>, <$format, ["li", [], [<$format, ["link", [["node", "$help_sys_event_recv"]], ["Receiving"], 'do_link]>, " Events"], 'do_li]>], 'do_ul]>], #[['links, #[["Registering", "$help_sys_event_register"], ["Hooking", "$help_sys_event_hook"], ["Sending", "$help_sys_event_send"], ["Receiving", "$help_sys_event_recv"]]]]]>; var $help_node group = 1; var $help_node index = $help_index_subsystem; -var $help_node links = #[]; +var $help_node links = #[["Registering", $help_sys_event_register], ["Hooking", $help_sys_event_hook], ["Sending", $help_sys_event_send], ["Receiving", $help_sys_event_recv]]; var $help_node nolist = 0; var $root created_on = 850790348; var $root flags = ['variables, 'methods, 'code, 'core]; diff -rwu src-3.0a7/help_sys_message.cdc ColdCore-3.0a9.02/src/help_sys_message.cdc --- src-3.0a7/help_sys_message.cdc Sat Aug 9 19:09:45 1997 +++ ColdCore-3.0a9.02/src/help_sys_message.cdc Tue Aug 19 12:15:35 1997 @@ -1,11 +1,11 @@ -new object $help_sys_message: $help_core, $help_cmds; +new object $help_sys_message: $help_sys; var $has_name name = ['prop, "Messages", "Messages"]; -var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "The message system is used to group several different Ctext messages under a specific message type for single evaluation. A message is composed of a base and any number of branches. The branches define each specific variation on the message, such as with teleport messages--there is the actor's message, the source message and the destination message. This message's base is \"teleport\" with the branches of \"actor\", \"source\" and \"dest\". By default if no branch is specified, the \"general\" branch is used instead (so referencing a message with no branch, and with the \"general\" branch are equivalent).", <$format, ["p", [], [], 'do_p]>, <$format, ["ul", [], [<$format, ["li", [], [<$format, ["link", [["node", "$help_cmd_msg"]], ["Setting Messages"], 'do_link]>], 'do_li]>, <$format, ["li", [], [<$format, ["link", [["node", "$help_cmd_defmsg"]], ["Defining Messages"], 'do_link]>], 'do_li]>, <$format, ["li", [], [<$format, ["link", [["node", "$help_msg_coldc"]], ["ColdC Message Interface"], 'do_link]>], 'do_li]>], 'do_ul]>], #[['links, #[["Setting Messages", "$help_cmd_msg"], ["Defining Messages", "$help_cmd_defmsg"], ["ColdC Message Interface", "$help_msg_coldc"]]]]]>; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "The message system is used to group several different Ctext messages under a specific message type for single evaluation. A message is composed of a base and any number of branches. The branches define each specific variation on the message, such as with teleport messages--there is the actor's message, the source message and the destination message. This message's base is \"teleport\" with the branches of \"actor\", \"source\" and \"dest\". By default if no branch is specified, the \"general\" branch is used instead (so referencing a message with no branch, and with the \"general\" branch are equivalent).", <$format, ["p", [], [], 'do_p]>, <$format, ["ul", [], [<$format, ["li", [], [<$format, ["link", [["node", "$help_cmd_msg"]], ["Setting Messages"], 'do_link]>], 'do_li]>, <$format, ["li", [], [<$format, ["link", [["node", "$help_cmd_defmsg"]], ["Defining Messages"], 'do_link]>], 'do_li]>, <$format, ["li", [], [<$format, ["link", [["node", "$help_msg_coldc"]], ["ColdC Message Interface"], 'do_link]>], 'do_li]>, <$format, ["li", [], [<$format, ["link", [["node", "$help_msg_prop"]], ["Message Propagation"], 'do_link]>], 'do_li]>], 'do_ul]>], #[['links, #[["Setting Messages", "$help_cmd_msg"], ["Defining Messages", "$help_cmd_defmsg"], ["ColdC Message Interface", "$help_msg_coldc"], ["Message Propagation", "$help_msg_prop"]]]]]>; +var $help_node group = 1; var $help_node index = $help_index_subsystem; -var $help_node links = #[["Setting Messages", $help_cmd_msg], ["Defining Messages", $help_cmd_defmsg], ["ColdC Message Interface", $help_msg_coldc]]; *var $root child_index = '-' help_sys_message.cdc +var $help_node links = #[["Setting Messages", $help_cmd_msg], ["Defining Messages", $help_cmd_defmsg], ["ColdC Message Interface", $help_msg_coldc], ["Message Propagation", $help_msg_prop]]; var $root created_on = 856117169; var $root flags = ['variables, 'methods, 'code, 'core]; var $root inited = 1; diff -rwu src-3.0a7/help_sys_word.cdc ColdCore-3.0a9.02/src/help_sys_word.cdc --- src-3.0a7/help_sys_word.cdc Sat Aug 9 19:09:46 1997 +++ ColdCore-3.0a9.02/src/help_sys_word.cdc Tue Aug 19 12:15:35 1997 @@ -1,8 +1,9 @@ -new object $help_sys_word: $help_core; +new object $help_sys_word: $help_sys; var $has_name name = ['prop, "Word Generator", "Word Generator"]; var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "This random word generator uses syllables and word patterns, and is inspired by a similar generator written by Ross Smith (Infact, the Lovecraftian dictionary came from his generator). ", <$format, ["np", [], [], 'do_np]>, "The generator uses different patterns to generate the word, where each pattern has a chance of being chosen. First is the number of syllables in a word. Once the syllables are chosen a syllable pattern is selected for each syllable. From the syllable pattern vowel or consanant patterns are chosen. It is possible to use two dictionaries for consanants, so as to have 'first' and 'last' consanant patterns. The syllable pattern must be composed of either V (vowel), C (consanant), or LC (last consanant) tokens seperated by dashes, such as:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["C-V-LC"], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Which would imply the syllable pattern of a Consanant-Vowel-Last Consanant. ", <$format, ["np", [], [], 'do_np]>, "The various patterns are defined by submitting a configuration to the word generator object (spawn $word for your own generator). This can be done with the simple evaluation command (which will prompt you for the configuration lines):", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], [";$my_word.submit_chances(.read())"], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "You can also list the configuration with:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], [";.tell($my_word.format_chances())"], 'do_dfn]>, " ", <$format, ["subj", [["level", "3"]], ["Configuration"], 'do_subj]>, <$format, ["p", [], [], 'do_p]>, "The configuration takes one pattern and chance per line, with an optional comment character of \"#\" which is discarded. The pattern must begin with a directive designating the pattern. Directives can be any of: ", <$format, ["dfn", [["ind", "4"], ["nobound", 1]], [<$format, ["table", [["cols", "10%,90%"]], [<$format, ["tr", [], [<$format, ["td", [], ["S"], 'do_td]>, <$format, ["td", [], ["Number of Syllables"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], ["SP"], 'do_td]>, <$format, ["td", [], ["Syllable Patterns"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], ["C"], 'do_td]>, <$format, ["td", [], ["Consanants"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], ["LC"], 'do_td]>, <$format, ["td", [], ["Last Consanants"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], ["V"], 'do_td]>, <$format, ["td", [], ["Vowels"], 'do_td]>], 'do_tr]>], 'do_table]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "There is no limit to the amount of patterns submitted. A very simple configuration would be: ", <$format, ["dfn", [], [<$format, ["quote", [], ["\nS 2 3\nS 3 1\n\nSP V 2\nSP V-C 4\nSP C-V 2\n\nV a 10\nV e 10\nV i 10\n\nFC th 1\nFC b 4\nFC f 4\nFC qu 1\n\nLC bh 1\nLC d 4\nLC b 4"], 'do_quote]>], 'do_dfn]>], #[['this, $help_sys_word]]]>; +var $help_node group = 1; var $help_node index = $help_index_subsystem; var $help_node links = #[]; var $help_node nolist = 0; diff -rwu src-3.0a7/help_theme.cdc ColdCore-3.0a9.02/src/help_theme.cdc --- src-3.0a7/help_theme.cdc Sat Aug 9 19:09:35 1997 +++ ColdCore-3.0a9.02/src/help_theme.cdc Tue Aug 19 12:15:22 1997 @@ -2,7 +2,7 @@ new object $help_theme: $help_building; var $has_name name = ['prop, "Theme", "Theme"]; -var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "The Cold Dark has two primary realms, each with their own theme. ", <$format, ["dl", [], [<$format, ["dt", [], [<$format, ["subj", [["level", "2"]], ["Taobh Thiar"], 'do_subj]>], 'do_dt]>, <$format, ["dd", [], ["Taobh Thiar [tave theer] is Gaelic for 'Beyond'. This realm is pretty much free-form, assuming you can get permission from a local area's managers to link into it."], 'do_dd]>, <$format, ["dt", [], [<$format, ["subj", [["level", "2"]], ["En Requiem"], 'do_subj]>], 'do_dt]>, <$format, ["dd", [], ["En Requiem is a realm of Fantasy and Technology. More information on it can be found on the World Wide Web at: ", <$format, ["p", [], [], 'do_p]>, " ", <$format, ["dfn", [], ["http://www.cold.org/EnRequiem/"], 'do_dfn]>, " ", <$format, ["p", [], [], 'do_p]>, "Contact Brandon for information on building in En Requiem."], 'do_dd]>], 'do_dl]>], #[['this, $help_theme]]]>; +var $help_node body = <$ctext_frob, [["This node needs to be written, use @help-list and @help-write"], #[]]>; var $help_node index = $help_index_core; var $help_node links = #[]; var $help_node nolist = 0; @@ -11,12 +11,9 @@ var $root inited = 1; var $root managed = [$help_theme]; var $root manager = $help_theme; -var $root owned = [$help_theme]; root method .core_help_theme() { - new.set_body(["This node needs to be written, use @help-list and @help-write"]); - - // $#Edited: 03 Nov 96 16:03 $brandon + .set_body(["This node needs to be written, use @help-list and @help-write"]); }; diff -rwu src-3.0a7/help_ui.cdc ColdCore-3.0a9.02/src/help_ui.cdc --- src-3.0a7/help_ui.cdc Sat Aug 9 19:09:30 1997 +++ ColdCore-3.0a9.02/src/help_ui.cdc Tue Aug 19 12:15:18 1997 @@ -13,7 +13,6 @@ var $root inited = 1; var $root managed = [$help_ui]; var $root manager = $help_ui; -var $root owned = [$help_ui]; protected method ._back_help_node() { var pos; @@ -154,9 +153,6 @@ } } throw(~nonode, ("Unable to find link \"" + str) + "\"."); - - // $#Edited: 09 Nov 96 20:11 $brandon - // $#Moved 10 Nov 96 10:56 from $brandon.find_help_in_links() by $brandon }; public method .fmt_help_from() { @@ -168,7 +164,7 @@ name = (node.name()).word(1, "|"); c.write(["", name, "=" * strlen(name)]); if (!(node.holder())) - c.write($parse_lib.filter_ctext(node.body(), #[['formatter, $plaintext_format]])); + c.write($parse_lib.filter_ctext(node.body(), #[['formatter, $flat_format]])); } }; @@ -178,7 +174,7 @@ (> .perms(caller(), 'command) <); o = #[["?", ["h?istory"]], ["<", ["b?ack"]], [">", ["f?orward"]], ["!", ["fix"]], ["#", ["l?inks"]], ["^", ["u?p"]]]; - args = $parse_lib.getopt(args, o.values()); + args = $parse_lib.opt(args, o.values()); opt = args[2]; args = args[1]; if (!opt) { @@ -268,8 +264,6 @@ } .set_help_node(node); .tell_help_node(node); - - // $#Edited: 20 Jan 97 20:45 $brandon }; public method .help_index() { @@ -296,7 +290,9 @@ if ((str[1]) == "$") { node = (| $object_lib.to_dbref(str) |); - if ((!node) || ((!(node.has_ancestor($help_node))) && (!(| (node = node.help_node()).has_ancestor($help_node) |)))) + if (node && (node.help_node())) + node = node.help_node(); + else if ((!node) || (!(node.has_ancestor($help_node)))) throw(~nonode, ("\"" + str) + "\" is not a help node, and does not have a help node assigned to it."); return node; } @@ -316,6 +312,13 @@ if (!(node = (| i.match_begin(m[2]) |))) throw(~nonode, ((("Unable to find help on \"" + (m[2])) + "\" in the ") + (i.name())) + " index."); return node; + } + if ((m = regexp(str, " *([a-z][0-9a-z_]+)\( *\)"))) { + i = "help_func_" + (m[1]); + if ((node = (| lookup(tosym(i)) |))) + return node; + else + throw(~nonode, ("Unable to find help on function " + (m[1])) + "()"); } return (| .find_help_in_links(str) |) || ((| .find_help_in_group(str) |) || (> .find_help_in_index(str) <)); }; diff -rwu src-3.0a7/help_updates.cdc ColdCore-3.0a9.02/src/help_updates.cdc --- src-3.0a7/help_updates.cdc Sat Aug 9 19:09:44 1997 +++ ColdCore-3.0a9.02/src/help_updates.cdc Tue Aug 19 12:15:31 1997 @@ -2,14 +2,13 @@ new object $help_updates: $help_coldcore; var $has_name name = ['prop, "Updates", "Updates"]; -var $help_node body = <$ctext_frob, [[<$format, ["dl", [], [<$format, ["dt", [], ["19-Feb-1997"], 'do_dt]>, <$format, ["dd", [], [<$format, ["link", [["node", "$help_sys_word"]], ["Word"], 'do_link]>], 'do_dd]>, <$format, ["dt", [], ["20-Feb-1997"], 'do_dt]>, <$format, ["dd", [], [<$format, ["link", [["node", "$help_cmd_nh"]], ["@nh"], 'do_link]>, ", ", <$format, ["link", [["node", "$help_sys_weather_attributes"]], ["Attributes"], 'do_link]>, ", ", <$format, ["link", [["node", "$help_sys_climate"]], ["Climate"], 'do_link]>, " and ", <$format, ["link", [["node", "$help_sys_weather"]], ["Weather"], 'do_link]>], 'do_dd]>, <$format, ["dt", [], ["22-Feb-1997"], 'do_dt]>, <$format, ["dd", [], [<$format, ["link", [["node", "$help_cmd_ant"]], ["@ant"], 'do_link]>, ", ", <$format, ["link", [["node", "$help_cmd_dnt"]], ["@dnt"], 'do_link]>, ", ", <$format, ["link", [["node", "$help_cmd_remember"]], ["@remember"], 'do_link]>, ", ", <$format, ["link", [["node", "$help_cmd_rename"]], ["@rename"], 'do_link]>, ", ", <$format, ["link", [["node", "$help_appearance"]], ["Appearance"], 'do_link]>, ", ", <$format, ["link", [["node", "$help_building"]], ["Building"], 'do_link]>, ", ", <$format, ["link", [["node", "$help_app_desc"]], ["Description"], 'do_link]>, ", ", <$format, ["link", [["node", "$help_environment"]], ["Environment"], 'do_link]>, ", ", <$format, ["link", [["node", "$help_app_gender"]], ["Gender"], 'do_link]>, ", ", <$format, ["link", [["node", "$help_general"]], ["General"], 'do_link]>, ", ", <$format, ["link", [["node", "$help_app_names"]], ["Names"], 'do_link]>, " and ", <$format, ["link", [["node", "$help_app_wearing"]], ["Wearing"], 'do_link]>], 'do_dd]>, <$format, ["dt", [], ["25-Feb-1997"], 'do_dt]>, <$format, ["dd", [], [<$format, ["link", [["node", "$help_func_match_crypted"]], ["match_crypted()"], 'do_link]>], 'do_dd]>, <$format, ["dt", [], ["28-Feb-1997"], 'do_dt]>, <$format, ["dd", [], [<$format, ["link", [["node", "$help_cmd_describe"]], ["@describe"], 'do_link]>], 'do_dd]>, <$format, ["dt", [], ["2-Mar-1997"], 'do_dt]>, <$format, ["dd", [], [<$format, ["link", [["node", "$help_coldc_types_frobs"]], ["Frob"], 'do_link]>], 'do_dd]>, <$format, ["dt", [], ["5-Mar-1997"], 'do_dt]>, <$format, ["dd", [], [<$format, ["link", [["node", "$help_func_localtime"]], ["localtime()"], 'do_link]>], 'do_dd]>, <$format, ["dt", [], ["7-Mar-1997"], 'do_dt]>, <$format, ["dd", [], [<$format, ["link", [["node", "$help_sys_weather_attributes"]], ["Attributes"], 'do_link]>, " and ", <$format, ["link", [["node", "$help_weather_system"]], ["Weather"], 'do_link]>], 'do_dd]>, <$format, ["dt", [], ["8-Mar-1997"], 'do_dt]>, <$format, ["dd", [], [<$format, ["link", [["node", "$help_coldc_assign"]], ["Assignments"], 'do_link]>, ", ", <$format, ["link", [["node", "$help_coldc_default_assign"]], ["Default"], 'do_link]>, " and ", <$format, ["link", [["node", "$help_coldc_prec"]], ["Operator"], 'do_link]>], 'do_dd]>, <$format, ["dt", [], ["11-Mar-1997"], 'do_dt]>, <$format, ["dd", [], [<$format, ["link", [["node", "$help_mutex"]], ["Mutex"], 'do_link]>], 'do_dd]>, <$format, ["dt", [], ["14-Mar-1997"], 'do_dt]>, <$format, ["dd", [], [<$format, ["link", [["node", "$help_func_anticipate_assignment"]], ["anticipate_assignment()"], 'do_link]>, " and ", <$format, ["link", [["node", "$help_heap"]], ["Heap"], 'do_link]>], 'do_dd]>, <$format, ["dt", [], ["17-Mar-1997"], 'do_dt]>, <$format, ["dd", [], [<$format, ["link", [["node", "$help_coldc"]], ["ColdC"], 'do_link]>, ", ", <$format, ["link", [["node", "$help_cml_formatters"]], ["Formatters"], 'do_link]>, " and ", <$format, ["link", [["node", "$help_coldc_oop"]], ["Object"], 'do_link]>], 'do_dd]>, <$format, ["dt", [], ["18-Mar-1997"], 'do_dt]>, <$format, ["dd", [], [<$format, ["link", [["node", "$help_cmd_reap"]], ["@reap"], 'do_link]>, " and ", <$format, ["link", [["node", "$help_cmd_set"]], ["@set"], 'do_link]>], 'do_dd]>], 'do_dl]>], #[['this, $help_updates]]]>; +var $help_node body = <$ctext_frob, [[], #[]]>; var $help_node index = $help_index_subsystem; -var $help_node links = #[["Word", $help_sys_word], ["@nh", $help_cmd_nh], ["Attributes", $help_sys_weather_attributes], ["Climate", $help_sys_climate], ["Weather", $help_weather_system], ["@ant", $help_cmd_ant], ["@dnt", $help_cmd_dnt], ["@remember", $help_cmd_remember], ["@rename", $help_cmd_rename], ["Appearance", $help_appearance], ["Building", $help_building], ["Description", $help_app_desc], ["Environment", $help_environment], ["Gender", $help_app_gender], ["General", $help_general], ["Names", $help_app_names], ["Wearing", $help_app_wearing], ["match_crypted()", $help_func_match_crypted], ["@describe", $help_cmd_describe], ["Frob", $help_coldc_types_frobs], ["localtime()", $help_func_localtime], ["Assignments", $help_coldc_assign], ["Default", $help_coldc_default_assign], ["Operator", $help_coldc_prec], ["Mutex", $help_mutex], ["anticipate_assignment()", $help_func_anticipate_assignment], ["Heap", $help_heap], ["ColdC", $help_coldc], ["Formatters", $help_cml_formatters], ["Object", $help_coldc_oop], ["@reap", $help_cmd_reap], ["@set", $help_cmd_set]]; +var $help_node links = #[]; var $help_node nolist = 0; var $help_updates cleanup_time = 2592000; -var $help_updates dirty = 1; -var $help_updates update_list = [[856594800, [$help_environment, $help_building, $help_appearance, $help_general, $help_app_names, $help_app_desc, $help_app_gender, $help_app_wearing, $help_cmd_rename, $help_cmd_ant, $help_cmd_dnt, $help_cmd_remember]], [856854000, [$help_func_match_crypted]], [857113200, [$help_cmd_describe]], [857286000, [$help_coldc_types_frobs]], [857545200, [$help_func_localtime]], [857718000, [$help_sys_weather_attributes, $help_weather_system]], [857804400, [$help_coldc_prec, $help_coldc_default_assign, $help_coldc_assign]], [858063600, [$help_mutex]], [858322800, [$help_func_anticipate_assignment, $help_heap]], [858582000, [$help_coldc, $help_coldc_oop, $help_cml_formatters]], [858668400, [$help_cmd_reap, $help_cmd_set]], [859014000, [$help_sys_message]]]; *var $root child_index = '-' help_updates.cdc +var $help_updates dirty = 2; +var $help_updates update_list = [[871970400, [$help_theme]]]; var $root created_on = 848537316; var $root flags = ['variables, 'methods, 'code, 'core]; var $root inited = 1; @@ -27,8 +26,8 @@ } else { out = ["{dl:"]; for i in (update_list) { - j = map j in (i[2]) to ([j.small_name(), "" + j]).sort(); - out += [((("{dt:" + ($time.format("%v", i[1]))) + "}{dd:") + (map j in (j) to (strfmt("{link node=%l:%l}", j[2], j[1])).to_english())) + "}"]; + j = map j in (i[2]) to ([j.name(), "" + j]).sort(); + out += [((("{dt:" + ($time.format("%d-%b-%Y", i[1]))) + "}{dd:") + (map j in (j) to (strfmt("{link node=%l:%l}", j[2], j[1])).to_english())) + "}"]; } out += ["}"]; } @@ -39,6 +38,12 @@ return body; }; +root method .core_help_updates() { + dirty = 1; + update_list = []; + .set_body([]); +}; + public method .touched() { var i, j, t; @@ -52,8 +57,6 @@ update_list += [[t, [sender()]]]; update_list = map i in (update_list || []) to ([i[1], filter j in (i[2]) where ((| j.has_ancestor($help_node) |))]); update_list = filter i in (update_list || []) where ((i[2]) && ((i[1]) > (t - cleanup_time))); - - // $#Edited: 14 Feb 97 02:01 $miro }; diff -rwu src-3.0a7/help_weather_system.cdc ColdCore-3.0a9.02/src/help_weather_system.cdc --- src-3.0a7/help_weather_system.cdc Sat Aug 9 19:09:46 1997 +++ ColdCore-3.0a9.02/src/help_weather_system.cdc Tue Aug 19 12:15:34 1997 @@ -1,8 +1,9 @@ -new object $help_weather_system: $help_core; +new object $help_weather_system: $help_obj; var $has_name name = ['prop, "Weather System", "Weather System"]; var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "ColdCore uses elaborate weather system, allowing the administrators to set realistic weathers and climates, described in great detail. The system is based on several objects, each keeping track of a facet of the weather:", <$format, ["dl", [], [<$format, ["dt", [], ["$world"], 'do_dt]>, <$format, ["dd", [], ["$world keeps the weather cycle, and calls the updates on realms."], 'do_dd]>, <$format, ["dt", [], ["$realm (and descendants)"], 'do_dt]>, <$format, ["dd", [], ["Children of $realm keep track of the current weather and season, as well as of VR timezones."], 'do_dd]>, <$format, ["dt", [], [<$format, ["link", [["node", "$help_sys_climate"]], ["$climate (and descendants)"], 'do_link]>], 'do_dt]>, <$format, ["dd", [], ["$climate keeps the season names for each part of the year, and lists of weathers that may occur in that climate."], 'do_dd]>, <$format, ["dt", [], [<$format, ["link", [["node", "$help_sys_weather"]], ["$weather (and descendants)"], 'do_link]>], 'do_dt]>, <$format, ["dd", [], ["Weather objects contain weather descriptions, messages and attributes. Attributes are the most important, since they can be used to fork room descriptions to reflect conditions in the weather."], 'do_dd]>, <$format, ["dt", [], [<$format, ["link", [["node", "$help_sys_weather_attributes"]], ["$weather_attributes"], 'do_link]>], 'do_dt]>, <$format, ["dd", [], ["This object is a database of all the available weather attributes."], 'do_dd]>], 'do_dl]>, <$format, ["p", [], [], 'do_p]>, "When changing the weather, the system will pay attention to differences between weather attributes (so it'll be unlikely that a storm will start a moment after the sun shining), seasonal ratings, and inter-realm dependancies. ", <$format, ["np", [], [], 'do_np]>, "Follow the links in the list above to read more about the system."], #[['this, $help_weather_system]]]>; +var $help_node group = 1; var $help_node index = $help_index_core; var $help_node links = #[["$climate (and descendants)", $help_sys_climate], ["$weather (and descendants)", $help_sys_weather], ["$weather_attributes", $help_sys_weather_attributes]]; var $help_node nolist = 0; diff -rwu src-3.0a7/housekeeper.cdc ColdCore-3.0a9.02/src/housekeeper.cdc --- src-3.0a7/housekeeper.cdc Sat Aug 9 19:09:48 1997 +++ ColdCore-3.0a9.02/src/housekeeper.cdc Tue Aug 19 12:15:17 1997 @@ -6,7 +6,6 @@ var $root inited = 1; var $root managed = [$housekeeper]; var $root manager = $housekeeper; -var $root owned = [$housekeeper]; public method .did_disconnect() { var task_queue, task; diff -rwu src-3.0a7/html_format.cdc ColdCore-3.0a9.02/src/html_format.cdc --- src-3.0a7/html_format.cdc Sat Aug 9 19:09:48 1997 +++ ColdCore-3.0a9.02/src/html_format.cdc Tue Aug 19 12:15:17 1997 @@ -6,10 +6,9 @@ var $root inited = 1; var $root managed = [$html_format]; var $root manager = $html_format; -var $root owned = [$html_format]; public method ._eval_ctext() { - arg data, vars; + arg data, vars, @unexpand; var out, uflags, token; out = ""; @@ -25,7 +24,7 @@ if (type(token) == 'string) { out += token; } else { - [token, vars] = ._eval_ctext(token, vars); + [token, vars] = ._eval_ctext(token, vars, 1); out += token; } case $format: @@ -33,17 +32,15 @@ out += token; } case 'string: - out += token.to_html(); + out += unexpand ? token : (token.to_html()); case 'list: - [token, vars] = ._eval_ctext(token, vars); + [token, vars] = ._eval_ctext(token, vars, @unexpand); out += token; default: out += token; } } return [out, vars]; - - // $#Edited: 29 Nov 96 16:22 $miro }; public method .do_action() { @@ -52,8 +49,6 @@ [args, vars] = ._eval_ctext(args[1], vars); (| (vars['receiver]).register_action(args, vars['this], flags.getkey("token")) |); return [("\\" + args) + "\\", vars]; - - // $#Edited: 29 Nov 96 16:22 $miro }; public method .do_anchor() { @@ -61,8 +56,6 @@ [args, vars] = ._eval_ctext([args[1]], vars); return [[("/" + (args[1])) + "/"], vars]; - - // $#Edited: 29 Nov 96 16:22 $miro }; public method .do_b() { @@ -71,17 +64,30 @@ [args, vars] = ._eval_ctext(args, vars); return [("<b>" + args) + "</b>", vars]; - - // $#Edited: 29 Nov 96 16:22 $miro }; public method .do_br() { arg vars, flags, args; return ["\n<br>", vars]; +}; + +public method .do_columnize() { + arg vars, flags, args; + var cols, l, out, i; - // $#Edited: 20 Jul 96 12:28 $kahuna - // $#Edited: 20 Jul 96 16:46 $jenner + cols = (| flags.getkey("cols") |) || "*"; + [args, vars] = ._eval_ctext(args, vars); + out = "\n<table border=0>\n"; + while (args) { + if ((args.length()) > cols) + [l, args] = [args.subrange(1, cols), args.subrange(cols + 1)]; + else + [l, args] = [args, []]; + out += ("<tr><td>" + (l.join("</td><td>"))) + "</td></tr>\n"; + } + out += "</table>\n"; + return [out, vars]; }; public method .do_dd() { @@ -109,8 +115,6 @@ [args, vars] = ._eval_ctext(args, vars); return [("\n<blockquote>" + args) + "</blockquote>", vars]; - - // $#Edited: 29 Nov 96 16:22 $miro }; public method .do_dl() { @@ -147,17 +151,12 @@ [args, vars] = ._eval_ctext(args, vars); return [("<em>" + args) + "</em>", vars]; - - // $#Edited: 29 Nov 96 16:22 $miro }; public method .do_hr() { arg vars, flags, args; - return ["\n<hr>\n", vars]; - - // $#Edited: 20 Jul 96 12:28 $kahuna - // $#Edited: 20 Jul 96 16:46 $jenner + return ["\n<hr size=1 noshade>\n", vars]; }; public method .do_i() { @@ -166,17 +165,16 @@ [args, vars] = ._eval_ctext(args, vars); return [("<i>" + args) + "</i>", vars]; - - // $#Edited: 29 Nov 96 16:22 $miro }; -public method .do_img() { +public method .do_invoke() { arg vars, flags, args; - var src, html, alt; + var object, method, eacharg; - src = flags.getkey("src"); - alt = (| ("alt=\"" + (flags.getkey("alt"))) + "\"" |) || ""; - return [((("<img src=\"" + src) + "\" align=left hspace=10 ") + alt) + ">", vars]; + [args, vars] = ._eval_ctext(args, vars); + object = flags.getkey("object"); + method = flags.getkey("method"); + return [((((("<a href=\"/" + (object.subrange(2))) + "/") + method) + "\">") + args) + "</a>", vars]; }; public method .do_lh() { @@ -184,8 +182,6 @@ [args, vars] = ._eval_ctext(args, vars); return ["\n<lh>" + args, vars]; - - // $#Edited: 29 Nov 96 16:22 $miro }; public method .do_li() { @@ -193,8 +189,6 @@ [args, vars] = ._eval_ctext(args, vars); return ["\n<li>" + args, vars]; - - // $#Edited: 29 Nov 96 16:22 $miro }; public method .do_link() { @@ -206,8 +200,15 @@ if (node) return [((("<a href=\"/bin/help?node=" + node) + "\">") + args) + "</a>", vars]; return [">>ERROR: Invalid node<<", vars]; +}; + +public method .do_method() { + arg vars, flags, args; + var out, vars, m; - // $#Edited: 29 Nov 96 16:22 $miro + m = (flags[1])[1]; + [out, vars] = ._eval_ctext(args, vars); + return [((("<a href=\"/bin/method?target=" + m) + "\"><tt>") + out) + "</tt></a>", vars]; }; public method .do_np() { @@ -216,6 +217,29 @@ return ["\n<p>\n", vars]; }; +public method .do_obj() { + arg vars, flags, args; + var gateway, argname, context, object, name; + + context = flags.getkey("context"); + name = flags.getkey("name"); + object = args[1]; + + // nix this once we figure out why its not always staying a symbol + if (type(context) == 'string) + context = tosym(context); + switch (context) { + case 'look: + [gateway, argname] = ["describe", "target"]; + case 'display: + [gateway, argname] = ["display", "target"]; + case 'exit: + [gateway, argname] = ["describe", "target"]; + object = object.dest(); + } + return [((((((("<a href=\"/bin/" + gateway) + "?") + argname) + "=") + object) + "\">") + name) + "</a>", vars]; +}; + public method .do_ol() { arg vars, flags, args; var out, header, line, token; @@ -228,17 +252,12 @@ arg vars, flags, args; return ["\n<p>\n", vars]; - - // $#Edited: 20 Jul 96 12:28 $kahuna - // $#Edited: 20 Jul 96 16:46 $jenner }; public method .do_quote() { arg vars, flags, args; return [("<pre>" + ((((args[1]).replace("&", "&")).replace("<", "<")).replace(">", ">"))) + "</pre>", vars]; - - // $#Edited: 01 Aug 96 21:59 $jenner }; public method .do_subj() { @@ -262,8 +281,6 @@ vars = tcs ? (vars.add('table_cols, tcs)) : (vars.del('table_cols)); vars = tc ? (vars.add('table_col, tc)) : (vars.del('table_col)); return [("\n<table border=0>" + args) + "\n</table>\n", vars]; - - // $#Edited: 29 Nov 96 16:22 $miro }; public method .do_td() { @@ -308,8 +325,6 @@ vars = vars.add('table_col, 1); [args, vars] = ._eval_ctext(args, vars); return [("\n<tr>" + args) + "</tr>", vars]; - - // $#Edited: 29 Nov 96 16:22 $miro }; public method .do_tt() { @@ -318,8 +333,6 @@ [args, vars] = ._eval_ctext(args, vars); return [("<tt>" + args) + "</tt>", vars]; - - // $#Edited: 29 Nov 96 16:22 $miro }; public method .do_ul() { @@ -328,8 +341,6 @@ [args, vars] = ._eval_ctext(args, vars); return [("\n<ul>\n" + args) + "\n</ul>\n", vars]; - - // $#Edited: 29 Nov 96 16:22 $miro }; public method .do_web() { @@ -337,8 +348,6 @@ [args, vars] = ._eval_ctext([args[1]], vars); return [((((args + "<a href=\"") + (flags.getkey("src"))) + "\">") + (flags.getkey("name"))) + "</a>", vars]; - - // $#Edited: 29 Nov 96 16:22 $miro }; public method .eval_formatter() { @@ -355,19 +364,17 @@ form = (<$format, [form[1], form[2], text, form[4]]>); return [[form], vars]; } - - // $#Edited: 23 Jan 97 20:49 $miro - // $#Copied 29 Jan 97 00:55 from $formatter.eval_formatter() by $miro }; public method .format() { arg data, vars; var str, len, line, out; - str = (> (._eval_ctext(data, vars))[1] <); + str = (> (._eval_ctext(data, vars))[1] <) + "<br>"; + return str_to_buf(str + "\n"); if ((strlen(str) < 2) || (substr(str, strlen(str) - 1) != "\n")) str += "\n"; - return str_to_buf(str + "\n"); + return str_to_buf(str + "<br>"); }; diff -rwu src-3.0a7/http.cdc ColdCore-3.0a9.02/src/http.cdc --- src-3.0a7/http.cdc Sat Aug 9 19:09:29 1997 +++ ColdCore-3.0a9.02/src/http.cdc Tue Aug 19 12:15:16 1997 @@ -6,14 +6,12 @@ var $http gateways = #[["describe", "describe?target=the_pit"], ["see", "see?target=the_pit"], ["who", "who"], ["display", "display?target=http"], ["list_method", "list_method?target=%24http.list_method"], ["help", "help?node=help_coldcore"], ["object", "object?target=http"]]; var $http html_version = "text/html"; var $http http_methods = ["GET"]; -var $http page_body = "<body bgcolor=\"#ffffff\" text=\"#000000\" link=\"#130191\" vlink=\"#100040\" alink=\"#4000bf\">"; var $http page_head = []; var $root created_on = 796268969; var $root flags = ['methods, 'code, 'variables, 'core]; var $root inited = 1; var $root managed = [$http]; var $root manager = $http; -var $root owned = [$http]; public method ._show_header_objs() { arg objs, what; @@ -24,7 +22,7 @@ for o in (objs.subrange(2)) line += ", " + (.make_object_href(o)); line += "<br>"; - } else if (objs == 1) { + } else if ((objs.length()) == 1) { line = (("<b>" + what) + "</b>: ") + (.make_object_href(objs[1])); } else { line = ("<b>" + what) + "</b>: (none)<br>"; @@ -85,7 +83,7 @@ return [400, .response(400, "Must specify a target object")]; obj = (| $object_lib.to_dbref(obj) |) || (| $user_db.search(obj) |); if (!obj) - return [404, .response(404, ("Unable to find object \"" + (path[1])) + "\"")]; + return [404, .response(404, ("Unable to find object \"" + ((info['args])["target"])) + "\"")]; detail = (| (info['args])["detail"] |); if (detail) { detail = $http.decode(detail); @@ -297,8 +295,6 @@ args = args ? (args.join("")) : ""; return (((("<a href=\"/bin/display?target=" + (obj.objname())) + args) + "\">") + (obj.namef('xref))) + "</a>"; - - // $#Edited: 16 Jan 97 18:00 $brad }; public method .make_href() { diff -rwu src-3.0a7/http_connection.cdc ColdCore-3.0a9.02/src/http_connection.cdc --- src-3.0a7/http_connection.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/http_connection.cdc Tue Aug 19 12:15:36 1997 @@ -1,5 +1,5 @@ -new object $http_connection: $connection; +new object $http_connection: $inbound_connection; var $connection active = 0; var $connection buffer = `[27]; @@ -13,13 +13,11 @@ var $http_connection buffer = 0; var $http_connection line_buffer = 0; var $http_connection reading = 0; *var $root child_index = '-' http_connection.cdc var $root created_on = 809075134; var $root flags = ['methods, 'code, 'core, 'variables]; var $root inited = 1; var $root managed = [$http_connection]; var $root manager = $http_connection; -var $root owned = [$http_connection]; var $root quota_exempt = 1; public method .handle_POST_input() { diff -rwu src-3.0a7/http_daemon.cdc ColdCore-3.0a9.02/src/http_daemon.cdc --- src-3.0a7/http_daemon.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/http_daemon.cdc Tue Aug 19 12:15:36 1997 @@ -3,12 +3,49 @@ var $daemon connection = $http_connection; var $daemon current_port = 1180; -var $daemon default_port = 1180; +var $daemon listen = [[1180]]; +var $dmi_data descriptions = #[]; +var $http_daemon site_url = ""; var $root created_on = 809075222; -var $root flags = ['methods, 'code, 'core, 'variables]; +var $root flags = ['methods, 'code, 'variables, 'core]; var $root inited = 1; var $root managed = [$http_daemon]; var $root manager = $http_daemon; -var $root owned = [$http_daemon]; +var $root quota = 'exempt; +var $root quota_exempt = 1; + +protected method .figure_site_url() { + var host, curr, h, port; + + curr = .current_ports(); + if ((h = find h in (curr) where (listlen(h) == 2))) { + [port, host] = curr[h]; + host = $dns.hostname(host); + } else { + host = $dns.hostname(""); + port = (curr[1])[1]; + } + if (port != 80) + site_url = (host + ":") + port; + else + site_url = host; + return site_url; +}; + +public method .site_url() { + return site_url; +}; + +public method .start_listening() { + arg @args; + + (> pass(@args) <); + .figure_site_url(); +}; + +public method .stop_listening() { + site_url = ""; + (> pass() <); +}; diff -rwu src-3.0a7/http_interface.cdc ColdCore-3.0a9.02/src/http_interface.cdc --- src-3.0a7/http_interface.cdc Sat Aug 9 19:09:31 1997 +++ ColdCore-3.0a9.02/src/http_interface.cdc Tue Aug 19 12:15:35 1997 @@ -1,30 +1,50 @@ new object $http_interface: $connection_interface; +var $dmi_data descriptions = #[]; var $has_commands local = #[]; var $has_commands remote = #[]; var $has_commands shortcuts = #[]; -var $http_interface URI = "/"; +var $http_interface args = #[]; var $http_interface bytes = 205; var $http_interface cache = []; -var $http_interface cached = 0; var $http_interface ctype = 0; var $http_interface full = 0; var $http_interface header = 0; -var $http_interface http = "HTTP/0.9"; -var $http_interface info = 0; +var $http_interface http = "HTTP/1.0"; +var $http_interface info = #[]; var $http_interface keep_alive = 0; var $http_interface method = "GET"; -var $http_interface status = 405; *var $root child_index = '-' http_interface.cdc -var $root created_on = 809075102; -var $root flags = ['methods, 'code, 'core, 'variables]; +var $http_interface sent = 0; +var $http_interface status = 0; +var $root created_on = 863766118; +var $root flags = ['variables, 'methods, 'code, 'core]; var $root inited = 1; var $root managed = [$http_interface]; var $root manager = $http_interface; -var $root owned = [$http_interface]; var $root quota_exempt = 1; +public method ._respond() { + arg input; + var output, t; + + switch (type(input)) { + case 'list: + output = `[]; + for t in (input) + output += ._respond(t); + case 'string: + output = str_to_buf(input) + `[10]; + case 'buffer: + output = input; + case 'frob: + output = $parse_lib.filter_ctext(input, #[['formatter, $html_format]]); + default: + output = str_to_buf((("Error, unable to send output type: " + type(input)) + " -- ") + input); + } + return output; +}; + protected method .close_interface() { arg @args; var c; @@ -42,138 +62,239 @@ (> .close() <); }; -protected method .find_filename() { - var file, actual, stat, ifiles, i; +public method .expand_url() { + arg partial_url; + var base; - stat = (| $file.fstat("html" + URI) |); - if (!stat) { - ifiles = ["home.html", "index.html", "welcome.html"]; - file = URI; - actual = URI; - if ((file[strlen(file)]) != "/") - file += "/"; - while ((!stat) && ifiles) { - URI = file + (ifiles[1]); - stat = (| $file.fstat("html" + URI) |); - ifiles = ifiles.delete(1); - } - if (!stat) { - URI = actual; - status = 404; - .respond($http.response(status, ("Unable to find URL " + toliteral(URI)) + ".")); - return 0; - } - } - if ((i = URI.rindex("."))) { - switch (URI.subrange(i + 1)) { - case "txt": - ctype = "text/plain"; - case "gif": - ctype = "image/gif"; - } + base = "http://" + ($http_daemon.site_url()); + switch (partial_url[1]) { + case "?": + return ((base + (info['script_name])) + (info['path_info])) + partial_url; + case "/": + return base + partial_url; + default: + return partial_url; } - return stat; }; -protected method .http_method_GET() { - var target, gate; +public method .get_info() { + arg key; - if (URI == "/") { - .respond($motd.build_html()); - } else if (match_begin(URI, "/~")) { - target = (| $user_db.search(substr((info['path])[1], 2)) |); - info = (| target.user_info("home-page") |); - if (info) { - status = 302; - .redirect(info); - } else { - status = 404; - .respond($http.response(404, "Unable to find user " + substr((info['path])[1], 2))); + return (> info[key] <); +}; + +public method .header() { + arg field; + + return (> header[field] <); +}; + +public method .http_method_GET() { + var page, r, description, processed_args, final_args, item, lock; + + status = 200; + page = $directories.find_page(info['path], this()); + if (page == 'pagenf) { + .respond(.response(404, "Page not found")); + return; + } else if ((type(page) == 'list) && ((page[1]) == 'redirect)) { + r = .expand_url(page[2]); + .respond(.response(302, "Relocated at: " + r), "Location: " + r); + return; } - } else if (match_begin(URI, "/bin")) { - target = sublist(info['path], 2); - if (!target) { - status = 300; - return .respond($http.response(300, ["Multiple Choices: "] + ($http.list_gateways()))); - } - gate = target[1]; - target = sublist(target, 2); - if (!(($http.gateways()).contains(gate))) { - status = 502; - .respond($http.response(502, ("Bad gateway: \"" + gate) + "\"")); - } else if (!gate) { - status = 300; - return .respond($http.response(300, ["Multiple Choices: "] + ($http.list_gateways()))); + if (info['lock_object]) { + lock = (info['lock_object]).get_lock(); + r = (lock[1]).(lock[2])(this(), @lock[3]); + if (r) { + switch (type(r)) { + case 'list: + if ((r[1]) == 'redirect) { + r = .expand_url(r[2]); + .respond(.response(302, "Relocated at: " + r), "Location: " + r); + return; } else { + status = 401; + .respond(["<HEAD><TITLE>Authorization Required</TITLE></HEAD>", "<BODY>", "<H1>Authorization Required</H1>", "Browser not authentication-capable or authentication failed.", "</BODY>"], ((("WWW-Authenticate: " + (r[1])) + " realm=\"") + (r[2])) + "\""); + return; + } + case 'symbol: + .respond(.response(403, "Access forbidden")); + return; + } + } + } catch any { - info = (> $http.(tosym("bin_" + gate))(target, info, header) <); - status = info[1]; - if ((type(info[2]) == 'buffer) || (status != 200)) - return .respond(info[2]); - return .respond((info[2]) + ($http.page_tail())); + description = (| $interface_registry.describe(page, info['generate]) |) || ((| page.describe_method(info['generate]) |) || #[]); + if ((| description['args] |)) + processed_args = $adapter.process_args(args, description['args]); + else + processed_args = #[]; } with { + switch (error()) { + case ~objnf: + .respond(.response(500, "Object not found")); + return; + case ~missingarg: + .respond(.response(500, "Missing Argument")); + return; + default: status = 500; - return .respond($parse_lib.html_traceback(traceback(), 500)); + .respond($parse_lib.html_traceback(traceback(), status)); + $sys.log($parse_lib.traceback(traceback())); + return; + } + } + if ((| description['auth] |)) { + if ((description['auth]) != 'none) { + r = ((description['auth])[1]).((description['auth])[2])(this(), @(description['auth])[3]); + if (r) { + switch (type(r)) { + case 'list: + if ((r[1]) == 'redirect) { + r = .expand_url(r[2]); + .respond(.response(302, "Relocated at: " + r), "Location: " + r); + return; + } else { + status = 401; + .respond(["<HEAD><TITLE>Authorization Required</TITLE></HEAD>", "<BODY>", "<H1>Authorization Required</H1>", "Browser not authentication-capable or authentication failed.", "</BODY>"], ((("WWW-Authenticate: " + (r[1])) + " realm=\"") + (r[2])) + "\""); + return; } + case 'symbol: + .respond(.response(403, "Access forbidden")); + return; } - } else if ((info = .find_filename())) { - .respond_with_file(info); } + } + } else if (!(page.is($page))) { + .respond(.response(500, "Authorization info missing")); + return; + } + catch any { + if (page.is($page)) + final_args = [header, info, processed_args]; + else if ((| description['arg_order] |)) + final_args = map item in (description['arg_order]) to (processed_args[item]); + else + final_args = []; + if ((| info['run_as] |)) + r = (info['run_as]).as_this_run(page, info['generate], final_args); + else + r = page.(info['generate])(@final_args); + if (type(r) == 'list) { + if ((r[1]) == 'redirect) { + page = .expand_url(r[2]); + .respond(.response(302, "Relocated at: " + page), "Location: " + page); + return; + } else if (type(r[1]) != 'list) { + r = [r]; + } + } else { + r = [r]; + } + if (r != [0]) + .respond(@r); + } with { + switch (error()) { + case ~methodnf: + .respond(.response(500, "Method not found: " + (info['generate]))); + default: + status = 500; + .respond($parse_lib.html_traceback(traceback(), status)); + $sys.log($parse_lib.traceback(traceback())); + } + } + if (!sent) + .respond(.response(500, "It should have generated a page by now")); }; -protected method .http_method_HEAD() { - var info, target, gate, head, host; +public method .http_method_HEAD() { + var page, r, description, processed_args, final_args, item, lock; - head = []; status = 200; - if (URI == "/") { - bytes = buflen(strings_to_buf($motd.build_html())); - } else if (match_begin(URI, "/~")) { - target = (| $user_db.search(substr((info['path])[1], 2)) |); - info = (| target.user_info("home-page") |); - if (info) { - status = 302; - bytes = buflen(strings_to_buf($http.response(302, "Relocated at: " + location))); - head += ["Location: " + info]; - } else { + page = $directories.find_page(info['path], this()); + if (page == 'pagenf) { status = 404; - bytes = buflen(strings_to_buf($http.response(404, "Unable to find user " + substr((info['path])[1], 2)))); + .respond([]); + return; + } else if ((type(page) == 'list) && ((page[1]) == 'redirect)) { + r = .expand_url(page[2]); + status = 302; + .respond([], "Location: " + r); + return; } - } else if (match_begin(URI, "/bin")) { - target = sublist(info['path], 2); - if (!target) { - status = 300; - bytes = buflen(strings_to_buf($http.response(300, ["Multiple Choices: "] + ($http_lib.list_gateways())))); - } else { - gate = target[1]; - target = sublist(target, 2); - if (!(($http.gateways()).contains(gate))) { - status = 502; - bytes = buflen(strings_to_buf($http.response(502, ("Bad gateway: \"" + gate) + "\""))); - } else if (!gate) { - status = 300; - bytes = buflen(strings_to_buf($http.response(300, ["Multiple Choices: "] + ($http_lib.list_gateways())))); + if (info['lock_object]) { + lock = (info['lock_object]).get_lock(); + r = (lock[1]).(lock[2])(this(), @lock[3]); + if (r) { + switch (type(r)) { + case 'list: + if ((r[1]) == 'redirect) { + r = .expand_url(page[2]); + status = 302; + .respond([], "Location: " + r); + return; } else { + status = 401; + .respond([], ((("WWW-Authenticate: " + (r[1])) + " realm=\"") + (r[2])) + "\""); + return; + } + case 'symbol: + status = 403; + .respond([]); + return; + } + } + } catch any { - info = (> $http.(tosym("bin_" + gate))(@target) <); - status = info[1]; - if ((type(info[2]) == 'buffer) || (status != 200)) - bytes = buflen(strings_to_buf(info[2])); + description = (| $interface_registry.describe(page, info['generate]) |) || ((| page.describe_method(info['generate]) |) || #[]); + if ((| description['args] |)) + processed_args = $adapter.process_args(args, description['args]); else - bytes = buflen(strings_to_buf((info[2]) + ($http.page_tail()))); + processed_args = #[]; } with { status = 500; - bytes = buflen(strings_to_buf($parse_lib.html_traceback(traceback(), 500))); + switch (error()) { + case ~objnf: + .respond([]); + return; + case ~missingarg: + .respond([]); + return; + default: + status = 500; + .respond([]); + $sys.log($parse_lib.traceback(traceback())); + return; } } + if ((| description['auth] |)) { + if ((description['auth]) != 'none) { + r = ((description['auth])[1]).((description['auth])[2])(this(), @(description['auth])[3]); + if (r) { + switch (type(r)) { + case 'list: + if ((r[1]) == 'redirect) { + r = .expand_url(page[2]); + status = 302.0.respond([], "Location: " + r); + return; + } else { + status = 401; + .respond([], ((("WWW-Authenticate: " + (r[1])) + " realm=\"") + (r[2])) + "\""); + return; } - } else if ((info = .find_filename())) { - bytes = fstat[2]; + case 'symbol: + status = 403; + .respond([]); + return; } - .send_header(@head); - host = (.connection()).address(); - .close_interface(); - .log_request(host); + } + } + } else if (!(page.is($page))) { + status = 500; + .respond([]); + return; + } + .respond([]); }; protected method .http_method_POST() { @@ -181,65 +302,66 @@ len = (| header["Content-Length"] |); if ((len == ~keynf) || (!len)) - (> .respond($sys.response((status = 400), "No Content-Length.")) <); + (> .respond(.response(400, "No Content-Length.")) <); body = (.connection()).handle_POST_input(toint(len[1])); // handle this differently in normal situations for part in (body) - info = info.add('args, (info['args]).union(part.explode_http_encoding())); + args = args.union($http_lib.explode_http_encoding(part)); .http_method_GET(); - - // $#Edited: 30 Oct 96 12:56 $brandon }; root method .init_http_interface() { .reset_variables(); - - // $#Edited: 30 Oct 96 12:56 $brandon }; protected method .log_request() { arg host; var line; - line = (((((((((((host + " - - [") + ($time.format("%d %h %y %H:%M"))) + "] \"") + method) + " ") + URI) + " ") + http) + "\" ") + tostr(status)) + " ") + tostr(bytes); + line = (((((((((host + " - - \"") + method) + " ") + (info['URI])) + " ") + http) + "\" ") + tostr(status)) + " ") + tostr(bytes); if ((| header["User-Agent"] |)) line = (line + ";; ") + ((header["User-Agent"]).join()); $sys.log(line); - - // $#Edited: 30 Oct 96 12:56 $brandon }; public method .parse_line() { arg line; - var match; + var match, URI; if (!method) { if (!line) return; line = explode(line); if (listlen(line) != 3) { - (.connection()).write($http.response(400, "HTTP/0.9 not supported.")); - .close(); + (.connection()).write(.response(400, "HTTP/0.9 not supported.")); + (.connection()).close(); return; } - if ((match = regexp(line[1], "^(GET|POST|HEAD)$"))) + if ((match = regexp(line[1], "^(GET|HEAD|POST)$"))) { + info = #[['URI, line[2]]]; method = match[1]; - else - return .die(405, ("Method: \"" + (line[1])) + "\"."); - URI = line[2]; + } else { + info = #[['URI, line[2]]]; + .respond(.response(405, ("Method: \"" + (line[1])) + "\".")); + (.connection()).close(); + return; + } http = line[3]; } else if (line) { if ((match = regexp(line, "^([^:]+): *(.+)$"))) { if (((match[1]) == "Connection") && ((match[2]) == "Keep-Alive")) keep_alive = 1; + else if ((match[1]) == "Authorization") + .process_auth_info(match[2]); else header = header.add_elem(@match); } } else { // parse the URI - info = URI.explode_url(); - URI = "/" + ((info['path]).join("/")); + match = $http_lib.explode_url(info['URI]); + info = info.union(match[1]); + args = match[2]; catch any { (> .(tosym("http_method_" + method))() <); } with { @@ -249,65 +371,102 @@ } }; -protected method .redirect() { - arg location; - var body, host, l; +public method .process_auth_info() { + arg str; - host = (.connection()).address(); - body = strings_to_buf($http.response(303, "Relocated at: " + location)); - bytes = buflen(body); - .send_header("Location: " + location); - (.connection()).write(body); - .close_interface(); - .log_request(host); + str = str.explode(); + switch (str[1]) { + case "Basic": + str = ((str[2]).decode64()).explode(":"); + .set_info('browser_auth, ['basic, [str[1], (| str[2] |) || ""]]); + default: + $sys.log("$security_db: Unknown authorization type '" + (str[1])); + .set_info('browser_auth, ['unknown, str]); + } }; protected method .reset_variables() { method = ""; http = "HTTP/1.0"; status = 200; - URI = ""; bytes = 0; - ctype = $http.html_version(); + ctype = $http_lib.html_version(); full = 1; - header = #[]; - - // $#Edited: 30 Oct 96 12:41 $brandon - // $#Edited: 30 Oct 96 12:56 $brandon -}; - -protected method .respond() { - arg body; - var host; - - if (type(body) != 'buffer) - body = strings_to_buf(body); - bytes = buflen(body); - .send_header(); - (.connection()).write(body); + header = #[['interface, sender()]]; + info = #[]; + args = #[]; +}; + +public method .respond() { + arg body, @rest; + var host, out; + + if (!(sender().is($page))) + (> .perms(sender(), 'writer) <); + if (status >= 400) + keep_alive = 0; + out = ._respond(body); + bytes = buflen(out); + .send_header(@rest); + (.connection()).write(out); host = (.connection()).address(); - .close_interface(); .log_request(host); + .close_interface(); + sent = 1; }; -protected method .respond_with_file() { - arg fstat; +public method .respond_with_file() { + arg fstat, filename; var host; + if (!(sender().is($page))) + (> .perms(sender(), 'writer) <); bytes = fstat[2]; .send_header(); - (.connection()).cwritef("html" + URI); + (.connection()).cwritef(filename); host = (.connection()).address(); - .close_interface(); .log_request(host); + .close_interface(); + sent = 1; +}; + +public method .response() { + arg code, message; + var name, x; + + status = code; + if (!(name = (| $http_lib.get_code(code) |))) + return .response(500, "We had a booboo! Invalid code: " + tostr(code)); + if (type(message) == 'string) + message = [("<p align=center>" + message) + "</p>"]; + return [((("<head><title>" + tostr(code)) + " ") + name) + "</title></head>", "<body bgcolor=\"#ffffff\">", ((("<h1 align=center>" + tostr(code)) + " ") + name) + "</h1>", "<hr size=1 noshade>", @message, ("<hr size=1 noshade><a href=\"/\"><b>" + ($motd.server_name())) + "</b></a></body>"]; }; protected method .send_header() { arg @lines; + var code_str, content_len; if (!full) return; - (.connection()).write(([((http + " ") + status) + " ", "Server: ColdWeb/2.0 (Virtual Environment)", "Connection: " + (keep_alive ? "Keep-Alive" : "close"), "Content-type: " + ctype, "Content-length: " + bytes] + lines) + [""]); + if (!(| (code_str = $http_lib.get_code(status)) |)) + code_str = "Unknown Code"; + if (bytes) + content_len = ["Content-length: " + bytes]; + else + content_len = []; + (.connection()).write([(((http + " ") + status) + " ") + code_str, "Server: ColdWeb/2.1 (Virtual Environment)", "Connection: " + (keep_alive ? "Keep-Alive" : "close"), "Content-type: " + ctype, @content_len, @lines, ""]); +}; + +public method .set_ctype() { + arg ct; + + ctype = ct; +}; + +public method .set_info() { + arg key, data; + + info = info.add(key, data); }; public method .set_status() { @@ -315,8 +474,6 @@ (> .perms(caller(), $http_connection) <); status = s; - - // $#Edited: 30 Oct 96 12:56 $brandon }; diff -rwu src-3.0a7/http_log.cdc ColdCore-3.0a9.02/src/http_log.cdc --- src-3.0a7/http_log.cdc Sat Aug 9 19:09:33 1997 +++ ColdCore-3.0a9.02/src/http_log.cdc Tue Aug 19 12:15:18 1997 @@ -12,7 +12,6 @@ var $root inited = 1; var $root managed = [$http_log]; var $root manager = $http_log; -var $root owned = [$http_log]; var $thing gender = $gender_neuter; public method .log() { diff -rwu src-3.0a7/in_location.cdc ColdCore-3.0a9.02/src/in_location.cdc --- src-3.0a7/in_location.cdc Sat Aug 9 19:09:31 1997 +++ ColdCore-3.0a9.02/src/in_location.cdc Tue Aug 19 12:15:20 1997 @@ -2,27 +2,108 @@ new object $in_location: $located_location; var $described prose = []; -var $has_commands local = #[]; -var $has_commands remote = #[]; +var $foundation defined_msgs = #[["enter", #[['branches, ["actor", "source", "dest"]]]], ["open", #[['branches, ["general", "actor", "inside"]]]], ["close", #[['branches, ["general", "actor", "inside"]]]]]; +var $foundation msgs = #[["enter", #[["actor", <$ctext_frob, [["You enter ", <$generator, ["dest", [], [], 'gen_dest]>, "."], #[]]>], ["source", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " enters ", <$generator, ["dest", [], [], 'gen_dest]>, "."], #[]]>], ["dest", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " enters from ", <$generator, ["source", [], [], 'gen_source]>, "."], #[]]>]]], ["open", #[["general", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " opens ", <$generator, ["this", [], [], 'gen_this]>, "."], #[]]>], ["inside", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " opens ", <$generator, ["this", [], [], 'gen_this]>, "."], #[]]>], ["actor", <$ctext_frob, [["You open ", <$generator, ["this", [], [], 'gen_this]>, "."], #[]]>]]], ["close", #[["inside", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " closes ", <$generator, ["this", [], [], 'gen_this]>, "."], #[]]>], ["general", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " closes ", <$generator, ["this", [], [], 'gen_this]>, "."], #[]]>], ["actor", <$ctext_frob, [["You close ", <$generator, ["this", [], [], 'gen_this]>, "."], #[]]>]]]]; +var $has_commands local = \ + #[["exit|leave", [["exit|leave", "", "exit|leave", 'exit_cmd, #[]]]], ["exit", [["exit", "", "exit", 'exit_cmd, #[]]]]]; +var $has_commands remote = #[["enter", [["enter", "*", "enter <this>", 'enter_cmd, #[[1, ['this, []]]]]]], ["open", [["open", "*", "open <this>", 'open_cmd, #[[1, ['this, []]]]]]], ["close", [["close", "*", "close <this>", 'close_cmd, #[[1, ['this, []]]]]]]]; var $has_commands shortcuts = #[]; -var $has_name name = ['prop, "note", "note"]; +var $has_name name = ['prop, "in_location", "in_location"]; var $located location = $nowhere; var $located obvious = 1; *var $location contents = ' ' in_location.cdc var $root created_on = 809991552; -var $root flags = ['methods, 'code, 'variables, 'core]; +var $root defined_settings = #[["locked", #[['parse, ['is_boolean]], ['format, ['format_boolean]]]], ["lockable", #[['parse, ['is_boolean]], ['format, ['format_boolean]]]], ["closable", #[['parse, ['is_boolean]], ['format, ['format_boolean]]]], ["closed", #[['parse, ['is_boolean]], ['format, ['format_boolean]]]]]; +var $root flags = ['methods, 'code, 'variables, 'core, 'fertile]; var $root inited = 1; var $root managed = [$in_location]; var $root manager = $in_location; -var $root owned = [$in_location]; +var $root settings = #[["locked", 0], ["lockable", 0], ["closable", 0], ["closed", 0]]; var $thing gender = $gender_neuter; +public method .close_cmd() { + arg cmdstr, cmd, this; + var vars, m; + + if (.get_setting("closable", $in_location)) { + if (.get_setting("closed", $in_location)) { + return ((.name()).capitalize()) + " is already closed."; + } else { + .set_setting("closed", $in_location, "yes"); + vars = #[["$actor", sender()], ["actor", sender().name()], ["$this", this()], ["this", .name()], ["$inside", this()]]; + m = .eval_message("close", $in_location, vars); + (.location()).announce(m); + .announce(m); + } + } else { + return ((.name()).capitalize()) + " cannot be closed."; + } +}; + public method .description() { arg flags; var line; - line = ((("You see " + ((.contents()).map_to_english('namef))) + " in ") + (.name())) + "."; + if (.get_setting("closed", $in_location)) + line = (((.gender()).pronoun('ps)).capitalize()) + " is closed."; + else + line = (("Inside " + (.name())) + " you see: ") + ((.contents()).map_to_english('name)); return (> pass(flags) <) + [line]; +}; + +public method .enter_cmd() { + arg cmdstr, cmd, me; + var m, source; + + (> .perms(caller(), 'command) <); + if (.get_setting("closed", $in_location)) { + return ((("You can't enter " + (.name())) + " because ") + ((.gender()).pronoun('ps))) + " is closed."; + } else { + source = sender().location(); + m = .eval_message("enter", $in_location, #[["actor", sender().name()], ["$actor", sender()], ["source", source.name()], ["$source", source], ["dest", .name()], ["$dest", this()], ["this", this()]]); + sender().move_to(this()); + (.location()).announce(m); + return .announce(m); + } +}; + +public method .exit_cmd() { + arg cmdstr, cmd; + + (> .perms(caller(), 'command) <); + if ((sender().location()) != this()) + return ("You are not in " + (.name())) + "!"; + sender().move_to(.location()); + (.location()).announce(((((sender().name()).capitalize()) + " exits ") + (.name())) + ".", this(), sender()); + .announce(((sender().name()).capitalize()) + " leaves."); + return "You arrive"; +}; + +public method .open_cmd() { + arg cmdstr, cmd, this; + var vars, m; + + if (.get_setting("closable", $in_location)) { + if (.get_setting("closed", $in_location)) { + .set_setting("closed", $in_location, "no"); + vars = #[["$actor", sender()], ["actor", sender().name()], ["$this", this()], ["this", .name()], ["$inside", this()]]; + m = .eval_message("open", $in_location, vars); + (.location()).announce(m); + .announce(m); + } else { + return ((.name()).capitalize()) + " is already opened."; + } + } else { + return ((.name()).capitalize()) + " cannot be opened."; + } +}; + +public method .tell() { + arg @args; + + if (.get_setting("closed", $in_location)) + return; + .announce([("[outside " + (.name())) + "]: "] + args); }; diff -rwu src-3.0a7/indirect_lock_frob.cdc ColdCore-3.0a9.02/src/indirect_lock_frob.cdc --- src-3.0a7/indirect_lock_frob.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/indirect_lock_frob.cdc Tue Aug 19 12:15:35 1997 @@ -11,8 +11,6 @@ arg value, @type; return "indirect:" + ((value[1]).name()); - - // $#Edited: 03 Nov 96 17:50 $miro }; public method .new_lock() { @@ -21,16 +19,12 @@ if (type(obj) != 'objnum) throw(~perm, "Argument is not a dbref."); return (<this(), [obj]>); - - // $#Edited: 03 Nov 96 17:50 $miro }; public method .try() { arg lock, obj; return ((lock[1]).try_indirect_lock(obj)) || ($sys.is_system(obj)); - - // $#Edited: 03 Nov 96 17:50 $miro }; diff -rwu src-3.0a7/inside_lock_frob.cdc ColdCore-3.0a9.02/src/inside_lock_frob.cdc --- src-3.0a7/inside_lock_frob.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/inside_lock_frob.cdc Tue Aug 19 12:15:35 1997 @@ -6,15 +6,12 @@ var $root inited = 1; var $root managed = [$inside_lock_frob]; var $root manager = $inside_lock_frob; -var $root owned = [$inside_lock_frob]; var $root trusted = []; public method .lock_name() { arg value, @type; return "inside:" + ((value[1]).name()); - - // $#Edited: 03 Nov 96 17:48 $miro }; public method .new_lock() { @@ -23,16 +20,12 @@ if (type(obj) != 'objnum) throw(~perm, "Argument is not a dbref."); return (<this(), [obj]>); - - // $#Edited: 03 Nov 96 17:47 $miro }; public method .try() { arg lock, obj; return ((lock[1]).contains(obj)) || ($sys.is_system(obj)); - - // $#Edited: 03 Nov 96 17:48 $miro }; diff -rwu src-3.0a7/integer.cdc ColdCore-3.0a9.02/src/integer.cdc --- src-3.0a7/integer.cdc Sat Aug 9 19:09:29 1997 +++ ColdCore-3.0a9.02/src/integer.cdc Tue Aug 19 12:15:16 1997 @@ -6,10 +6,10 @@ var $integer tens = ["ten", "twenty", "thirty", "fourty", "fifty", "sixty", "seventy", "eighty", "ninety"]; var $root created_on = 796268969; var $root flags = ['methods, 'code, 'variables, 'core]; +var $root help_node = $help_obj_integer; var $root inited = 1; var $root managed = [$integer]; var $root manager = $integer; -var $root owned = [$integer]; public method ._range_type() { arg type; @@ -77,19 +77,43 @@ public method .range() { arg x, y; - var list, element; + var element; - // creates a list of every number between x and y - list = []; - for element in [x .. y] - list += [element]; - return list; + return map element in [x .. y] to (element); +}; + +public method .roman_numeral_scheme() { + arg val, x, y, z; + var rnlist; + + rnlist = [x, x * 2, x * 3, x + y, y, y + x, y + (x * 2), y + (x * 3), x + z]; + return rnlist[val]; }; public method .shleft(): native; public method .shright(): native; +public method .to_bytes() { + arg num, @long; + var s; + + if (num > 1073741824) { + num /= 1.07374e+09; + s = long ? " gigabytes" : " gb"; + } else if (num > 1048576) { + num /= 1.04858e+06; + s = long ? " megabytes" : " mb"; + } else if (num > 1024) { + num /= 1024.0; + s = long ? " kilobytes" : " kb"; + } else { + s = long ? " bytes" : " b"; + } + num = strsed(tostr(num), "\.0+", ""); + return num + s; +}; + public method .to_english() { arg num; var num_str, sign; @@ -131,15 +155,51 @@ return ((isneg + ((an / 1000000000).to_english_text())) + " billion") + ((temp = an % 1000000) ? (" " + (temp.to_english_text())) : ""); // $#Written by: Kipp - // $#Edited: 25 Aug 96 16:43 $jenner }; -public method .to_string() { - arg @args; +public method .to_roman_numeral() { + arg num; + var str, neg, methstr; + + str = ""; + neg = ""; - return (> tostr(@args) <); + // Handle negatives: + if (num < 0) { + neg = "negative "; + num = abs(num); + } + if (num >= 1000000) + return "Out of range"; + if (num >= 1000) { + str = "M" * (num / 1000); + num = num % 1000; + if (num == 0) + return str; + } + if (num >= 100) { + str = str + ((num / 100).roman_numeral_scheme("C", "D", "M")); + num = num % 100; + if (num == 0) + return str; + } + if (num >= 10) { + str = str + ((num / 10).roman_numeral_scheme("X", "L", "C")); + num = num % 10; + if (num == 0) + return str; + } + if (num > 0) + str = str + (num.roman_numeral_scheme("I", "V", "X")); + else if (!str) + str = ""; + return neg + str; +}; + +public method .to_string() { + arg number; - // $#Edited: 29 Nov 95 19:58 Lynx ($lynx) + return (> tostr(number) <); }; public method .xor(): native; diff -rwu src-3.0a7/itext.cdc ColdCore-3.0a9.02/src/itext.cdc --- src-3.0a7/itext.cdc Sat Aug 9 19:09:34 1997 +++ ColdCore-3.0a9.02/src/itext.cdc Tue Aug 19 12:15:18 1997 @@ -4,14 +4,12 @@ var $has_text text = ["hello", "this", "world"]; var $itext all_text = #[["foo", [["hello", "world"], ""]], ["bar", [["hello", "this", "world"], ""]]]; var $itext current = "foo"; *var $root child_index = '-' itext.cdc var $root created_on = 796268969; var $root fertile = 1; var $root flags = ['methods, 'code, 'fertile, 'variables, 'core]; var $root inited = 1; var $root managed = [$itext]; var $root manager = $itext; -var $root owned = [$itext]; public method .current() { return current; @@ -61,9 +59,6 @@ all_text = all_text.add(topic, (all_text[topic]).replace(2, short_desc)); else throw(~topicnf, ("Topic " + topic) + " not found."); - - // $#Edited: 22 Nov 96 17:54 $miro - // $#Edited: 30 Nov 96 20:00 $miro }; public method .store() { @@ -73,8 +68,6 @@ if (!(topic in (all_text.keys()))) all_text = all_text.add(topic, [.text(), ""]); all_text = all_text.add(topic, (all_text[topic]).replace(1, .text())); - - // $#Edited: 30 Nov 96 20:00 $miro }; public method .topics() { diff -rwu src-3.0a7/lag_watcher.cdc ColdCore-3.0a9.02/src/lag_watcher.cdc --- src-3.0a7/lag_watcher.cdc Mon Aug 18 10:28:46 1997 +++ ColdCore-3.0a9.02/src/lag_watcher.cdc Tue Aug 19 12:15:17 1997 @@ -2,13 +2,12 @@ new object $lag_watcher: $utilities; var $lag_watcher lags = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; -var $lag_watcher last_time = 0; +var $lag_watcher last_time = 872013833; var $root created_on = 796268969; var $root flags = ['methods, 'code, 'variables, 'core]; var $root inited = 1; var $root managed = [$lag_watcher]; var $root manager = $lag_watcher; -var $root owned = [$lag_watcher]; public method .lag() { var lag, total, weight, lag_i, lag_d; @@ -48,6 +47,8 @@ }; public method .startup() { + arg @args; + // Called by $sys.startup() (> .perms(sender(), 'manager) <); lags = []; @@ -65,8 +66,6 @@ lags = lags.delete(1); lag = (lag > 15) ? (lag - 15) : 0; lags += [lag]; - - // $#Edited: 30 Nov 96 21:22 $miro }; public method .value() { @@ -86,8 +85,6 @@ public method .verbose_lag_str() { // returns lag as a string with verbosity return [("Current server lag is " + (.lag())) + " seconds.", toliteral(lags)]; - - // $#Edited: 12 Jun 96 20:00 $levi }; diff -rwu src-3.0a7/libraries.cdc ColdCore-3.0a9.02/src/libraries.cdc --- src-3.0a7/libraries.cdc Sat Aug 9 19:09:29 1997 +++ ColdCore-3.0a9.02/src/libraries.cdc Tue Aug 19 12:15:16 1997 @@ -1,13 +1,11 @@ new object $libraries: $core; *var $root child_index = '-' libraries.cdc var $root created_on = 796268969; var $root fertile = 1; var $root flags = ['methods, 'code, 'fertile, 'core, 'variables]; var $root inited = 1; var $root managed = [$libraries]; var $root manager = $libraries; -var $root owned = [$libraries]; diff -rwu src-3.0a7/list.cdc ColdCore-3.0a9.02/src/list.cdc --- src-3.0a7/list.cdc Sat Aug 9 19:09:29 1997 +++ ColdCore-3.0a9.02/src/list.cdc Tue Aug 19 12:15:16 1997 @@ -7,7 +7,6 @@ var $root inited = 1; var $root managed = [$list]; var $root manager = $list; -var $root owned = [$list]; public method ._vcolumnize() { arg list, lines, cols, width, @other; @@ -21,7 +20,7 @@ line = (list[i]).pad(width); for j in [1 .. cols] (| (line = (line + sep) + ((list[i + (j * lines)]).pad(width))) |); - outlist += [line]; + outlist += [line.trim('right)]; } return outlist; }; @@ -185,8 +184,6 @@ arg list, format; return strfmt(format, @list); - - // $#Edited: 28 Feb 97 07:39 $miro }; public method .getkey() { @@ -352,6 +349,13 @@ return map x in (list) to ((type(x) == 'objnum) ? x.(method)(@args) : x); }; +public method .nonzero() { + arg list; + var x; + + return filter x in (list) where (x); +}; + public method .nth_element_maxlength() { arg lists, element; var list; @@ -522,8 +526,6 @@ for i in (data) ret += i; return ret; - - // $#Edited: 07 Dec 96 15:18 $miro }; public method .swap() { @@ -567,7 +569,7 @@ t1 = map i in (colsizes) to (((("%" + i) + "{") + header_sep) + "}l").sum(); // Now format the thing... - return map i in (headers.transpose()) to (refresh() && ((t1.format(@i)).pad(len))) + map i in (list.transpose()) to (refresh() && ((t.format(@i)).pad(len))); + return map i in (headers.transpose()) to (refresh() && (((t1.format(@i)).pad(len)).trim('right))) + map i in (list.transpose()) to (refresh() && (((t.format(@i)).pad(len)).trim('right))); }; public method .to_buffer() { diff -rwu src-3.0a7/located.cdc ColdCore-3.0a9.02/src/located.cdc --- src-3.0a7/located.cdc Sat Aug 9 19:09:28 1997 +++ ColdCore-3.0a9.02/src/located.cdc Tue Aug 19 12:15:18 1997 @@ -6,12 +6,10 @@ var $located inited = 0; var $located location = $lost_and_found; var $located obvious = 1; *var $root child_index = '-' located.cdc var $root created_on = 796268969; var $root flags = ['methods, 'code, 'variables, 'core]; var $root managed = [$located]; var $root manager = $located; -var $root owned = [$located]; protected method .did_move() { arg mover, old_place; @@ -36,8 +34,7 @@ public method .is_obvious_to() { arg whom; - // will later do something creative here - return 1; + return .is_visible_to(whom); }; public method .location() { @@ -62,7 +59,7 @@ return (> pass(s) <); }; -public method .move_to() { +public method .move_to(): nooverride { arg place; var old; diff -rwu src-3.0a7/located_location.cdc ColdCore-3.0a9.02/src/located_location.cdc --- src-3.0a7/located_location.cdc Sat Aug 9 19:09:30 1997 +++ ColdCore-3.0a9.02/src/located_location.cdc Tue Aug 19 12:15:18 1997 @@ -7,14 +7,12 @@ var $located location = $void; var $located obvious = 1; *var $location contents = ' ' located_location.cdc *var $root child_index = '-' located_location.cdc var $root created_on = 796268969; var $root fertile = 1; var $root flags = ['methods, 'code, 'fertile, 'variables, 'core]; var $root inited = 1; var $root managed = [$located_location]; var $root manager = $located_location; -var $root owned = [$located_location]; var $thing gender = $gender_neuter; public method .description() { @@ -32,6 +30,14 @@ public method .environment() { return (.contents()) + pass(); +}; + +public method .will_arrive() { + arg old_place; + + (> pass(old_place) <); + if (sender() == (.location())) + throw(~perm, ((sender().namef('ref)) + " is holding ") + (.namef('ref))); }; diff -rwu src-3.0a7/location.cdc ColdCore-3.0a9.02/src/location.cdc --- src-3.0a7/location.cdc Sat Aug 9 19:09:30 1997 +++ ColdCore-3.0a9.02/src/location.cdc Tue Aug 19 12:15:18 1997 @@ -5,14 +5,12 @@ var $has_commands shortcuts = #[]; var $has_name name = ['uniq, "Generic Container Object", "the Generic Container Object"]; *var $location contents = ' ' location.cdc *var $root child_index = '-' location.cdc var $root created_on = 796268969; var $root fertile = 1; var $root flags = ['methods, 'code, 'fertile, 'variables, 'core]; var $root inited = 1; var $root managed = [$location]; var $root manager = $location; -var $root owned = [$location]; public method .add_frob_to_contents() { arg frob; @@ -32,8 +30,6 @@ if ((sender().location()) != this()) throw(~location, "Sorry, but you're not here."); contents = contents.setadd(sender()); - - // $#Edited: 19 Mar 96 02:56 Levi ($user_levi) }; public method .add_to_contents(): nooverride { @@ -128,8 +124,6 @@ if ((| .location() |)) loc = (.location()).realm(); return ((loc + "[") + (.name())) + "]"; - - // $#Edited: 19 Feb 97 02:23 $miro }; public method .realm_name() { diff -rwu src-3.0a7/lock_frob.cdc ColdCore-3.0a9.02/src/lock_frob.cdc --- src-3.0a7/lock_frob.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/lock_frob.cdc Tue Aug 19 12:15:35 1997 @@ -3,12 +3,10 @@ var $lock_frob lock_types = [["inside", $inside_lock_frob], ["indirect", $indirect_lock_frob], ["owner", $owner_lock_frob]]; var $lock_frob names = 0; *var $root child_index = '-' lock_frob.cdc var $root created_on = 796268969; var $root flags = ['methods, 'code, 'variables, 'core]; var $root managed = [$lock_frob]; var $root manager = $lock_frob; -var $root owned = [$lock_frob]; public method .add_name() { arg type, name; @@ -26,16 +24,12 @@ if (type == 'literal) type = 'default; return (| names[type] |) || (names['default]); - - // $#Edited: 30 Nov 96 20:00 $miro }; public method .new_with() { arg str; return (> .parse(str, sender()) <); - - // $#Edited: 11 Dec 96 09:48 $brandon }; public method .parse() { diff -rwu src-3.0a7/lock_parser.cdc ColdCore-3.0a9.02/src/lock_parser.cdc --- src-3.0a7/lock_parser.cdc Sat Aug 9 19:09:47 1997 +++ ColdCore-3.0a9.02/src/lock_parser.cdc Tue Aug 19 12:15:37 1997 @@ -7,7 +7,6 @@ var $root inited = 1; var $root managed = [$lock_parser]; var $root manager = $lock_parser; -var $root owned = [$lock_parser]; public method .parse() { arg s, env; diff -rwu src-3.0a7/log.cdc ColdCore-3.0a9.02/src/log.cdc --- src-3.0a7/log.cdc Sat Aug 9 19:09:33 1997 +++ ColdCore-3.0a9.02/src/log.cdc Tue Aug 19 12:15:18 1997 @@ -7,14 +7,12 @@ var $has_text text = ["9-28-94/22:33:17> foo"]; var $located location = $void; var $located obvious = 1; *var $root child_index = '-' log.cdc var $root created_on = 796268969; var $root fertile = 1; var $root flags = ['methods, 'code, 'fertile, 'core]; var $root inited = 1; var $root managed = [$log]; var $root manager = $log; -var $root owned = [$log]; var $root trusted = []; var $thing gender = $gender_neuter; @@ -45,8 +43,6 @@ sender().tell(text.subrange(loglen - 10)); sender().tell("---"); } - - // $# Edited 05 Nov 1995 14:03 Lynx ($lynx) }; root method .uninit_log() { diff -rwu src-3.0a7/logic_frob.cdc ColdCore-3.0a9.02/src/logic_frob.cdc --- src-3.0a7/logic_frob.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/logic_frob.cdc Tue Aug 19 12:15:35 1997 @@ -2,13 +2,11 @@ new object $logic_frob: $frob; var $logic_frob token = 0; *var $root child_index = '-' logic_frob.cdc var $root created_on = 796268969; var $root flags = ['methods, 'code, 'variables, 'core]; var $root inited = 1; var $root managed = [$logic_frob]; var $root manager = $logic_frob; -var $root owned = [$logic_frob]; var $root trusted = []; public method .set_token() { @@ -16,14 +14,10 @@ (> .perms(sender(), 'manager) <); token = new; - - // $#Edited: 11 Dec 96 09:59 $brandon }; public method .token() { return token; - - // $#Edited: 11 Dec 96 09:58 $brandon }; public method .try() { diff -rwu src-3.0a7/login_connection.cdc ColdCore-3.0a9.02/src/login_connection.cdc --- src-3.0a7/login_connection.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/login_connection.cdc Tue Aug 19 12:15:36 1997 @@ -1,5 +1,5 @@ -new object $login_connection: $connection; +new object $login_connection: $inbound_connection; var $connection active = 0; var $connection buffer = `[]; @@ -10,13 +10,11 @@ var $connection read_block = 0; var $connection started_at = 0; var $connection timeout = 0; *var $root child_index = '-' login_connection.cdc var $root created_on = 809051865; var $root flags = ['methods, 'code, 'core, 'variables]; var $root inited = 1; var $root managed = [$login_connection]; var $root manager = $login_connection; -var $root owned = [$login_connection]; var $root quota_exempt = 1; public method .local_echo_off() { diff -rwu src-3.0a7/login_daemon.cdc ColdCore-3.0a9.02/src/login_daemon.cdc --- src-3.0a7/login_daemon.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/login_daemon.cdc Tue Aug 19 12:15:36 1997 @@ -3,14 +3,13 @@ var $daemon connection = $login_connection; var $daemon current_port = 1138; -var $daemon default_port = 1138; +var $daemon listen = [[1138]]; var $root created_on = 809051992; var $root defined_settings = #[["creation-disabled-msg", #[]], ["creation-allowed", #[['parse, ['is_boolean]], ['format, ['format_boolean]]]]]; var $root flags = ['methods, 'code, 'core, 'variables]; var $root inited = 1; var $root managed = [$login_daemon]; var $root manager = $login_daemon; -var $root owned = [$login_daemon]; var $root settings = #[["creation-disabled-msg", "Sorry, character creation is disabled."], ["creation-allowed", 1]]; root method .core_login_daemon() { diff -rwu src-3.0a7/login_interface.cdc ColdCore-3.0a9.02/src/login_interface.cdc --- src-3.0a7/login_interface.cdc Sat Aug 9 19:09:31 1997 +++ ColdCore-3.0a9.02/src/login_interface.cdc Tue Aug 19 12:15:35 1997 @@ -7,14 +7,13 @@ [["c?onnect", "*", "c?onnect <any>", 'connect_cmd, #[[1, ['any, []]]]]]],\ ["@quit|QUIT",\ [["@quit|QUIT", "", "@quit|QUIT", 'quit_cmd, #[]]]], ["cr?eate", [["cr?eate", "*", "cr?eate <any>", 'create_cmd, #[[1, ['any, []]]]]]]]; *var $root child_index = '-' login_interface.cdc var $root created_on = 809051864; var $root flags = ['methods, 'code, 'core, 'variables, 'command_cache]; var $root inited = 1; var $root managed = [$login_interface]; var $root manager = $login_interface; -var $root owned = [$login_interface]; var $root quota_exempt = 1; +var $root trusted_by = [$smtp]; protected method .connect_cmd() { arg cmdstr, cmd, args; @@ -34,7 +33,12 @@ } with { (> .tell_error(syn, stderr) <); } + if ($sys.user_denied(user)) { + .print(("Access to user " + (user.namef('ref))) + " is currently denied."); + .print(("Contact " + ($smtp.get_email_address('admin))) + " for more information."); + } else { (.connection()).change_interface(user); + } }; protected method .connect_guest_cmd() { @@ -42,35 +46,27 @@ var syn, msg, c, email, name, result, semail, user; syn = cmd + " <your name> <your email>"; - semail = $sys.get_system_email('login); + semail = $smtp.get_email_address('login); args = args.explode(); c = .connection(); if ((args.length()) < 2) (> .tell_error(syn) <); name = (args.subrange(1, (args.length()) - 1)).join(); email = args[args.length()]; - if ($sys.validate_email_addresses()) - result = $code_lib.valid_email(email); - if ((result[1]) != 'valid) { - switch (result[1]) { - case 'invalid: - c.write(["", ("=> Syntax: `" + syn) + "`"]); - c.write("The given email address is not a legitimate address."); - c.write("Specify both username and hostname."); - return; - case 'invip, 'invhostname: - c.write("** Your hostname seems to be invalid."); - c.write("** You should set a valid email address."); - } - } + if ($sys.validate_email_addresses()) { catch any { - user = (> $sys.create_user(name, 0, email, 'anonymous_user_class) <); + .print("Verifying Email Address.."); + msg = $smtp.verify_email_address(email); + .print("SMTP Response: " + (msg.join(" "))); } with { - c.write(["", ("=> Syntax: `" + syn) + "`"]); - c.write((traceback()[1])[2]); - c.write("If there is a problem contact: " + semail); + .print("Aborting: " + ((traceback()[1])[2])); return; } + } + catch any + user = (> $sys.create_user(name, 0, email, 'anonymous_user_class) <); + with + (> .tell_error(syn, (traceback()[1])[2], "If there is a problem contact: " + semail) <); c.change_interface(user); }; @@ -83,18 +79,34 @@ protected method .create_cmd() { arg cmdstr, cmd, args; - var syn, msg, user, semail; + var syn, msg, user, semail, len, name, pwd, email, result; if (!($login_daemon.get_setting("creation-allowed", $login_daemon))) return (> .tell_error("", $login_daemon.get_setting("creation-disabled-msg", $login_daemon)) <); syn = cmd + " <name> <password> <email@host>"; - semail = $sys.get_system_email('login); + semail = $smtp.get_email_address('login); args = args.explode_quoted(); - ((args.length()) == 3) || (> .tell_error(syn) <); - if ((| $user_db.search(args[1]) |)) - return .tell(("The name '" + (args[1])) + "' is already taken."); + if ((args.length()) < 3) + (> .tell_error(syn) <); + if ((args.length()) > 3) { + len = listlen(args); + args = [sublist(args, 1, len - 2).join(), args[len - 1], args[len]]; + } + [name, pwd, email] = args; + if ((| $user_db.search(name) |)) + (> .tell_error(("The name '" + name) + "' is already taken.") <); + if ($sys.validate_email_addresses()) { + catch any { + .print("Verifying Email Address.."); + msg = $smtp.verify_email_address(email); + .print("SMTP Response: " + (msg.join(" "))); + } with { + .print("Aborting: " + ((traceback()[1])[2])); + return; + } + } catch any { - user = $sys.create_user(@args); + user = $sys.create_user(name, pwd, email); } with { if (user) (| user.destroy() |); @@ -122,9 +134,6 @@ if (!($login_daemon.get_setting("creation-allowed", $login_daemon))) line = line.del("cr?eate"); .print("Try: " + (line.to_english("", " or "))); - - // $#Edited: 15 Feb 97 17:12 $brad - // $#Edited: 20 Feb 97 16:51 $brad }; protected method .motd() { @@ -182,8 +191,6 @@ return 'disconnect; } } - - // $#Edited: 14 Feb 97 18:35 $brad }; protected method .print() { diff -rwu src-3.0a7/login_log.cdc ColdCore-3.0a9.02/src/login_log.cdc --- src-3.0a7/login_log.cdc Sat Aug 9 19:09:33 1997 +++ ColdCore-3.0a9.02/src/login_log.cdc Tue Aug 19 12:15:18 1997 @@ -11,7 +11,6 @@ var $root inited = 1; var $root managed = [$login_log]; var $root manager = $login_log; -var $root owned = [$login_log]; var $thing gender = $gender_neuter; diff -rwu src-3.0a7/lost_and_found.cdc ColdCore-3.0a9.02/src/lost_and_found.cdc --- src-3.0a7/lost_and_found.cdc Sat Aug 9 19:09:31 1997 +++ ColdCore-3.0a9.02/src/lost_and_found.cdc Tue Aug 19 12:15:20 1997 @@ -8,13 +8,12 @@ var $has_name name = ['prop, "Lost and Found box", "Lost and Found box"]; var $located location = $void; var $located obvious = 1; *var $location contents = ' ' lost_and_found.cdc var $root created_on = 806811775; var $root flags = ['methods, 'code, 'variables, 'core]; var $root inited = 1; var $root managed = [$lost_and_found]; var $root manager = $lost_and_found; -var $root owned = [$lost_and_found]; var $root settings = #[["home", $lost_and_found]]; var $thing gender = $gender_neuter; var $thing lock = <$object_lock_frob, [$void]>; diff -rwu src-3.0a7/mail_db.cdc ColdCore-3.0a9.02/src/mail_db.cdc --- src-3.0a7/mail_db.cdc Sat Aug 9 19:09:34 1997 +++ ColdCore-3.0a9.02/src/mail_db.cdc Tue Aug 19 12:15:21 1997 @@ -7,21 +7,16 @@ var $root inited = 1; var $root managed = [$mail_db]; var $root manager = $mail_db; -var $root owned = [$mail_db]; var $root trusted = [$mail_list]; root method .core_mail_db() { .set_database(#[["news", $mail_list_news], ["bugs", $mail_list_bugs]]); - - // $#Edited: 17 Feb 97 02:58 $user_vang }; public method .mail_name() { arg obj; return "*" + (obj.name()); - - // $# Edited 05 Nov 1995 14:04 Lynx ($lynx) }; public method .valid_recipient() { diff -rwu src-3.0a7/mail_lib.cdc ColdCore-3.0a9.02/src/mail_lib.cdc --- src-3.0a7/mail_lib.cdc Sat Aug 9 19:09:46 1997 +++ ColdCore-3.0a9.02/src/mail_lib.cdc Tue Aug 19 12:15:17 1997 @@ -7,7 +7,6 @@ var $root inited = 1; var $root managed = [$mail_lib]; var $root manager = $mail_lib; -var $root owned = [$mail_lib]; public method .has_mail_perms() { arg @args; @@ -19,28 +18,47 @@ } }; +public method .indent_reply() { + arg text; + var l, out; + + out = []; + for l in (text) { + if (!(l.match_begin(">"))) + out += l.wrap_lines(65, "> ", 1); + else + out += [">" + l]; + } + return out; +}; + public method .mail_name() { arg obj; + var name; if (!(obj.has_ancestor($mail_list))) throw(~type, "Object is not a child of $mail_recipient"); + name = (obj.name()).replace(" ", "-"); if (obj.has_ancestor($user)) - return (obj.name()).replace(" ", "-"); - return "*" + ((obj.name()).replace(" ", "-")); + return "~" + name; + return "*" + name; }; public method .match_mail_recipient() { arg name; catch ~namenf { - if ((name[1]) == "*") - return (> $mail_db.search(name.subrange(2)) <); + if (name) { if (name == "me") return sender(); - return (> $user_db.search(name) <); - } with { - throw(~listnf, ("No mail recipient found by the name \"" + name) + "\"."); + if ((name[1]) == "*") + return (> $mail_db.search(substr(name, 2)) <); + if ((name[1]) == "~") + return (> $user_db.search(substr(name, 2)) <); + return (| $mail_db.search(name) |) || (> $user_db.search(name) <); } + } + throw(~listnf, ("No mail recipient found by the name \"" + name) + "\"."); }; public method .range_to_actual() { diff -rwu src-3.0a7/mail_list.cdc ColdCore-3.0a9.02/src/mail_list.cdc --- src-3.0a7/mail_list.cdc Sat Aug 9 19:09:30 1997 +++ ColdCore-3.0a9.02/src/mail_list.cdc Tue Aug 19 12:15:18 1997 @@ -7,13 +7,11 @@ var $mail_list notify = [$mail_list]; var $mail_list readers = 1; var $mail_list senders = 1; *var $root child_index = '-' mail_list.cdc var $root created_on = 796268969; var $root flags = ['methods, 'code, 'core, 'variables]; var $root inited = 1; var $root managed = [$mail_list]; var $root manager = $mail_list; -var $root owned = [$mail_list]; var $root trusted_by = [$mail_db]; protected method ._announce_new_mail() { @@ -25,8 +23,6 @@ line = ((((.mail_name()) + " has been sent new mail by ") + ((new_mail.from()).name())) + ": ") + (new_mail.subject()); for who in (notify) (| who.tell(line.chop(who.linelen())) |); - - // $# Edited 05 Nov 1995 14:04 Lynx ($lynx) }; public method .add_mail() { @@ -139,7 +135,7 @@ if (!(.list_is_readable_by(sender()))) throw(~perm, "Sender cannot read this list."); - return mail[(cur in mail) + 1]; + return (> mail[(cur in mail) + 1] <); }; public method .mail_list_prev() { @@ -147,7 +143,7 @@ if (!(.list_is_readable_by(sender()))) throw(~perm, "Sender cannot read this list."); - return mail[(cur in mail) - 1]; + return (> mail[(cur in mail) - 1] <); }; public method .mail_name() { @@ -165,8 +161,6 @@ // this is a hack, we shouldn't ever get bad mail if things worked right (> .perms(caller(), $mail_ui) <); mail = setremove(mail, badmail); - - // $#Edited: 18 Nov 96 09:31 $brandon }; public method .recent_mail() { @@ -178,8 +172,6 @@ if ((mail.length()) < diff) return [0, mail]; return [((mail.length()) - diff) - 1, mail.subrange((mail.length()) - diff)]; - - // $#Edited: 30 Nov 96 21:22 $miro }; public method .senders() { @@ -235,6 +227,7 @@ notify = []; if (!(.has_ancestor($user))) (| $mail_db.remove(.name()) |); + $smtp.remove_aliases(); }; diff -rwu src-3.0a7/mail_list_news.cdc ColdCore-3.0a9.02/src/mail_list_news.cdc --- src-3.0a7/mail_list_news.cdc Sat Aug 9 19:09:33 1997 +++ ColdCore-3.0a9.02/src/mail_list_news.cdc Tue Aug 19 12:15:20 1997 @@ -13,6 +13,5 @@ var $root inited = 1; var $root managed = [$mail_list_news]; var $root manager = $mail_list_news; -var $root owned = [$mail_list_news]; diff -rwu src-3.0a7/mail_message.cdc ColdCore-3.0a9.02/src/mail_message.cdc --- src-3.0a7/mail_message.cdc Sat Aug 9 19:09:34 1997 +++ ColdCore-3.0a9.02/src/mail_message.cdc Tue Aug 19 12:15:18 1997 @@ -4,15 +4,14 @@ var $mail_message creator = 0; var $mail_message delivered = 0; var $mail_message header = #[]; +var $mail_message meta = 0; var $mail_message readers = []; *var $root child_index = '-' mail_message.cdc var $root created_on = 796268969; var $root fertile = 1; var $root flags = ['methods, 'code, 'fertile, 'core, 'variables]; var $root inited = 1; var $root managed = [$mail_message]; var $root manager = $mail_message; -var $root owned = [$help_coldc_net_client, $not_lock_frob, $message_frob, $trie, $help_coldc_mcall, $help_sys_weather_attributes, $help_func_definer, $help_func_pass, $help_func_pause, $help_funcs_file, $help_funcs_list, $help_func_file, $help_node, $xor, $help_obj_trie, $help_coldc_tasks_tasks, $help_coldc_tasks_preempt, $gender, $help_func_refresh, $help_func_ticks_left, $help_func_method, $help_coldc_tasks_preempt_examp, $help_func_bind_function, $format, $gender_plural, $help_func_atomic, $help_func_resume, $help_app_gender, $help_func_cancel, $help_updates, $help_coldc_ops, $help_cmd_spoof, $help_func_sender, $help_cmd_dnt, $help_func_set_user, $help_func_add_var, $help_func_clear_var, $help_funcs_buf, $help_funcs_data, $help_func_method_bytecode, $help_func_stack, $help_func_suspend, $mail_message, $and, $help_places_realms, $help_func_task_id, $help_func_task_info, $help_cmd_page, $help_func_tasks, $help_coldc_data, $help_places_exen, $help_func_method_info, $help_func_create, $help_func_anticipate_assignment, $help_func_methods, $help_func_rename_method, $help_func_set_method_access, $help_func_ancestors, $help_places_env, $help_coldc_vars, $help_coldc_fcall, $help_func_this, $help_func_tick, $help_func_del_var, $help_funcs_meth, $help_func_user, $help_func_dblog, $help_cmd_describe, $help_func_ctime, $help_func_localtime, $help_func_mtime, $help_func_time, $help_func_class, $help_func_fromliteral, $help_func_size, $help_func_toerr, $help_func_tofloat, $help_func_toint, $help_coldc_err_expr, $help_coldc_loop_expr, $help_coldc_prec, $help_func_toliteral, $help_funcs_num, $help_func_toobjnum, $help_func_tostr, $help_func_tosym, $help_cml, $help_coldc_index, $help_func_valid, $help_func_buf_replace, $help_func_buf_to_str, $help_func_buf_to_strings, $help_func_bufgraft, $help_func_bufidx, $help_cmd_new, $help_cmd_build, $help_func_backup, $help_func_shutdown, $help_func_buflen, $html_format, $help_func_set_heartbeat, $help_coldc_arith, $help_func_str_to_buf, $help_func_strings_to_buf, $help_func_subbuf, $help_func_dict_add, $help_func_dict_contains, $help_func_dict_del, $help_func_dict_keys, $help_func_dict_union, $help_func_dict_values, $help_func_delete, $help_func_children, $help_func_insert, $help_func_join, $help_func_listidx, $help_func_listlen, $help_func_replace, $help_func_setadd, $help_coldc_assign, $help_func_setremove, $help_coldc_logical, $help_func_bind_port, $help_cmd_dig, $help_coldc_cond, $help_coldc_splice, $help_coldc_find, $inside_lock_frob, $help_func_sublist, $help_func_union, $help_func_chparents, $help_build_cmds, $help_coldc, $help_func_crypt, $help_coldc_incdec, $help_cmd_whisper, $uncompiler, $housekeeper, $help_func_explode, $bs_eval, $help_coldc_non_arith, $help_coldc_dual_assign, $help_coldc_simple_assign, $help_coldc_scatter_assign, $help_coldc_default_assign, #-622, $help_coldc_objs, $help_func_lowercase, $help_func_unbind_port, $word, $help_coldc_objs_ref, $help_func_set_var, $help_func_strcmp, $help_coldc_cond_ifelse, $help_func_match_begin, $help_func_open_connection, $help_func_data, $help_func_del_objname]; var $root quota_exempt = 1; public method .add_reader(): nooverride { @@ -35,10 +34,14 @@ header = header.add('rcpt, current.union([whom])); }; +public method .body() { + if (!($mail_lib.has_mail_perms(caller()))) + (> .perms(sender()) <); + return .text(); +}; + public method .creator() { return creator; - - // $#Edited: 02 Nov 96 12:28 $brandon }; public method .del_recipient(): nooverride { @@ -63,12 +66,25 @@ }; public method .format(): nooverride { - var output, o, h; + arg @metainfo; + var output, o, h, line, br, sep, i; if (!($mail_lib.has_mail_perms(caller()))) (> .perms(sender()) <); h = .header(); - return (["From: " + ($object_lib.get_name(h['from], 'namef, ['ref])), "To: " + (((h['rcpt]).omap($mail_lib, 'mail_name)).to_english()), "When: " + ($time.format("%I:%M %p %v", h['time])), "Subject: " + (h['subj]), "---"] + (.text())) + ["---"]; + o = []; + br = $cml_lib.format_br_tag(); + sep = $cml_lib.format_sep_tag(); + if (metainfo) { + for i in (meta || []) + o += [$cml_lib.format_tr_tag($cml_lib.format_td_tag(("I-" + (i[1])) + ":"), $cml_lib.format_td_tag(i[2]))]; + } + o += [$cml_lib.format_tr_tag($cml_lib.format_td_tag("From:"), $cml_lib.format_td_tag($object_lib.get_name(h['from], 'mail_name)))]; + o += [$cml_lib.format_tr_tag($cml_lib.format_td_tag("To:"), $cml_lib.format_td_tag(((h['rcpt]).omap($mail_lib, 'mail_name)).to_english()))]; + o += [$cml_lib.format_tr_tag($cml_lib.format_td_tag("When:"), $cml_lib.format_td_tag($time.format("%I:%M %p %d-%b-%Y", h['time])))]; + o += [$cml_lib.format_tr_tag($cml_lib.format_td_tag("Subject:"), $cml_lib.format_td_tag(h['subj]))]; + output = [$cml_lib.format_table_tag("18%,82%", @o), sep, map line in (.text()) to ([line, br]), sep]; + return $ctext_frob.new_with(output); }; public method .from(): nooverride { @@ -99,21 +115,21 @@ .set_flags([]); }; -public method .letter(): nooverride { +public method .meta(): nooverride { if (!($mail_lib.has_mail_perms(caller()))) (> .perms(sender()) <); - return (.header()).add('text, .text()); + return meta || []; }; public method .new_mail(): nooverride { - var new; + var new, suffix; // if (!$mail_lib.has_mail_perms(caller())) // (> .perms(sender()) <); if (definer() != this()) throw(~perm, "Only spawn mail from $mail_message."); - new = .spawn(); - new.add_writer(sender()); + suffix = tosym("mail_" + (.get_obj_suffix())); + new = (> $sys.spawn_selfmanager(suffix, sender()) <); // since anybody can create mail, do some tracking.. new.set_creator(user()); @@ -172,14 +188,11 @@ } delivered = 1; return invalid; - - // $#Edited: 22 Nov 96 17:54 $miro }; -public method .set_creator() { +private method .set_creator() { arg who; - (> .perms(caller(), definer()) <); creator = who; }; @@ -191,6 +204,14 @@ header = header.add('from, whom); }; +public method .set_meta(): nooverride { + arg new_meta; + + if (!($mail_lib.has_mail_perms(caller()))) + (> .perms(sender()) <); + meta = new_meta; +}; + public method .set_recipients(): nooverride { arg whom; @@ -219,7 +240,7 @@ return (| header['subj] |) || "<none>"; }; -public method .text() { +protected method .text() { return (> pass() <) || ["", "(no message)", ""]; }; diff -rwu src-3.0a7/mail_root.cdc ColdCore-3.0a9.02/src/mail_root.cdc --- src-3.0a7/mail_root.cdc Sat Aug 9 19:09:30 1997 +++ ColdCore-3.0a9.02/src/mail_root.cdc Tue Aug 19 12:15:17 1997 @@ -1,14 +1,12 @@ new object $mail_root: $misc; *var $root child_index = '-' mail_root.cdc var $root created_on = 796268969; var $root fertile = 1; var $root flags = ['methods, 'code, 'fertile, 'core, 'variables]; var $root inited = 1; var $root managed = [$mail_root]; var $root manager = $mail_root; -var $root owned = [$mail_root]; var $root trusted = []; diff -rwu src-3.0a7/mail_ui.cdc ColdCore-3.0a9.02/src/mail_ui.cdc --- src-3.0a7/mail_ui.cdc Sat Aug 9 19:09:30 1997 +++ ColdCore-3.0a9.02/src/mail_ui.cdc Tue Aug 19 12:15:18 1997 @@ -13,8 +13,10 @@ [["@nn|@next-new", "*", "@nn|@next-new <any>", 'next_new_cmd, #[[1, ['any, []]]]]]],\ ["@mail",\ [["@mail", "*", "@mail <any>", 'mail_on_cmd, #[[1, ['any, []]]]]]],\ + ["@reply",\ + [["@reply", "*", "@reply <any>", 'reply_cmd, #[[1, ['any, []]]]]]],\ ["@send",\ - [["@send", "*", "@send <any>", 'send_to_cmd, #[[1, ['any, []]]]]]]]; + [["@send", "*", "@send <any: +e?dit>", 'send_to_cmd, #[[1, ['any_opt, ["e?dit"]]]]]]]]; var $has_commands shortcuts = #[]; var $has_name name = ['prop, "Mail User Interface", "Mail User Interface"]; var $mail_list last_letter = 0; @@ -27,11 +29,13 @@ var $mail_ui current = 0; var $mail_ui subscribed = #[]; var $root created_on = 796268969; +var $root defined_settings = #[["@send-editor", #[['parse, ['is_boolean]], ['format, ['format_boolean]]]]]; var $root flags = ['methods, 'code, 'core, 'variables]; +var $root help_node = $help_mail; var $root inited = 1; var $root managed = [$mail_ui]; var $root manager = $mail_ui; -var $root owned = [$mail_ui]; +var $root settings = #[["@send-editor", 1]]; root method .init_mail_ui() { current = #[['list, this()]]; @@ -45,22 +49,17 @@ protected method .mail_lists_cmd() { arg @args; - var l, line; + var l, output; + if (caller() != $mail_ui) (> .perms(caller(), 'command) <); - for l in (($mail_db.database()).values()) { - line = ""; - if (l.list_is_readable_by(this())) - line = "[Readable]"; - if (l.list_is_sendable_by(this())) - line = ("[Sendable]" + (line ? " " : "")) + line; - .tell((((l.mail_name()).pad(((.linelen()) - (line.length())) - 1)) + " ") + line); - } + output = map l in (($mail_db.database()).values()) to ($cml_lib.format_tr_tag($cml_lib.format_td_tag(l.mail_name()), $cml_lib.format_td_tag((l.list_is_sendable_by(this())) ? "[Sendable]" : " "), $cml_lib.format_td_tag((l.list_is_readable_by(this())) ? "[Readable]" : " "))); + return $ctext_frob.new_with(["All Available Mail Lists:", $cml_lib.format_table_tag("70%,15%,15%", @output), $cml_lib.format_sep_tag()]); }; protected method .mail_on_cmd() { arg cmdstr, cmd, str; - var args, lmail, mail, rng, start, end, line, list, len, out, m, rows; + var args, lmail, mail, rng, start, end, line, list, len, out, m, rows, o, from; (> .perms(caller(), 'command) <); if ((args = match_template(str, "* on *"))) { @@ -103,23 +102,35 @@ } if (!mail) return "No mail on " + (list.mail_name()); - len = (.linelen()) - 33; + len = (.linelen()) - 36; out = [((("Mail from " + rng) + " on ") + (list.mail_name())) + ":"]; lmail = list.mail(); + o = []; for m in (mail) { - if (!valid(m)) + if (!valid(m)) { list.notify_bad_mail(m); - else - out += [strfmt("%s%3r:%s%*L %14L%11l", (mail == (| (subscribed[list])[2] |)) ? "=>" : " ", m in lmail, (m.has_read(this())) ? " " : "!", len, m.subject(), $object_lib.get_name(m.from(), 'name), $time.format("%d-%h-%Y", m.time()))]; + } else { + from = $object_lib.get_name(m.from(), 'name); + if (from && (((from[1]) == "<") && ("@" in from))) + from = (explode(from, "@")[1]) + ">"; + o += [$cml_lib.format_tr_tag($cml_lib.format_td_tag((m == (| (subscribed[list])[2] |)) ? "=>" : " "), $cml_lib.format_td_tag(m in lmail), $cml_lib.format_td_tag((m.has_read(this())) ? " " : "!"), $cml_lib.format_td_tag(m.subject()), $cml_lib.format_td_tag(from), $cml_lib.format_td_tag(m.lines()), $cml_lib.format_td_tag($time.format("%d-%h-%Y", m.time())))]; } - .tell(out + ["------"]); + } + return $ctext_frob.new_with((out + [$cml_lib.format_table_tag("5%,5%,2%,50%,17%,5%,15%", o)]) + [$cml_lib.format_sep_tag()]); }; protected method .mail_read_cmd() { arg cmdstr, cmd, str; - var mail, m, args, lname, list, rng, args; + var mail, m, args, opts, lname, list, rng, args, meta; (> .perms(caller(), 'command) <); + [args, opts] = $parse_lib.opt(str, "m?eta"); + str = args.join(" "); + meta = []; + if ((m = "m?eta" in (opts.slice(1)))) { + if ((opts[m])[3]) + meta = [1]; + } if ((args = match_template(str, "* on *"))) { rng = args[1]; catch ~listnf @@ -140,12 +151,12 @@ return ("You must specify a message to read on " + (list.mail_name())) + "."; catch ~range { if (rng == "next") { - .read_mail((> list.mail_list_next((subscribed[list])[2]) <), list); + .read_mail((> list.mail_list_next((subscribed[list])[2]) <), list, @meta); } else if (rng == "prev") { - .read_mail((> list.mail_list_prev((subscribed[list])[2]) <), list); + .read_mail((> list.mail_list_prev((subscribed[list])[2]) <), list, @meta); } else { for m in ($mail_lib.range_to_actual($parse_lib.range(rng), current)) - .read_mail(m, list); + .read_mail(m, list, @meta); } } with { return ((("Mail message " + rng) + " does not exist on ") + (list.mail_name())) + "."; @@ -182,7 +193,7 @@ return ("You must specify a message to remove from " + lname) + "."; if (!list) { list = current['list]; - ans = .prompt(("Remove mail from " + (list.mail_name())) + "? "); + ans = .prompt(((("Remove mail " + rng) + " from ") + (list.mail_name())) + "? "); if (type(ans) == 'symbol) return; if (match_regexp(ans, "no|n")) @@ -227,61 +238,6 @@ } }; -protected method .mail_to_cmd() { - arg cmdstr, cmd, str; - var subj, lists, note, list, x, mail, text, args; - - (> .perms(caller(), 'command) <); - if ((args = match_template(str, "* to *"))) { - note = args[1]; - args = args[3]; - } else if ((cmd == "@mail") && (args = match_template(str, "* on *"))) { - return (> .mail_on_cmd(cmdstr, cmd, str) <); - } else { - note = ""; - args = str; - } - if (args) { - lists = []; - for list in (args.explode_english_list()) { - catch ~listnf { - list = (> $mail_lib.match_mail_recipient(list) <); - lists += [list]; - } with { - .tell(("The list \"" + list) + "\" is invalid."); - } - } - if (!lists) - return "No lists specified."; - } else { - lists = [current['list]]; - } - - // get the text of the message - if (note) { - text = (> (.match_env_nice(note)).text() <); - } else { - text = .read("-- Enter text for mail message, \".\" when done or \"@abort\" to abort --"); - if (text == 'aborted) - return; - if (text == 'engaged) - return "** Already reading - mail send aborted **"; - } - subj = .prompt("Subject: "); - if (subj == "@abort") - return "** Aborted mail send **"; - if (subj == 'engaged) - return "** Already reading - mail send aborted **"; - mail = $mail_message.new_mail(); - mail.set_subject(subj); - mail.set_text(text); - catch any - mail.send(@lists); - with - return (traceback()[1])[2]; - return "Mail sent."; -}; - protected method .new_list() { arg list; @@ -347,7 +303,80 @@ } }; -protected method .read_mail() { +public method .old_mail_lists_cmd() { + arg @args; + var l, line; + + if (caller() != $mail_ui) + (> .perms(caller(), 'command) <); + for l in (($mail_db.database()).values()) { + line = ""; + if (l.list_is_readable_by(this())) + line = "[Readable]"; + if (l.list_is_sendable_by(this())) + line = ("[Sendable]" + (line ? " " : "")) + line; + .tell((((l.mail_name()).pad(((.linelen()) - (line.length())) - 1)) + " ") + line); + } +}; + +public method .old_mail_on_cmd() { + arg cmdstr, cmd, str; + var args, lmail, mail, rng, start, end, line, list, len, out, m, rows; + + (> .perms(caller(), 'command) <); + if ((args = match_template(str, "* on *"))) { + rng = args[1]; + list = args[3]; + } else if (match_template(str, "* to *")) { + return (> .send_to_cmd(cmdstr, cmd, str) <); + } else { + rng = ""; + list = str; + } + if (!list) { + list = current['list]; + } else { + catch ~listnf, ~perm { + list = (> $mail_lib.match_mail_recipient(list) <); + (> .new_list(list) <); + } with { + return (traceback()[1])[2]; + } + } + if (!rng) { + mail = list.mail(); + end = mail.length(); + + // minus two for the head and tail + rows = (.get_rows()) - 2; + if (end > rows) { + start = end - rows; + mail = sublist(mail, start); + } else { + start = 1; + } + rng = (start + "-") + end; + } else { + catch ~range + mail = $mail_lib.range_to_actual($parse_lib.range(rng), current); + with + return (traceback()[1])[2]; + } + if (!mail) + return "No mail on " + (list.mail_name()); + len = (.linelen()) - 36; + out = [((("Mail from " + rng) + " on ") + (list.mail_name())) + ":"]; + lmail = list.mail(); + for m in (mail) { + if (!valid(m)) + list.notify_bad_mail(m); + else + out += [strfmt("%s%3r:%s%*L %12L%5l%11l", (m == (| (subscribed[list])[2] |)) ? "=>" : " ", m in lmail, (m.has_read(this())) ? " " : "!", len, m.subject(), $object_lib.get_name(m.from(), 'name), m.lines(), $time.format("%d-%h-%Y", m.time()))]; + } + .tell(out + ["------"]); +}; + +public method .old_read_mail() { arg mail, list; var loc; @@ -358,17 +387,86 @@ subscribed = subscribed.add(list, [time(), mail]); }; +protected method .read_mail() { + arg mail, list, @metainfo; + var loc, out; + + loc = mail in (list.mail()); + out = $ctext_frob.new_with([strfmt("Message %l (%l) on %s:", loc, mail.name(), list.mail_name())]); + .tell(out.append(mail.format(@metainfo))); + mail.did_read(); + subscribed = subscribed.add(list, [time(), mail]); +}; + +protected method .reply_cmd() { + arg cmdstr, cmd, str; + var list, msg, args, i, subj, text, recip; + + (> .perms(caller(), 'command) <); + if ((args = match_template(str, "to *"))) + str = args[2]; + if ((args = match_template(str, "* on *"))) + [msg, str, list] = args; + else + msg = str; + if (!list) { + list = current['list]; + } else { + catch ~listnf, ~perm { + list = (> $mail_lib.match_mail_recipient(list) <); + (> .new_list(list) <); + } with { + return (traceback()[1])[2]; + } + } + if (!msg) { + if (!(msg = (| (subscribed[list])[2] |))) + return "No current message to reply to."; + } else { + catch ~range + msg = $mail_lib.range_to_actual($parse_lib.range(msg), current); + with + return (traceback()[1])[2]; + msg = msg[1]; + } + i = msg in (list.mail()); + if (list.is($user)) + recip = msg.from(); + else + recip = list; + if (!(recip.is($mail_list))) + return (list.namef('ref)) + " is not a valid mail recipient."; + .tell(((("Replying to message " + i) + " on ") + (list.mail_name())) + "."); + text = msg.body(); + if (text == ["", "(no message)", ""]) + text = []; + text = $mail_lib.indent_reply(text); + text = [((("On " + ($time.format("%d-%b-%Y", msg.time()))) + " ") + ((msg.from()).namef('ref))) + " said: "] + text; + if (.active_editor()) { + .tell("Storing active editor.."); + .store_editor(); + } + subj = msg.subject(); + if (!(subj.match_begin("Re:"))) + subj = "Re: " + subj; + (> .invoke_editor(this(), '_edit_mail_callback, text, ['mail, [recip], subj, i, msg]) <); + if (.active_editor()) { + .tell(("Editor invoked with " + ((.active_editor()).session_name())) + "."); + .tell("Type 'help' for available commands."); + } +}; + protected method .send_to_cmd() { arg cmdstr, cmd, str; - var subj, lists, note, list, x, mail, text, args; + var subj, lists, note, list, x, mail, text, args, edit; (> .perms(caller(), 'command) <); - if ((args = match_template(str, "* to *"))) { + if ((args = match_template((str[1]).join(" "), "* to *"))) { note = args[1]; args = args[3]; } else { note = ""; - args = str; + args = (str[1]).join(" "); } if (args) { lists = []; @@ -384,11 +482,27 @@ return "No lists specified."; } else { lists = [current['list]]; + .tell(("No recipient specified, using current recipient (" + ((lists[1]).mail_name())) + ")"); } + edit = "e?dit" in ((str[2]).slice(1)); + edit = edit ? (((str[2])[edit])[3]) : (.get_setting("@send-editor", $mail_ui)); // get the text of the message + if ((!note) && edit) { + if (.active_editor()) { + .tell("Storing active editor.."); + .store_editor(); + } + subj = ""; + text = []; + (> .invoke_editor(this(), '_edit_mail_callback, text, ['mail, lists, subj, 0, 0]) <); + if (.active_editor()) { + .tell(("Editor invoked with " + ((.active_editor()).session_name())) + "."); + .tell("Type 'help' for available commands."); + } + } else { if (note) { - text = (> (.match_env_nice(note)).text() <); + text = (> (.match_env_nice(note)).get_raw_text() <); } else { text = .read("-- Enter text for mail message, \".\" when done or \"@abort\" to abort --"); if (text == 'aborted) @@ -409,8 +523,7 @@ with return (traceback()[1])[2]; return "Mail sent."; - - // $#Edited: 30 Nov 96 04:08 $brad + } }; protected method .subscribe() { @@ -429,16 +542,18 @@ (> .perms(caller(), 'command) <); // this is ugly bad bad - args = $parse_lib.getopt(str, [["n?ew"]]); + args = $parse_lib.opt(str, "n?ew"); if (!(args[1])) { if ("n?ew" in ((args[2]).slice(1))) { out = []; for l in ((subscribed.keys()).setremove(this())) { if ((l.last_received_on()) > ((subscribed[l])[1])) - out = (out = [" " + (l.mail_name())]); + out += [" " + (l.mail_name())]; } if (out) .tell(["New mail on:"] + out); + else + .tell(["No new mail on the lists you are subscribed to."]); return; } .tell("Currently Subscribed Lists:"); @@ -449,6 +564,7 @@ line += " (new mail)"; .tell(line); } + .tell("---"); return; } list = $mail_lib.match_mail_recipient(str); diff -rwu src-3.0a7/math.cdc ColdCore-3.0a9.02/src/math.cdc --- src-3.0a7/math.cdc Sat Aug 9 19:09:47 1997 +++ ColdCore-3.0a9.02/src/math.cdc Tue Aug 19 12:15:37 1997 @@ -9,10 +9,10 @@ var $math transmat_3d = [[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0]]; var $root created_on = 845760297; var $root flags = ['variables, 'methods, 'code, 'core]; +var $root help_node = $help_obj_math; var $root inited = 1; var $root managed = [$math]; var $root manager = $math; -var $root owned = [$math]; public method .add(): native; @@ -22,16 +22,12 @@ arg coords; return [(coords[1]) * cos(coords[2]), (coords[1]) * sin(coords[2]), coords[3]]; - - // $#Edited: 24 Oct 96 14:04 $miro }; public method .deg_rad() { arg angle; return angle / 57.2958; - - // $#Edited: 24 Oct 96 14:03 $miro }; public method .distance(): native; @@ -43,8 +39,6 @@ var x, y; return map x in [1 .. n] to (map y in [1 .. n] to ((x == y) ? 1.0 : 0.0)); - - // $#Edited: 24 Oct 96 14:04 $miro }; public method .is_lower(): native; @@ -56,8 +50,6 @@ var i; return map i in [1 .. m1.length()] to (.add(m1[i], m2[i])); - - // $#Edited: 24 Oct 96 14:03 $miro }; public method .matrix_mul() { @@ -66,8 +58,6 @@ m2 = .transpose(m2); return map x in (m1) to (map y in (m2) to (.dot(x, y))); - - // $#Edited: 24 Oct 96 14:03 $miro }; public method .matrix_scale() { @@ -75,8 +65,6 @@ var x; return map x in (m) to (.scale(s, x)); - - // $#Edited: 24 Oct 96 14:04 $miro }; public method .matrix_sub() { @@ -90,30 +78,22 @@ public method .pi() { return pi; - - // $#Edited: 24 Oct 96 14:03 $miro }; public method .pi2() { return pi2; - - // $#Edited: 24 Oct 96 14:03 $miro }; public method .polar_rectangular() { arg coords; return [(coords[1]) * cos(coords[2]), (coords[1]) * sin(coords[2])]; - - // $#Edited: 24 Oct 96 14:03 $miro }; public method .rad_deg() { arg angle; return angle * 57.2958; - - // $#Edited: 24 Oct 96 14:03 $miro }; public method .rectangular_cylindrical() { @@ -124,8 +104,6 @@ if (a < 0) a += pi2; return [.distance(coords, origin_2d), a, coords[3]]; - - // $#Edited: 24 Oct 96 14:04 $miro }; public method .rectangular_polar() { @@ -136,8 +114,6 @@ if (a < 0) a += pi2; return [.distance(coords, origin_2d), a]; - - // $#Edited: 24 Oct 96 14:03 $miro }; public method .rectangular_spherical() { @@ -148,8 +124,6 @@ if (a < 0) a += pi2; return [(d = .distance(coords, origin_3d)), a, atan2(coords[3], .distance(coords.subrange(1, 2), origin_2d))]; - - // $#Edited: 24 Oct 96 14:04 $miro }; public method .rotation_mat_2d() { @@ -159,8 +133,6 @@ s = sin(angle); c = cos(angle); return [[c, s, 0.0], [-s, c, 0.0], [0.0, 0.0, 1.0]]; - - // $#Edited: 24 Oct 96 14:04 $miro }; public method .rotation_mat_3d() { @@ -184,23 +156,19 @@ return [[1.0, 0.0, 0.0, 0.0], [0.0, c, s, 0.0], [0.0, -s, c, 0.0], [0.0, 0.0, 0.0, 1.0]]; } } - - // $#Edited: 24 Oct 96 14:04 $miro }; public method .runge() { - arg x, y, h, f; + arg x, y, h, f, data; var k1, k2, k3, k4, s; - // returns the next timestep for differential equation y'=f(x,y) + // returns the next timestep for differential equation y'=f(x,y,data) s = sender(); - k1 = s.f(x, y); - k2 = s.f(x + (0.5 * h), .add(y, .scale(0.5 * h, k1))); - k3 = s.f(x + (0.5 * h), .add(y, .scale(0.5 * h, k2))); - k4 = s.f(x + h, .add(y, .scale(h, k3))); + k1 = s.f(x, y, data); + k2 = s.f(x + (0.5 * h), .add(y, .scale(0.5 * h, k1)), data); + k3 = s.f(x + (0.5 * h), .add(y, .scale(0.5 * h, k2)), data); + k4 = s.f(x + h, .add(y, .scale(h, k3)), data); return .add(y, .scale(h / 6.0, .add(.add(k1, .scale(2.0, .add(k2, k3))), k4))); - - // $#Edited: 18 Dec 96 23:12 $miro }; public method .scale(): native; @@ -212,16 +180,12 @@ return [[scale[1], 0.0, 0.0], [0, scale[2], 0.0], [0.0, 0.0, 1.0]]; else return [[scale[1], 0.0, 0.0, 0.0], [0.0, scale[2], 0.0, 0.0], [0.0, 0.0, scale[3], 0.0], [0.0, 0.0, 0.0, 1]]; - - // $#Edited: 24 Oct 96 14:04 $miro }; public method .skew() { arg v; return [[0.0, v[3], -(v[2])], [-(v[3]), 0.0, v[1]], [v[2], -(v[1]), 0.0]]; - - // $#Edited: 24 Oct 96 14:04 $miro }; public method .spherical_rectangular() { @@ -233,8 +197,6 @@ theta = coords[3]; r1 = r * cos(theta); return [r1 * cos(phi), r1 * sin(phi), r * sin(theta)]; - - // $#Edited: 24 Oct 96 14:03 $miro }; public method .sub(): native; @@ -244,8 +206,6 @@ var x, y; return map x in (v1) to (map y in (v2) to (x * y)); - - // $#Edited: 24 Oct 96 14:04 $miro }; public method .transform_vect() { @@ -258,9 +218,6 @@ } outvect = map x in (m) to (.dot(x, v)); return flag ? (outvect.subrange(1, (outvect.length()) - 1)) : outvect; - - // $#Edited: 24 Oct 96 14:04 $miro - // $#Edited: 30 Nov 96 21:22 $miro }; public method .translation_mat() { @@ -271,9 +228,6 @@ return transmat_2d + [vector + [1.0]]; else return transmat_3d + [vector + [1.0]]; - - // $#Edited: 24 Oct 96 14:04 $miro - // $#Edited: 30 Nov 96 21:22 $miro }; public method .transpose(): native; diff -rwu src-3.0a7/message_frob.cdc ColdCore-3.0a9.02/src/message_frob.cdc --- src-3.0a7/message_frob.cdc Sat Aug 9 19:09:33 1997 +++ ColdCore-3.0a9.02/src/message_frob.cdc Tue Aug 19 12:15:36 1997 @@ -6,7 +6,6 @@ var $root inited = 1; var $root managed = [$message_frob]; var $root manager = $message_frob; -var $root owned = [$message_frob]; public method .add_entry() { arg this, key, what; @@ -51,12 +50,8 @@ public method .format() { arg this, vars; - var new; - new = (| this[vars['receiver]] |) || ((| this["general"] |) || ($ctext_frob.new_with([""]))); - new = new.set_vars(vars); - new = new.format(); - return new; + return ((.to_ctext(this, vars)).append([], "br")).format(); }; public method .get_part() { @@ -94,23 +89,33 @@ return this.keys(); }; +public method .propagate() { + arg self, f; + + return ($filtered_frob.new_with(self, sender())).propagate(f); +}; + public method .set_vars() { arg this, new; var d; - for d in (this.keys()) - this = this.add(d, (this[d]).set_vars(new)); - return (<this(), this>); + return (<this(), (hash d in (this) to ([d[1], (d[2]).set_vars(new)]))>); +}; + +public method .to_ctext() { + arg this, vars; + var new; + + new = (| this[vars['receiver]] |) || ((| this["general"] |) || ($ctext_frob.new_with([""]))); + new = new.set_vars(vars); + return new; }; public method .uncompile() { arg this; - var key, output; + var key; - output = #[]; - for key in (this) - output = output.add(key[1], (key[2]).uncompile()); - return output; + return hash key in (this) to ([key[1], (key[2]).uncompile()]); }; diff -rwu src-3.0a7/misc.cdc ColdCore-3.0a9.02/src/misc.cdc --- src-3.0a7/misc.cdc Sat Aug 9 19:09:30 1997 +++ ColdCore-3.0a9.02/src/misc.cdc Tue Aug 19 12:15:16 1997 @@ -1,13 +1,11 @@ new object $misc: $core; *var $root child_index = '-' misc.cdc var $root created_on = 796268969; var $root fertile = 1; var $root flags = ['methods, 'code, 'fertile, 'core, 'variables]; var $root inited = 1; var $root managed = [$misc]; var $root manager = $misc; -var $root owned = [$misc]; diff -rwu src-3.0a7/motd.cdc ColdCore-3.0a9.02/src/motd.cdc --- src-3.0a7/motd.cdc Sat Aug 9 19:09:48 1997 +++ ColdCore-3.0a9.02/src/motd.cdc Tue Aug 19 12:15:17 1997 @@ -3,7 +3,7 @@ var $motd connect_help = ["Connection HELP", "===============", "", "Connecting as a guest: 'connect-guest <name> <email>'", " Example: 'connect-guest John Doe johnd@site.usa.com'", "", "Connecting as a user: 'connect <name> <password>'", " Example: 'connect John Doe mypassword'", "", "Quitting (this screen): '@quit' or 'quit'", "", "Connected Users Listing: '@who' or 'who'"]; var $motd notes = []; -var $motd server_name = "the Cold Dark"; +var $motd server_name = "ColdCore"; var $motd server_title = "Virtual Environment Server"; var $motd server_url = "http://none:1180/"; var $root created_on = 796268969; @@ -12,17 +12,16 @@ var $root inited = 1; var $root managed = [$motd]; var $root manager = $motd; -var $root owned = [$motd]; public method .build() { arg @args; - var output, out; + var output, out, line; output = []; if (!args) args = ['long, 'quote]; if ((args[1]) == 'default) - args = ['name, "", 'title, "", "", 'quote, "", 'notes, "", 'admins, 'connected, 'core_version, 'driver_version]; + args = ['name, "", 'title, "", "", 'quote, "", 'notes, 'admins, "", 'connected, 'core_version, 'driver_version]; while (args) { if (type(args[1]) == 'string) { output += [""]; @@ -43,9 +42,9 @@ case 'quote: output += ($code_lib.random_quote()).center_lines(79); case 'admins: - out = $list.to_english($list.mmap($sys.admins(), 'name)); - out = ("Administrators: " + out).center(79); - output += [out]; + out = ($list.to_english($list.mmap($sys.admins(), 'name))).wrap_lines(50); + line = out[1]; + output += (["Administrators: " + line] + delete(out, 1)).mmap('center, 79); case 'connected: out = "Currently Connected users: "; out += tostr(($user_db.connected()).length()); @@ -69,8 +68,26 @@ public method .build_html() { arg @args; + var page, p; - return [("<head><title>" + server_name) + "</title></head>", "<body bgcolor=\"#000000\" text=\"#ffefef\" link=\"#b000f0\" vlink=\"#9000c0\" alink=\"#f000f0\">", "<p align=center><img src=\"http://www.cold.org/images/tCD.gif\" alt=\"The Cold Dark\"></p>", ("<h3 align=center>" + server_title) + "</h3>", "<p align=center><tt>", @$code_lib.random_quote(), "</tt></p>", "<p align=center>", @notes, "</p>", ("<p align=center>Administrators: " + ((($sys.admins()).mmap('hname)).to_english())) + "<br>", ("<a href=\"/bin/who\">Currently Connected users</a>: " + tostr($user_db.total_connected())) + "<br>", ("Server Lag: " + ($lag_watcher.lag())) + " seconds.<br>", "Driver: <b><a href=\"http://www.cold.org/Software/Genesis/\">Genesis</a></b> " + ($sys.server_info('driver_version)), ("<br>Core: <b>" + ($sys.server_info('core_version, 'long))) + "</b>", ("<p align=center><a href=\"http://" + ($sys.server_info('server_hostname))) + "/login/\"><b><i>Enter the Cold Dark</i></b></a>", "<p align=center>The Cold Dark is a Virtual Environment System. There is no game in the Cold Dark, the purpose is to create a core which expands the physicality of a Virtual Environment. To further explore the database, follow the <a href=\"/start.html\">Database Starting Points</a> link.</p>", "<hr>", "<p align=center>", "<a href=\"/history.html\"><b>History</b></a> |", "<a href=\"/features.html\"><b>Features</b></a> |", "<a href=\"http://www.cold.org/Intro/\"><b>Introduction</b></a> |", "<a href=\"/start.html\"><b>DB Starting Points</b></a>", "</p>"]; + // this is your home page, change it as you whim may direct you + p = "<p align=center>"; + page = [("<head><title>" + server_name) + "</title></head>"]; + page += ["<body bgcolor=\"#000000\" text=\"#ffefef\" link=\"#b000f0\" vlink=\"#9000c0\" alink=\"#f000f0\">"]; + page += [("<h1 align=center>" + server_name) + "</h1>"]; + page += [("<h3 align=center>" + server_title) + "</h1>"]; + page += ([p + "<tt>"] + ($code_lib.random_quote())) + ["</tt>"]; + page += [p] + notes; + page += [(p + "Administrators: ") + ((($sys.admins()).mmap('hname)).to_english())]; + page += ["<br><a href=\"/bin/who\">Currently Connected users</a>: " + ($user_db.total_connected())]; + page += [("<br>Server Lag: " + ($lag_watcher.lag())) + " seconds."]; + page += ["<br>Driver: <b><a href=\"http://www.cold.org/Software/Genesis/\">Genesis</a></b> " + ($sys.server_info('driver_version)), ("<br>Core: <b>" + ($sys.server_info('core_version, 'long))) + "</b>"]; + + // page += ["<p align=center><a href=\"http://" + $sys.server_info('server_hostname) + "/login/\"><b><i>Enter the Cold Dark</i></b></a>" + page += ["<p><hr size=1 noshade width=\"50%\"><p align=center><b>"]; + page += ["<a href=\"http://www.cold.org/Software/ColdCore/newadmin.html\">New Admins Guide</a> |", "<a href=\"http://www.cold.org/~faq/tutor/\">Tutorial</a> |", "<a href=\"http://www.cold.org/~faq/cold.html\">FAQ</a> |", "<a href=\"/bin/help?node=help_coldc\">Programmer's Manual</a> |", "<a href=\"/bin\">Gateways</a> |", "<a href=\"/bin/help\">Help System</a>"]; + page += ["</b><p><hr size=1 noshade width=\"50%\">"]; + return page; }; public method .connect_help() { @@ -79,6 +96,10 @@ root method .core_motd() { server_url = "http://none:1180/"; + .del_method('build_html); + .rename_method('core_build_html, 'build_html); + server_name = "ColdCore"; + server_title = "Virtual Environment Server"; }; public method .get_server_name_setting() { @@ -102,7 +123,7 @@ }; public method .server_url() { - return ((("http://" + ($network.hostname())) + ":") + ($http_daemon.current_port())) + "/"; + return ((("http://" + ($dns.hostname(""))) + ":") + ($http_daemon.current_port())) + "/"; }; public method .set_connect_help() { @@ -133,6 +154,12 @@ arg name, definer, value, @args; server_title = value; +}; + +public method .tcd_build_html() { + arg @args; + + return [("<head><title>" + server_name) + "</title></head>", "<body bgcolor=\"#000000\" text=\"#ffefef\" link=\"#b000f0\" vlink=\"#9000c0\" alink=\"#f000f0\">", "<p align=center><img src=\"http://www.cold.org/images/tCD.gif\" alt=\"The Cold Dark\"></p>", ("<h3 align=center>" + server_title) + "</h3>", "<p align=center><tt>", @$code_lib.random_quote(), "</tt></p>", "<p align=center>", @notes, "</p>", ("<p align=center>Administrators: " + ((($sys.admins()).mmap('hname)).to_english())) + "<br>", ("<a href=\"/bin/who\">Currently Connected users</a>: " + tostr($user_db.total_connected())) + "<br>", ("Server Lag: " + ($lag_watcher.lag())) + " seconds.<br>", "Driver: <b><a href=\"http://www.cold.org/Software/Genesis/\">Genesis</a></b> " + ($sys.server_info('driver_version)), ("<br>Core: <b>" + ($sys.server_info('core_version, 'long))) + "</b>", ("<p align=center><a href=\"http://" + ($sys.server_info('server_hostname))) + "/login/\"><b><i>Enter the Cold Dark</i></b></a>", "<p align=center>The Cold Dark is a Virtual Environment System. There is no game in the Cold Dark, the purpose is to create a core which expands the physicality of a Virtual Environment. To further explore the database, follow the <a href=\"/start.html\">Database Starting Points</a> link.</p>", "<hr>", "<p align=center>", "<a href=\"/history.html\"><b>History</b></a> |", "<a href=\"/features.html\"><b>Features</b></a> |", "<a href=\"http://www.cold.org/Intro/\"><b>Introduction</b></a> |", "<a href=\"/start.html\"><b>DB Starting Points</b></a>", "</p>"]; }; diff -rwu src-3.0a7/mutex.cdc ColdCore-3.0a9.02/src/mutex.cdc --- src-3.0a7/mutex.cdc Sat Aug 9 19:09:48 1997 +++ ColdCore-3.0a9.02/src/mutex.cdc Tue Aug 19 12:15:16 1997 @@ -20,26 +19,20 @@ locks = locks.add(val, [tid, ((locks[val])[2]) + 1]); else locks = locks.add(val, [tid, 1]); - - // $#Edited: 13 Mar 97 05:50 $miro }; private method ._del_from_lock() { arg tid, val; var i, l; - if (((| (l = locks[val]) |)[1]) != tid) { - $miro.debug(locks, val, tid); + if (((| (l = locks[val]) |)[1]) != tid) return; - } if ((l[2]) == 1) { (| (locks = locks.del(val)) |); ._del_from_queue(val); } else { locks = locks.add(val, [tid, (l[2]) - 1]); } - - // $#Edited: 13 Mar 97 05:50 $miro }; private method ._del_from_queue() { @@ -49,7 +42,6 @@ q = (| queues[val] |) || []; (| (queues = queues.del(val)) |); for tid in (q) { - $miro.debug(suspended, tid, queues, tasks, locks); if ((s = suspended[tid]) == 1) { suspended = suspended.del(tid); (| $scheduler.resume(tid) |); @@ -57,8 +49,6 @@ suspended = suspended.add(tid, s - 1); } } - - // $#Edited: 13 Mar 97 05:50 $miro }; private method ._test_lock() { @@ -70,8 +60,6 @@ return 0; } return 1; - - // $#Edited: 13 Mar 97 05:50 $miro }; private method ._test_locks() { @@ -79,8 +67,6 @@ var i; return filter i in (values) where (!(._test_lock(tid, i))); - - // $#Edited: 13 Mar 97 05:50 $miro }; public method .cleanup_dead_tasks() { @@ -94,8 +80,6 @@ tasks = tasks.del(i); } } - - // $#Edited: 13 Mar 97 05:50 $miro }; public method .grab() { @@ -117,14 +101,10 @@ $scheduler.suspend(this()); } } - - // $#Edited: 13 Mar 97 05:50 $miro }; root method .init_mutex() { tasks = (suspended = (queues = (locks = #[]))); - - // $#Edited: 13 Mar 97 05:50 $miro }; public method .release() { @@ -144,14 +124,10 @@ tasks = tasks.add(tid, vlist); else tasks = tasks.del(tid); - - // $#Edited: 13 Mar 97 05:50 $miro }; public method .release_all() { .release(@tasks[task_id()]); - - // $#Edited: 13 Mar 97 05:50 $miro }; diff -rwu src-3.0a7/network.cdc ColdCore-3.0a9.02/src/network.cdc --- src-3.0a7/network.cdc Sat Aug 9 19:09:31 1997 +++ ColdCore-3.0a9.02/src/network.cdc Tue Aug 19 12:15:17 1997 @@ -1,30 +1,14 @@ new object $network: $core; *var $root child_index = '-' network.cdc var $root created_on = 809051864; var $root flags = ['methods, 'code, 'core, 'variables]; var $root inited = 1; var $root managed = [$network]; var $root manager = $network; -var $root owned = [$network]; -public method ._hostname(): native; +protected method .hostname(): native; -public method ._ip(): native; +protected method .ip(): native; -public method .hostname() { - arg @args; - - return (> ._hostname(@args) <); -}; - -public method .ip() { - arg @args; - - return (> ._ip(@args) <); -}; - -bind_native .hostname() ._hostname(); -bind_native .ip() ._ip(); diff -rwu src-3.0a7/no_one.cdc ColdCore-3.0a9.02/src/no_one.cdc --- src-3.0a7/no_one.cdc Sat Aug 9 19:09:30 1997 +++ ColdCore-3.0a9.02/src/no_one.cdc Tue Aug 19 12:15:19 1997 @@ -23,16 +23,14 @@ var $root inited = 1; var $root managed = [$no_one]; var $root manager = $no_one; -var $root owned = [$no_one]; var $root quota = 75000; -var $root settings = #[["home", $body_cave]]; +var $root settings = #[["home", $body_cave], ["exit-style", 'brief]]; var $thing gender = $gender_neuter; var $user action = ""; var $user connected_at = 0; var $user connections = []; -var $user context = #[['last, $body_cave]]; var $user creation_time = 759878010; -var $user formatter = $mail_list; +var $user formatter = $plain_format; var $user last_command_at = 0; var $user modes = #[]; var $user parsers = [$command_parser]; diff -rwu src-3.0a7/not.cdc ColdCore-3.0a9.02/src/not.cdc --- src-3.0a7/not.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/not.cdc Tue Aug 19 12:15:35 1997 @@ -6,7 +6,6 @@ var $root inited = 1; var $root managed = [$not]; var $root manager = $not; -var $root owned = [$not]; var $root trusted = []; public method .test() { @@ -34,8 +33,6 @@ } with { return "!()"; } - - // $#Edited: 11 Dec 96 09:48 $brandon }; diff -rwu src-3.0a7/not_lock_frob.cdc ColdCore-3.0a9.02/src/not_lock_frob.cdc --- src-3.0a7/not_lock_frob.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/not_lock_frob.cdc Tue Aug 19 12:15:36 1997 @@ -5,7 +5,6 @@ var $root flags = ['methods, 'code, 'variables, 'core]; var $root managed = [$not_lock_frob]; var $root manager = $not_lock_frob; -var $root owned = [$not_lock_frob]; public method .lock_name() { arg lock, @type; @@ -17,8 +16,6 @@ default: return "not " + ((lock[1]).lock_name(type)); } - - // $#Edited: 30 Nov 96 21:22 $miro }; public method .new_lock() { diff -rwu src-3.0a7/note.cdc ColdCore-3.0a9.02/src/note.cdc --- src-3.0a7/note.cdc Sat Aug 9 19:09:33 1997 +++ ColdCore-3.0a9.02/src/note.cdc Tue Aug 19 12:15:18 1997 @@ -2,14 +2,14 @@ new object $note: $thing, $has_text; var $described prose = []; +var $dmi_data descriptions = #[['read, #[['arg_order, ["who", "numbered"]], ['args, #[["who", [[$no_one], []]], ["numbered", [[0], [$converters, 'to_num, []]]]]], ['auth, 'none]]]]; var $foundation edit_types = ["text"]; -var $has_commands remote = #[["erase", [["erase", "*", "erase <this>", 'erase_cmd, #[[1, ['this, []]]]], ["erase", "* on|from *", "erase <string> on|from <this>", 'erase_on_cmd, #[[1, ['any, []]], [3, ['this, []]]]]]], ["read|nread", [["read|nread", "*", "read|nread <this>", 'read_cmd, #[[1, ['this, []]]]]]], ["write", [["write", "on *", "write on <this>", 'write_cmd, #[[2, ['this, []]]]], ["write", "at * on *", "write at <string> on <this>", 'write_at_cmd, #[[2, ['any, []]], [4, ['this, []]]]]]], ["copy", [["copy", "from * to *", "copy from <this> to <any>", 'copy_cmd, #[[2, ['this, []]], [4, ['any, []]]]]]]]; +var $has_commands remote = #[["erase", [["erase", "*", "erase <this>", 'erase_cmd, #[[1, ['this, []]]]], ["erase", "* on|from *", "erase <string> on|from <this>", 'erase_on_cmd, #[[1, ['any, []]], [3, ['this, []]]]]]], ["read|nread", [["read|nread", "*", "read|nread <this>", 'read_cmd, #[[1, ['this, []]]]]]], ["write", [["write", "on *", "write on <this>", 'write_cmd, #[[2, ['this, []]]]], ["write", "at * on *", "write at <string> on <this>", 'write_at_cmd, #[[2, ['any, []]], [4, ['this, []]]]]]], ["copy", [["copy", "from * to *", "copy from <this> to <any>", 'copy_cmd, #[[2, ['this, []]], [4, ['any, []]]]]]], ["@readtest", [["@readtest", "*", "@readtest <this>", 'read_cmd, #[[1, ['this, []]]]]]]]; var $has_name name = ['uniq, "Generic Note", "the Generic Note"]; var $has_text text = []; var $located location = $void; var $located obvious = 1; var $note seperator = 0; *var $root child_index = '-' note.cdc var $root created_on = 796268969; var $root defined_settings = #[["private", #[['parse, ['is_boolean]], ['format, ['format_boolean]]]]]; var $root fertile = 1; @@ -17,8 +17,7 @@ var $root inited = 1; var $root managed = [$note]; var $root manager = $note; -var $root owned = [$note]; -var $root settings = #[["private", 1]]; +var $root settings = #[["private", 0]]; var $thing gender = $gender_neuter; protected method .add_text() { @@ -32,14 +31,12 @@ if (!(| .ins_lines(ntext, args[1]) |)) who.tell(("There are not that many lines in " + (.name())) + "."); } else { - .set_text((.text()) + ntext); + .set_text((.get_raw_text()) + ntext); } who.tell(((("Line" + (((ntext.length()) == 1) ? "" : "s")) + " added to ") + (.name())) + "."); } else { who.tell("Text not added."); } - - // $#Edited: 07 Nov 96 11:01 $brandon }; public method .copy_cmd() { @@ -72,8 +69,6 @@ } } sender().tell("Text copied from " + (.name())); - - // $#Edited: 07 Nov 96 11:01 $brandon }; public method .description() { @@ -81,7 +76,7 @@ if (dict_contains(flags, 'nonote)) return (> pass(flags) <); - return (> pass(flags) <) + ["You see some writing on the note, and may be able to read it..."]; + return (> pass(flags) <) + [$ctext_frob.new_with(["You see some writing on the note, and may be able to ", $cml_lib.format_invoke_tag(tostr(this()), "read", "read"), " it..."])]; }; public method .erase_cmd() { @@ -94,8 +89,6 @@ // if cmd is null, this method was called by an editor originally. if (cmd) sender().tell(("All text cleared from " + (.name())) + "."); - - // $#Edited: 07 Nov 96 11:01 $brandon }; public method .erase_on_cmd() { @@ -118,7 +111,7 @@ nline = toint((str.explode())[2]); else nline = toint(str); - oldline = (.text())[nline]; + oldline = (.get_raw_text())[nline]; .del_nline(nline); line = ("Line " + tostr(nline)) + " (\""; len = (who.linelen()) - (25 + ((.name()).length())); @@ -134,42 +127,47 @@ who.tell("Oops: " + ((traceback()[1])[2])); } } - - // $#Edited: 07 Nov 96 11:01 $brandon -}; - -public method .init_for_core() { - .perms(caller(), $sys); - - // $#Edited: 07 Nov 96 11:01 $brandon }; root method .init_note() { .del_flag('variables); }; -public method .read_cmd() { - arg cmdstr, cmd, @args; - var who, text, prose; +public method .read() { + arg who, numbered; + var text, prose, output, br; - who = sender(); + output = $ctext_frob.new_with([]); + br = $cml_lib.format_br_tag(); if ((.get_setting("private", $note)) && (!(.trusts(who)))) - return who.tell(("You cannot read " + (.name())) + "."); - who.tell(.name()); - who.tell(.prose()); - who.tell(.seperator()); + return [("You cannot read " + (.name())) + "."]; + output = output.append([$cml_lib.format_subj_tag(.name(), 2), br]); + output = output.append([.prose(), br]); + output = output.append([.seperator()]); text = .text(); - if ((cmd == "nread") && text) + if ((!(.get_setting("plaintext", $has_text))) && (type(text) == 'frob)) { + output = output.append(text.append(br)); + } else { + if (numbered && text) text = $list.numbered_text(text); - who.tell(text ? text : ["", "(nothing)", ""]); - who.tell(.seperator()); - who.tell(("You finish reading " + (.name())) + "."); + text = text ? text : ["", "(nothing)", ""]; + output = output.append([$cml_lib.format_pre_tag($cml_lib.generate_join_tag(text, br)), br]); + } + output = output.append([.seperator()]); + return output; +}; + +public method .read_cmd() { + arg cmdstr, cmd, @args; + var who, numbered; + + numbered = (cmd == "nread") ? 1 : 0; + return (.read(sender(), numbered)).append(["You finish reading " + (.name())]); }; public method .seperator() { + return $cml_lib.format_sep_tag(); return (type(seperator) == 'string) ? seperator : "---"; - - // $#Edited: 07 Nov 96 11:01 $brandon }; public method .set_seperator() { @@ -177,8 +175,6 @@ .perms(sender(), 'manager); seperator = newsep; - - // $#Edited: 07 Nov 96 11:01 $brandon }; public method .write_at_cmd() { @@ -194,12 +190,10 @@ line = $string.is_numeric(str[1]); if (!at) $parse_lib.tell_error(("Unknown line \"" + (str[1])) + "\".", syn, who); - lines = (.text()).length(); + lines = .lines(); if (line > (lines + 1)) $parse_lib.tell_error(("There are only " + tostr(lines)) + " lines!", syn, who); .add_text(who.read(), who, line); - - // $#Edited: 07 Nov 96 11:01 $brandon }; public method .write_cmd() { @@ -219,7 +213,6 @@ .add_text(who.read(line), who); } else { args = (args[1]).explode(); - who.debug(args); } }; @@ -230,8 +223,6 @@ if (!str) return ("Nothing to write on " + (.name())) + "!"; .add_text([str], sender()); - - // $#Edited: 07 Nov 96 11:01 $brandon }; diff -rwu src-3.0a7/nothing.cdc ColdCore-3.0a9.02/src/nothing.cdc --- src-3.0a7/nothing.cdc Sat Aug 9 19:09:48 1997 +++ ColdCore-3.0a9.02/src/nothing.cdc Tue Aug 19 12:15:20 1997 @@ -10,7 +10,6 @@ var $root inited = 1; var $root managed = [$nothing]; var $root manager = $nothing; -var $root owned = [$nothing]; var $thing gender = $gender_neuter; diff -rwu src-3.0a7/nowhere.cdc ColdCore-3.0a9.02/src/nowhere.cdc --- src-3.0a7/nowhere.cdc Sat Aug 9 19:09:31 1997 +++ ColdCore-3.0a9.02/src/nowhere.cdc Tue Aug 19 12:15:20 1997 @@ -2,34 +2,28 @@ new object $nowhere: $place; var $described prose = []; -var $event_handler hooked = #[]; -var $event_handler hooks = #[['movement, []], ['user_connect, []]]; +var $event_handler hooks = #[]; var $has_name name = ['prop, "Nowhere", "Nowhere"]; *var $location contents = ' ' nowhere.cdc var $place entrances = []; var $place exits = []; var $place realm = $realm_of_creation; *var $root child_index = '-' nowhere.cdc var $root created_on = 796268969; var $root flags = ['methods, 'code, 'variables, 'core]; var $root inited = 1; var $root managed = [$nowhere]; var $root manager = $nowhere; -var $root owned = [$nowhere]; -var $root settings = #[["propagate", 1], ["public-home", 0]]; +var $root settings = #[["propagate", 0], ["public-home", 0], ["map-position", 0]]; public method .announce() { arg @args; - // $#Edited: 27 Nov 96 14:37 $brandon }; public method .description() { arg flags; return []; - - // $#Edited: 27 Nov 96 14:25 $brandon }; diff -rwu src-3.0a7/null_parser.cdc ColdCore-3.0a9.02/src/null_parser.cdc --- src-3.0a7/null_parser.cdc Sat Aug 9 19:09:46 1997 +++ ColdCore-3.0a9.02/src/null_parser.cdc Tue Aug 19 12:15:36 1997 @@ -6,7 +6,6 @@ var $root inited = 1; var $root managed = [$null_parser]; var $root manager = $null_parser; -var $root owned = [$null_parser]; var $user_parsers priority = 10000; public method .parse() { diff -rwu src-3.0a7/object_lib.cdc ColdCore-3.0a9.02/src/object_lib.cdc --- src-3.0a7/object_lib.cdc Sat Aug 9 19:09:29 1997 +++ ColdCore-3.0a9.02/src/object_lib.cdc Tue Aug 19 12:15:16 1997 @@ -6,7 +6,6 @@ var $root inited = 1; var $root managed = [$object_lib]; var $root manager = $object_lib; -var $root owned = [$object_lib]; var $root trusted = []; public method .format_method_header() { @@ -64,7 +63,7 @@ out += [line]; if (obj.has_ancestor($located)) out += ["Location: " + (.get_name(obj.location(), 'namef, ['xref]))]; - if (obj.is($exit)) + if ((obj.is($exit)) && ((obj.source()) && (obj.dest()))) out += [(("Exit: from " + ((obj.source()).namef('ref))) + " to ") + ((obj.dest()).namef('ref))]; return out; }; @@ -128,7 +127,7 @@ } if ('variables in flags) { flags = flags.setremove('variables); - str += "p"; + str += "v"; } else { str += "-"; } diff -rwu src-3.0a7/object_lock_frob.cdc ColdCore-3.0a9.02/src/object_lock_frob.cdc --- src-3.0a7/object_lock_frob.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/object_lock_frob.cdc Tue Aug 19 12:15:35 1997 @@ -5,7 +5,6 @@ var $root flags = ['methods, 'code, 'variables, 'core]; var $root managed = [$object_lock_frob]; var $root manager = $object_lock_frob; -var $root owned = [$object_lock_frob]; public method .lock_name() { arg value, @type; @@ -25,16 +24,12 @@ arg lock, obj; return ((lock[1]) == obj) || ((obj == sender()) || ($sys.is_system(obj))); - - // $#Edited: 13 Feb 97 12:23 $miro }; frob method .unparse() { arg obj; return toliteral(obj[1]); - - // $#Edited: 11 Dec 96 09:46 $brandon }; diff -rwu src-3.0a7/on_location.cdc ColdCore-3.0a9.02/src/on_location.cdc --- src-3.0a7/on_location.cdc Sat Aug 9 19:09:31 1997 +++ ColdCore-3.0a9.02/src/on_location.cdc Tue Aug 19 12:15:20 1997 @@ -5,16 +5,15 @@ var $has_commands local = #[]; var $has_commands remote = #[]; var $has_commands shortcuts = #[]; -var $has_name name = ['prop, "note", "note"]; +var $has_name name = ['prop, "on_location", "on_location"]; var $located location = $nowhere; var $located obvious = 1; *var $location contents = ' ' on_location.cdc var $root created_on = 809991549; -var $root flags = ['methods, 'code, 'variables, 'core]; +var $root flags = ['methods, 'code, 'variables, 'core, 'fertile]; var $root inited = 1; var $root managed = [$on_location]; var $root manager = $on_location; -var $root owned = [$on_location]; var $thing gender = $gender_neuter; public method .description() { diff -rwu src-3.0a7/or.cdc ColdCore-3.0a9.02/src/or.cdc --- src-3.0a7/or.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/or.cdc Tue Aug 19 12:15:36 1997 @@ -6,7 +6,6 @@ var $root inited = 1; var $root managed = [$or]; var $root manager = $or; -var $root owned = [$or]; var $root trusted = []; public method .test() { @@ -37,8 +36,6 @@ str = (str + tostr(x)) + " || "; } return ("(" + (str && (str.subrange(1, (str.length()) - 4)))) + ")"; - - // $#Edited: 11 Dec 96 09:48 $brandon }; diff -rwu src-3.0a7/or_lock_frob.cdc ColdCore-3.0a9.02/src/or_lock_frob.cdc --- src-3.0a7/or_lock_frob.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/or_lock_frob.cdc Tue Aug 19 12:15:36 1997 @@ -5,7 +5,6 @@ var $root flags = ['methods, 'code, 'variables, 'core]; var $root managed = [$or_lock_frob]; var $root manager = $or_lock_frob; -var $root owned = [$or_lock_frob]; public method .lock_name() { arg lock, @type; @@ -17,8 +16,6 @@ default: return (((lock[1]).lock_name(type)) + " or ") + ((lock[2]).lock_name(type)); } - - // $#Edited: 30 Nov 96 21:22 $miro }; public method .new_lock() { diff -rwu src-3.0a7/outbound_connection.cdc ColdCore-3.0a9.02/src/outbound_connection.cdc --- src-3.0a7/outbound_connection.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/outbound_connection.cdc Tue Aug 19 12:15:36 1997 @@ -20,22 +19,18 @@ var $root manager = $outbound_connection; var $root quota = 100000; var $root quota_exempt = -1; -var $root trusted = [$smtp]; +var $root trusted = [$smtp, $dns]; driver method .connect() { arg task_id; $scheduler.resume(task_id, 'success); - - // $#Edited: 25 Oct 96 22:45 $brian }; driver method .failed() { arg task_id, reason; $scheduler.resume(task_id, reason); - - // $#Edited: 25 Oct 96 22:45 $brian }; public method .new() { @@ -49,18 +44,37 @@ child.add_writer(this()); child.new_interface(sender()); return child; +}; - // $#Edited: 25 Oct 96 22:45 $brian +public method .new_with() { + arg name; + var child, daemon, port, i; + + (| .perms(sender(), 'trusts) |) || (> .perms(caller(), 'trusts) <); + child = .spawn(); + catch any { + (> child.set_objname(name) <); + } with { + (| child.destroy() |); + rethrow(error()); + } + + // do perms stuff + child.add_writer(sender()); + child.new_interface(sender()); + return child; }; public method .open_connection() { arg host, port; + var condition; (> .perms(sender()) <); (> pass(host, port) <); - return $scheduler.suspend(this()); - - // $#Edited: 25 Oct 96 22:45 $brian + condition = $scheduler.suspend(this()); + if (condition != 'success) + throw(condition, "Unable to open connection."); + return condition; }; diff -rwu src-3.0a7/owner_lock_frob.cdc ColdCore-3.0a9.02/src/owner_lock_frob.cdc --- src-3.0a7/owner_lock_frob.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/owner_lock_frob.cdc Tue Aug 19 12:15:35 1997 @@ -19,16 +19,12 @@ if (type(obj) != 'objnum) throw(~perm, "Argument is not a dbref."); return (<this(), [obj]>); - - // $#Edited: 03 Nov 96 17:53 $miro }; public method .try() { arg lock, obj; return ((lock[1]) in (obj.owners())) || ($sys.is_system(obj)); - - // $#Edited: 03 Nov 96 17:53 $miro }; diff -rwu src-3.0a7/parent_lock_frob.cdc ColdCore-3.0a9.02/src/parent_lock_frob.cdc --- src-3.0a7/parent_lock_frob.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/parent_lock_frob.cdc Tue Aug 19 12:15:35 1997 @@ -11,8 +11,6 @@ arg value, @type; return "parent:" + ((value[1]).name()); - - // $#Edited: 15 Feb 97 17:41 $brad }; public method .new_lock() { @@ -21,18 +19,12 @@ if (type(obj) != 'objnum) throw(~perm, "Argument is not a dbref."); return (<this(), [obj]>); - - // $#Edited: 03 Nov 96 17:53 $miro - // $#Copied 15 Feb 97 17:40 from $owner_lock_frob.new_lock() by $brad }; public method .try() { arg lock, obj; return ((lock[1]).has_ancestor(obj)) || ($sys.is_system(obj)); - - // $#Edited: 15 Feb 97 17:39 $brad - // $#Edited: 15 Feb 97 17:53 $brad }; diff -rwu src-3.0a7/parse_lib.cdc ColdCore-3.0a9.02/src/parse_lib.cdc --- src-3.0a7/parse_lib.cdc Sat Aug 9 19:09:29 1997 +++ ColdCore-3.0a9.02/src/parse_lib.cdc Tue Aug 19 12:15:16 1997 @@ -8,7 +8,6 @@ var $root inited = 1; var $root managed = [$parse_lib]; var $root manager = $parse_lib; -var $root owned = [$parse_lib]; public method ._html_traceback() { arg type, what, @more; @@ -20,9 +19,9 @@ case 'opcode: return ("operator <tt>" + what) + "</tt>"; default: - line = ((("method <tt>" + (more[2])) + ".") + tostr(what)) + "()</tt>"; + line = (((((((((("method <tt><a href=\"/bin/display?target=" + (more[2])) + "\">") + (more[2])) + "</a>.<a href=\"/bin/method?target=") + (more[2])) + ".") + tostr(what)) + "&linenumbers=yes\">") + tostr(what)) + "</a>") + "()</tt>"; if ((more[1]) != (more[2])) - line = ((line + " (") + (more[1])) + ")"; + line += (((" (<a href=\"/bin/display?target=" + (more[1])) + "\">") + (more[1])) + "</a>)"; line = (line + " line ") + (more[3]); return line; } @@ -90,14 +89,30 @@ public method .filter_ctext() { arg what, @defaults; - var dic, output; + var dic, output, prop, eff, ctext; - dic = ([@defaults, #[]][1]).union(#[['receiver, sender()], ['time, 'post], ['formatter, $text_format]]); + dic = ([@defaults, #[]][1]).union(#[['receiver, sender()], ['time, 'post], ['formatter, $plain_format]]); switch (class(what)) { case $ctext_frob: output = (what.set_vars(dic)).format(); case $message_frob: output = what.format(dic); + case $filtered_frob: + if ((prop = (| sender().default_propagator() |))) + what = what.propagate(prop); + if (!what) { + output = `[]; + } else { + ctext = (what.message()).to_ctext(dic); + for eff in (what.effects()) { + if (type(eff) == 'string) + ctext = ($ctext_frob.new_with([eff + " "], ctext.vars())).append(ctext); + else + ctext = $propagator_effects.(eff[1])(ctext, dic, eff.subrange(2)); + } + ctext = ctext.set_vars(what.sensory()); + output = ctext.format(); + } default: output = what; } @@ -188,6 +203,43 @@ } }; +public method .opt() { + arg line, @defs; + var out, a, l, x, m, args, opts, o, i, v; + + // submit: ["template", "template"..] + // => if value is 1, it will take the next part of the string + // receive: [["template", "flag", bool, value]], [...]]; + opts = (args = []); + line = line.explode_quoted(); + l = listlen(line); + x = 1; + while (x <= l) { + a = line[x]; + if ((m = regexp(a, "^[+-]"))) { + o = (m[1]) == "+"; + v = ""; + a = substr(a, 2); + if ((i = "=" in a)) { + if (i == strlen(a)) { + v = line[++x]; + a = substr(a, 1, strlen(a) - 1).trim(); + } else { + [a, v] = explode(a, "=", 1); + } + } + if ((i = find m in (defs) where (match_template(a, m)))) + opts += [[defs[i], a, o, v]]; + else + opts += [[0, a, o, v]]; + } else { + args += [a]; + } + x++; + } + return [args, opts]; +}; + public method .ordinal() { return ordinal; }; @@ -235,8 +287,8 @@ if ((rx = regexp(str, "^my$|^my +(.+)?"))) return ["me", (| rx[1] |) || ""]; - else if ((rx = regexp(str, "^([^ ]+s?)'s? *(.+)?"))) - return rx; + else if ((rx = regexp(str, "^([^ ]+s'|[^ ]+'s) *(.+)?"))) + return [substr(rx[1], 1, strlen(rx[1]) - 2), rx[2]]; return 0; }; diff -rwu src-3.0a7/physical.cdc ColdCore-3.0a9.02/src/physical.cdc --- src-3.0a7/physical.cdc Sat Aug 9 19:09:28 1997 +++ ColdCore-3.0a9.02/src/physical.cdc Tue Aug 19 12:15:17 1997 @@ -10,7 +10,6 @@ var $root inited = 1; var $root managed = [$physical]; var $root manager = $physical; -var $root owned = [$physical]; var $root trusted = []; public method .is_visible_to() { @@ -19,13 +18,6 @@ return (.visibility()) >= ((whom.location()).darkness()); }; -public method .set_darkness() { - arg name, definer, value, @args; - - (> .perms(sender()) <); - darkness = value; -}; - public method .set_visibility() { arg name, definer, value, @args; @@ -39,8 +31,6 @@ return visibility; }; -public method .vr_examine() { - // $#Edited: 12 Jun 96 22:44 $lynx -}; +public method .vr_examine(); diff -rwu src-3.0a7/place.cdc ColdCore-3.0a9.02/src/place.cdc --- src-3.0a7/place.cdc Sat Aug 9 19:09:31 1997 +++ ColdCore-3.0a9.02/src/place.cdc Tue Aug 19 12:15:20 1997 @@ -3,7 +3,7 @@ var $described prose = []; var $foundation defined_msgs = #[["housekeeper", #[['branches, ["general"]]]], ["connect", #[['branches, ["general"]]]], ["disconnect", #[['branches, ["general"]]]]]; -var $foundation msgs = #[["housekeeper", #[["general", <$ctext_frob, [["Dust bunnies rise from under the furniture to envelope ", <$generator, ["actor", [], [], 'gen_actor]>, "'s comatose form, leaving behind a small pile of musty lint."], #[['this, $place]]]>]]], ["connect", #[["general", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " wakes up."], #[['this, $place]]]>]]], ["disconnect", #[["general", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " falls asleep."], #[['this, $place]]]>]]]]; +var $foundation msgs = #[["housekeeper", #[["general", <$ctext_frob, [["The housekeeper arrives and takes ", <$generator, ["actor", [], [], 'gen_actor]>, "'s body away."], #[]]>]]], ["connect", #[["general", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " wakes up."], #[['this, $place]]]>]]], ["disconnect", #[["general", <$ctext_frob, [[<$generator, ["actor", [], [], 'gen_actor]>, " falls asleep."], #[['this, $place]]]>]]]]; var $has_commands local = #[]; var $has_name name = ['uniq, "place", "the place"]; *var $location contents = ' ' place.cdc @@ -19,8 +18,7 @@ var $root inited = 1; var $root managed = [$place]; var $root manager = $place; -var $root owned = [$place]; -var $root settings = #[["public-home", 0], ["map-position", [0, 0, "99", $help_cmd_spawn]]]; +var $root settings = #[["public-home", 0], ["map-position", 0], ["propagate", 0]]; public method .attach_exit() { arg type, exit; @@ -34,8 +32,6 @@ } else { entrances = setadd(entrances, exit.source()); } - - // $#Edited: 19 Feb 97 02:23 $miro }; public method .clear_realm_setting() { @@ -113,7 +109,7 @@ public method .format_contents() { arg flags; - var users, br, exclude, actor, objects, output, obj, line; + var users, br, exclude, actor, objects, output, obj, line, item, formatteduser, formattedobj; // called by .description users = []; @@ -123,35 +119,35 @@ for obj in (.contents()) { if ((!(obj in exclude)) && ((obj != actor) && (| obj.is_obvious_to(actor) |))) { if (obj.has_ancestor($body)) - users += [obj.namef('nactivity)]; + users += [obj]; else - objects += [obj.name()]; + objects += [obj]; } } output = []; - br = (<$format, ["br", [], [], 'do_br]>); + br = $cml_lib.format_br_tag(); if (users) { - line = ($list.to_english(users)) + " "; - line = (line + (((users.length()) > 1) ? "are" : "is")) + " here."; + formatteduser = map item in (users) to ($cml_lib.format_obj_tag('look, item, item.namef('nactivity))); + formatteduser = [$cml_lib.generate_english_tag(formatteduser), ((users.length()) > 1) ? " are here." : " is here.", br]; + line = $ctext_frob.new_with(formatteduser); //output += [br, line]; output += [line]; } if (objects) { - line = "You see "; - line = (line + ($list.to_english(objects))) + " here."; + formattedobj = map item in (objects) to ($cml_lib.format_obj_tag('look, item, item.name())); + formattedobj = ["You see ", $cml_lib.generate_english_tag(formattedobj), " here.", br]; + line = $ctext_frob.new_with(formattedobj); //output += [br, line]; output += [line]; } return output; - - // $#Edited: 30 Nov 96 21:22 $miro }; public method .format_exits() { arg exits, flags; - var output, e, exits, line, actor, how; + var output, e, exits, line, actor, how, exit; actor = flags['actor]; how = (flags['actor]).get_setting("exit-style", $user); @@ -161,21 +157,21 @@ case 'brief: if (!exits) return []; - return ["Exits: " + ((exits.mmap('name)).to_english("none"))]; + return [$ctext_frob.new_with(["Visible Exits: ", $cml_lib.generate_english_tag(map exit in (exits) to ($cml_lib.format_obj_tag('look, exit, exit.name(), 'exit)))])]; case 'templates: output = []; for e in (exits) { if (e.name_templates()) - output += [(((e.name()) + " (") + ((e.name_templates()).to_english())) + ")"]; + output += [$cml_lib.format_obj_tag('look, e, (((e.name()) + " (") + ((e.name_templates()).to_english())) + ")", 'exit)]; else - output += [e.name()]; + output += [$cml_lib.format_obj_tag('look, e, e.name(), 'exit)]; } - return output ? ["Exits: " + (output.to_english())] : []; + return output ? [$ctext_frob.new_with(["Visible Exits: ", $cml_lib.generate_english_tag(output)])] : []; case 'long: output = []; for e in (exits) output += [((" " + (e.name())) + " to ") + ((e.dest()).name())]; - return output ? (["Exits: "] + (output.lcolumnize(actor.linelen()))) : []; + return output ? (["Visible Exits: "] + (output.lcolumnize(actor.linelen()))) : []; case 'verbose: output = []; for e in (exits) { @@ -185,7 +181,7 @@ line = e.name(); output += [((" " + line) + " to ") + ((e.dest()).name())]; } - return output ? ["Exits: ", @output.lcolumnize(actor.linelen())] : []; + return output ? ["Visible Exits: ", @output.lcolumnize(actor.linelen())] : []; } return []; }; @@ -205,8 +201,42 @@ return 1; } return 0; +}; + +public method .old_format_content() { + arg flags; + var users, br, exclude, actor, objects, output, obj, line; + + // called by .description + users = []; + objects = []; + actor = flags['actor]; + exclude = (| flags['exclude] |) || []; + for obj in (.contents()) { + if ((!(obj in exclude)) && ((obj != actor) && (| obj.is_obvious_to(actor) |))) { + if (obj.has_ancestor($body)) + users += [obj.namef('nactivity)]; + else + objects += [obj.name()]; + } + } + output = []; + br = (<$format, ["br", [], [], 'do_br]>); + if (users) { + line = ($list.to_english(users)) + " "; + line = (line + (((users.length()) > 1) ? "are" : "is")) + " here."; + + //output += [br, line]; + output += [line]; + } + if (objects) { + line = "You see "; + line = (line + ($list.to_english(objects))) + " here."; - // $#Edited: 15 Feb 97 19:46 $miro + //output += [br, line]; + output += [line]; + } + return output; }; public method .parse_realm_setting() { @@ -240,8 +270,6 @@ if (type(ret) == 'frob) (| (ret = ret.set_vars((.realm()).ctext_variables())) |); return ret; - - // $#Edited: 19 Feb 97 02:23 $miro }; public method .realm() { @@ -260,8 +288,6 @@ default: return (((.name()) + " (") + ((| realm.realm_name() |) || "<unknown>")) + ")"; } - - // $#Edited: 20 Dec 96 06:44 $miro }; public method .rehash_caches() { @@ -272,6 +298,13 @@ (> .add_object_to_remote_cache(exit) <); }; +public method .set_darkness() { + arg name, definer, value, @args; + + (> .perms(sender()) <); + darkness = value; +}; + public method .set_name() { arg new_name, @args; var old_name; @@ -294,8 +327,6 @@ (caller() == $realm) || ((sender() == this()) || (> .perms(sender()) <)); realm = value.new(); - - // $#Edited: 15 Feb 97 19:53 $miro }; public method .set_setting_realm() { @@ -316,14 +347,15 @@ public method .update_exit_frob() { arg this, what, new, @remove; + var i; (> .perms(caller(), $exit_frob) <); - exits = setremove(exits, (<sender(), this>)); + i = (<sender(), this>) in exits; if (remove) this = this.del(what); else this = this.add(what, new); - exits = setadd(exits, (<sender(), this>)); + exits = exits.replace(i, (<sender(), this>)); return (<sender(), this>); }; @@ -373,8 +405,6 @@ } return output ? [output.join()] : []; } - - // $#Edited: 30 Nov 96 21:22 $miro }; public method .will_attach() { diff -rwu src-3.0a7/place_db.cdc ColdCore-3.0a9.02/src/place_db.cdc --- src-3.0a7/place_db.cdc Sat Aug 9 19:09:34 1997 +++ ColdCore-3.0a9.02/src/place_db.cdc Tue Aug 19 12:15:21 1997 @@ -1,19 +1,35 @@ new object $place_db: $registry; *var $db database = ' ' place_db.cdc *var $registry stripped_characters = ' ' place_db.cdc DEFAULT "!@#$%^&*()_+-=~`'{}[]|/?\",.<>;:" var $root created_on = 796268969; var $root flags = ['methods, 'code, 'variables, 'core]; var $root inited = 1; var $root managed = [$place_db]; var $root manager = $place_db; -var $root owned = [$place_db]; + +root method .core_place_db() { + var p, db; + + db = .database(); + for p in (db.keys()) { + if (!valid(db[p])) + .remove(p); + } +}; public method .place_destroyed() { arg @args; // called in $place.uninit_place (incase the place is in the db) +}; + +public method .strip_key() { + arg key; + + anticipate_assignment(); + return strsed(key, "^(the|a|an) +", "").strip(); }; diff -rwu src-3.0a7/place_desc_evaluator.cdc ColdCore-3.0a9.02/src/place_desc_evaluator.cdc --- src-3.0a7/place_desc_evaluator.cdc Sat Aug 9 19:09:48 1997 +++ ColdCore-3.0a9.02/src/place_desc_evaluator.cdc Tue Aug 19 12:15:17 1997 @@ -6,6 +6,5 @@ var $root inited = 1; var $root managed = [$place_desc_evaluator]; var $root manager = $place_desc_evaluator; -var $root owned = [$place_desc_evaluator]; diff -rwu src-3.0a7/place_lib.cdc ColdCore-3.0a9.02/src/place_lib.cdc --- src-3.0a7/place_lib.cdc Sat Aug 9 19:09:47 1997 +++ ColdCore-3.0a9.02/src/place_lib.cdc Tue Aug 19 12:15:37 1997 @@ -13,7 +13,6 @@ var $root inited = 1; var $root managed = [$place_lib]; var $root manager = $place_lib; -var $root owned = [$place_lib]; public method .add_build_hint() { arg hint_key, hint_text; @@ -108,8 +107,6 @@ return r; } return (| $object_lib.to_dbref(str) |) || 0; - - // $#Edited: 15 Feb 97 19:53 $miro }; public method .opposite_direction() { diff -rwu src-3.0a7/player.cdc ColdCore-3.0a9.02/src/player.cdc --- src-3.0a7/player.cdc Sat Aug 9 19:09:30 1997 +++ ColdCore-3.0a9.02/src/player.cdc Tue Aug 19 12:15:19 1997 @@ -6,7 +6,9 @@ var $command_aliases command_aliases = []; var $described prose = []; var $has_commands local = \ - #[["@sheet|@score", [["@sheet|@score", "*", "@sheet|@score <any>", 'sheet_cmd, #[[1, ['any, []]]]]]]]; + #[["@sheet|@score", [["@sheet|@score", "*", "@sheet|@score <any>", 'sheet_cmd, #[[1, ['any, []]]]]]],\ + ["@new-char?acter",\ + [["@new-char?acter", "*", "@new-char?acter <any>", 'new_character_cmd, #[[1, ['any, []]]]]]]]; var $has_commands remote = #[]; var $has_commands shortcuts = #[]; var $has_name name = ['proper, "player", "player"]; @@ -19,44 +21,21 @@ var $mail_list senders = 1; var $mail_ui current = #[['location, 0], ['list, $player]]; var $mail_ui subscribed = #[[$player, [813278562, 0]], [$mail_list_news, [813278562, 0]]]; -var $player affiliation = 0; -var $player agility = [0, 0]; -var $player appearance = [0, 0]; -var $player backbone = [0, 0]; -var $player characteristics = 0; -var $player charisma = [0, 0]; -var $player dead = 0; -var $player deaths = 0; -var $player encumbrance = 0; -var $player fatigue = 0; -var $player health = [0, 0]; -var $player humanity = [0, 0]; -var $player identity = 0; -var $player intellect = [0, 0]; -var $player knowledge = [0, 0]; -var $player life = [0, 0]; -var $player perception = [0, 0]; -var $player points = 0; -var $player presence = [0, 0]; -var $player source = 0; -var $player strength = [0, 0]; -var $player weapons = 0; *var $root child_index = '-' player.cdc +var $player character = 0; +var $player characters = 0; var $root created_on = 809926794; var $root fertile = 1; -var $root flags = ['core]; +var $root flags = ['core, 'methods, 'code, 'command_cache, 'variables]; var $root inited = 1; var $root managed = [$player]; var $root manager = $player; -var $root owned = [$player]; var $root quota = 75000; var $root settings = #[["home", $body_cave]]; var $thing gender = $gender_neuter; var $user action = ""; var $user connected_at = 0; var $user connections = []; -var $user context = #[['last, $body_cave]]; -var $user formatter = $mail_list; +var $user formatter = $plain_format; var $user last_command_at = 0; var $user parsers = [$command_parser]; var $user password = "*"; @@ -80,21 +59,12 @@ return pad((base == cur) ? tostr(base) : ((cur + "/") + base), 8); }; -root method .init_player(): nooverride, synchronized { - strength = [0, 0]; - agility = [0, 0]; - appearance = [0, 0]; - health = [0, 0]; - life = [0, 0]; - intellect = [0, 0]; - knowledge = [0, 0]; - backbone = [0, 0]; - charisma = [0, 0]; - humanity = [0, 0]; - perception = [0, 0]; - presence = [0, 0]; - source = [0, 0]; - weapons = []; +public method .help_charcmd() { + arg @args; + + .tell("** Special commands: help, lower, raise, sheet and done"); + .tell("** As well as +X and -X as shortcuts for raise and lower"); + .tell("** All other normal commands are available"); }; protected method .lower_attribute() { @@ -105,6 +75,17 @@ set_var(attribute, get_var(attribute).replace(1, new)); }; +public method .new_character_cmd() { + arg @args; + + (> .perms(caller(), 'command) <); + (.location()).announce((.name()) + " fades away to generate a new character.", this()); + .move_to($nowhere); + .add_parser($chargen_parser); + .tell("** raw character generation subsystem, will get better later **"); + .tell("** type 'help' for help **"); +}; + protected method .raise_attribute() { arg attribute, difference; var new; @@ -129,9 +110,9 @@ (> .perms(caller(), 'command) <); if (args && (!(.is($storyteller)))) return "Only storytellers can see other players stats."; - t = args ? (.match_env_nice(args)) : this(); - out = [((("Strength: " + (.format_score(@t.attribute('strength)))) + "Reaction: ") + (tostr(((t.attribute('agility))[1]) / 5).pad(8))) + "Strength Damage: 0", (("Agility: " + (.format_score(@t.attribute('agility)))) + "Source: ") + (.format_score(@t.attribute('source))), ((("Appearance: " + (.format_score(@t.attribute('appearance)))) + "Learn: ") + (tostr(((t.attribute('intellect))[1]) / 3).pad(8))) + "Competancy Level: 0", (("Intellect: " + (.format_score(@t.attribute('intellect)))) + " Advancement Points: ") + tostr(t.attribute('points)), (("Knowledge: " + (.format_score(@t.attribute('intellect)))) + "Life: ") + (.format_score(@t.attribute('life))), (((("Presence: " + (.format_score(@t.attribute('presence)))) + "Health: ") + (.format_score(@t.attribute('health)))) + "Humanity: ") + (.format_score(@t.attribute('humanity))), "Backbone: " + (.format_score(@t.attribute('backbone))), (((("Charisma: " + (.format_score(@t.attribute('charisma)))) + "Deaths: ") + (tostr(t.attribute('deaths)).pad(8))) + "Encumbrance: ") + tostr(t.attribute('encumbrance)), (("Perception: " + (.format_score(@t.attribute('perception)))) + " Fatigue: ") + tostr(t.attribute('fatigue))]; - return out; + if (!character) + return "You do not have a character active."; + return character.format_sheet(); }; diff -rwu src-3.0a7/programmer.cdc ColdCore-3.0a9.02/src/programmer.cdc --- src-3.0a7/programmer.cdc Sat Aug 9 19:09:31 1997 +++ ColdCore-3.0a9.02/src/programmer.cdc Tue Aug 19 12:15:19 1997 @@ -1,5 +1,5 @@ -new object $programmer: $builder; +new object $programmer: $storyteller, $dmi_data_ui; var $channel_ui active_channels = #[]; var $channel_ui channel_dict = #[]; @@ -26,17 +26,13 @@ ["@rehash",\ [["@rehash", "", "@rehash", 'rehash_cmd, #[]]]], ["@trace-method|@trace", [["@trace-method|@trace", "*", "@trace-method|@trace <objref>", 'trace_method_cmd, #[[1, ['objref, []]]]]]],\ ["@ledit",\ - [["@ledit", "*", "@ledit <objref: +e?dited>", 'local_edit_cmd, #[[1, ['objref_opt, [["e?dited"]]]]]]]],\ - ["@d?isplay",\ - [["@d?isplay", "*", "@d?isplay <objref: +c?hop +g?enerations=1 +d?efiners=1>", 'display_cmd, #[[1, ['objref_opt, [["c?hop"], ["g?enerations", "1"], ["d?efiners", "1"]]]]]]]],\ + [["@ledit", "*", "@ledit <objref: +e?dited>", 'local_edit_cmd, #[[1, ['objref_opt, ["e?dited"]]]]]]],\ ["@program",\ - [["@program", "*", "@program <objref: +w?arnings +e?dited=1 +a?ccess=1 +f?lags=1>", 'program_cmd, #[[1, ['objref_opt, [["w?arnings"], ["e?dited", "1"], ["a?ccess", "1"], ["f?lags", "1"]]]]]], ["@program", "* with *", "@program <objref: +w?arnings +e?dited=1 +a?ccess=1 +f?lags=1> with <any>", 'program_cmd, #[[1, ['objref_opt, [["w?arnings"], ["e?dited", "1"], ["a?ccess", "1"], ["f?lags", "1"]]]], [3, ['any, []]]]]]],\ - ["@del-v?ariable|@dv",\ - [["@del-v?ariable|@dv", "*", "@del-v?ariable|@dv <objref>", 'del_var_cmd, #[[1, ['objref, []]]]]]],\ + [["@program", "*", "@program <objref: +w?arnings +e?dited=1 +a?ccess=1 +f?lags=1>", 'program_cmd, #[[1, ['objref_opt, ["w?arnings", "e?dited", "a?ccess", "f?lags"]]]]], ["@program", "* with *", "@program <objref: +w?arnings +e?dited=1 +a?ccess=1 +f?lags=1> with <any>", 'program_cmd, #[[1, ['objref_opt, ["w?arnings", "e?dited", "a?ccess", "f?lags"]]]], [3, ['any, []]]]]], ["@del-v?ariable|@dv", [["@del-v?ariable|@dv", "*", "@del-v?ariable|@dv <objref>", 'del_var_cmd, #[[1, ['objref, []]]]]]],\ ["@show",\ - [["@show", "*", "@show <objref: +c?hop>", 'show_cmd, #[[1, ['objref_opt, [["c?hop"]]]]]]]],\ + [["@show", "*", "@show <objref: +c?hop>", 'show_cmd, #[[1, ['objref_opt, ["c?hop"]]]]]]],\ ["@mv|@move|@cp|@copy",\ - [["@mv|@move|@cp|@copy", "*", "@mv|@move|@cp|@copy <objref:+c?omment=1>", 'move_cmd, #[[1, ['objref_opt, [["c?omment", "1"]]]]]]]],\ + [["@mv|@move|@cp|@copy", "*", "@mv|@move|@cp|@copy <objref:+c?omment=1>", 'move_cmd, #[[1, ['objref_opt, ["c?omment"]]]]]]],\ ["@del-s?hortcut|@ds",\ [["@del-s?hortcut|@ds", "*", "@del-s?hortcut|@ds <any>", 'del_shortcut_cmd, #[[1, ['any, []]]]]]],\ ["@add-p?arent|@ap",\ @@ -44,13 +40,13 @@ ["@del-p?arent|@dp",\ [["@del-p?arent|@dp", "*", "@del-p?arent|@dp <any>", 'del_parent_cmd, #[[1, ['any, []]]]]]],\ ["@grep",\ - [["@grep", "*", "@grep <any:+d?escend +f?ull +l?ist +r?eplace-with=1>", 'grep_cmd, #[[1, ['any_opt, [["d?escend"], ["f?ull"], ["l?ist"], ["r?eplace-with", "1"]]]]]]]],\ + [["@grep", "*", "@grep <any:+d?escend +f?ull +l?ist +r?eplace-with=1>", 'grep_cmd, #[[1, ['any_opt, ["d?escend", "f?ull", "l?ist", "r?eplace-with"]]]]]]],\ ["@chmod|@mmod|@omod|@chflag?s",\ [["@chmod|@mmod|@omod|@chflag?s", "*", "@chmod|@mmod|@omod|@chflag?s <any>", 'chmod_cmd, #[[1, ['any, []]]]]]],\ ["@dump",\ - [["@dump", "*", "@dump <any: +t?extdump +m?ethods +v?ariables +h?eader>", 'dump_cmd, #[[1, ['any_opt, [["t?extdump"], ["m?ethods"], ["v?ariables"], ["h?eader"]]]]]]]],\ + [["@dump", "*", "@dump <any: +t?extdump +m?ethods +v?ariables +h?eader>", 'dump_cmd, #[[1, ['any_opt, ["t?extdump", "m?ethods", "v?ariables", "h?eader"]]]]]]],\ ["@list",\ - [["@list", "*", "@list <objref: +n?umbers +t?extdump>", 'list_cmd, #[[1, ['objref_opt, [["n?umbers"], ["t?extdump"]]]]]]]],\ + [["@list", "*", "@list <objref: +n?umbers +t?extdump>", 'list_cmd, #[[1, ['objref_opt, ["n?umbers", "t?extdump"]]]]]]],\ ["@add-v?ariable|@av",\ [["@add-v?ariable|@av", "*", "@add-v?ariable|@av <any>", 'add_var_cmd, #[[1, ['any, []]]]]]],\ ["@hl?ist|@help-list",\ @@ -62,7 +58,7 @@ ["@ancestors",\ [["@ancestors", "*", "@ancestors <any>", 'ancestors_cmd, #[[1, ['any, []]]]]]],\ ["@nh?n|@new-help|@new-help-node",\ - [["@nh?n|@new-help|@new-help-node", "*", "@nh?n|@new-help|@new-help-node <any:+n?amed=1 +o?bjname=1 +i?ndex=1>", 'new_help_node_cmd, #[[1, ['any_opt, [["n?amed", "1"], ["o?bjname", "1"], ["i?ndex", "1"]]]]]]]],\ + [["@nh?n|@new-help|@new-help-node", "*", "@nh?n|@new-help|@new-help-node <any:+n?amed=1 +o?bjname=1 +i?ndex=1>", 'new_help_node_cmd, #[[1, ['any_opt, ["n?amed", "o?bjname", "i?ndex"]]]]]]],\ ["@config-set?ting|@configure-set?ting",\ [["@config-set?ting|@configure-set?ting", "*", "@config-set?ting|@configure-set?ting <any>", 'configure_setting_cmd, #[[1, ['any, []]]]]]],\ ["@def-set?ting|@define-set?ting",\ @@ -70,7 +66,11 @@ ["@undef-set?ting|@undefine-set?ting",\ [["@undef-set?ting|@undefine-set?ting", "*", "@undef-set?ting|@undefine-set?ting <any>", 'undefine_setting_cmd, #[[1, ['any, []]]]]]],\ ["@descend?ants",\ - [["@descend?ants", "*", "@descend?ants <objref:+a?ll +r?edundant +o?nly +n?ot>", 'descendants_cmd, #[[1, ['objref_opt, [["a?ll"], ["r?edundant"], ["o?nly"], ["n?ot"]]]]]]]]]; + [["@descend?ants", "*", "@descend?ants <objref:+a?ll +r?edundant +o?nly +n?ot>", 'descendants_cmd, #[[1, ['objref_opt, ["a?ll", "r?edundant", "o?nly", "n?ot"]]]]]]],\ + ["@d?isplay",\ + [["@d?isplay", "*", "@d?isplay <objref: +c?hop +g?enerations>", 'display_cmd, #[[1, ['objref_opt, ["c?hop", "g?enerations"]]]]]]],\ + ["@chman?age",\ + [["@chman?age", "*", "@chman?age <any>", 'chmanage_cmd, #[[1, ['any, []]]]]]]]; var $has_commands shortcuts = #[[";*", ['eval_cmd, ["eval", 1]]]]; var $has_name name = ['prop, "Generic Programmer", "Generic Programmer"]; var $located location = $body_cave; @@ -88,21 +88,18 @@ var $programmer eval_offset = 0; var $programmer eval_prefix = 0; var $programmer eval_tick_offset = 0; *var $root child_index = '-' programmer.cdc var $root created_on = 796268969; var $root defined_settings = #[["match-with", #[['parse, ['parse_match_with]]]], ["match-default", #[]], ["@program-options", #[]], ["@list-options", #[]]]; var $root flags = ['methods, 'code, 'core, 'command_cache, 'variables]; var $root inited = 1; var $root managed = [$programmer]; var $root manager = $programmer; -var $root owned = [$programmer]; var $root quota = 75000; var $root settings = #[["match-default", "*"], ["home", $body_cave], ["@list-options", ""], ["@program-options", ""], ["match-with", 'match_pattern], ["extended-parsers", []]]; var $thing gender = $gender_neuter; var $user connected_at = 0; var $user connections = []; -var $user context = #[['last, $body_cave]]; -var $user formatter = $mail_list; +var $user formatter = $plain_format; var $user last_command_at = 0; var $user modes = #[]; var $user parsers = [$command_parser]; @@ -185,14 +182,17 @@ protected method ._edit_method_callback() { arg code, client_data; - var errors; + var errors, edited, object, method, warns, sender; - errors = (client_data[1]).add_method(code, client_data[2]); + (> .perms(caller(), $editor_reference) <); + [object, method] = client_data; + sender = this(); + code += [(("// $#Edited: " + ($time.format("%d %h %y %H:%M"))) + " ") + sender]; + errors = object.add_method(code, method); if (errors) - return errors; - return "Method compiled."; - - // $#Edited: 18 Aug 96 20:07 $jenner + return ['failure, errors]; + warns = (> $code_lib.verify_code(code, method, 1) <); + return ['success, [warns + ["Method compiled."]]]; }; protected method ._list_method() { @@ -208,14 +208,11 @@ } else { return ([$object_lib.format_method_header(obj, method, opt, flags, obj.method_access(method))] + (code.prefix(" "))) + ["."]; } - - // $#Edited: 18 Jul 96 14:56 $levi - // $#Edited: 30 Nov 96 21:22 $miro }; protected method ._move_method() { arg remove, fobj, fname, tobj, tname, comment; - var code, line, result; + var code, line, result, access, flags; if ((fobj == tobj) && remove) { if ((| tobj.find_method(tname) |) == tobj) @@ -223,6 +220,8 @@ return (> fobj.rename_method(fname, tname) <); } code = (> fobj.list_method(fname) <); + flags = (> fobj.method_flags(fname) <); + access = (> fobj.method_access(fname) <); if (comment) { line = (((((((("// $#" + (remove ? "Moved" : "Copied")) + " ") + ($time.format("%d %h %y %H:%M"))) + " from ") + fobj) + ".") + fname) + "() by ") + this(); if (type(comment) == 'string) @@ -231,6 +230,8 @@ } if ((> tobj.add_method(code, tname) <)) throw(~compile, "Error encountered upon moving method!"); + (> tobj.set_method_flags(tname, flags) <); + (> tobj.set_method_access(tname, access) <); if (remove) (> fobj.del_method(fname) <); }; @@ -305,9 +306,6 @@ refresh(); } return out; - - // $#Edited: 03 Nov 96 15:36 $brad - // $#Edited: 03 Nov 96 15:37 $brad }; private method ._which_cmd() { @@ -353,8 +351,6 @@ return (traceback()[1])[2]; } return strfmt("Command %d added to %s.%s()", t, ref[3], ref[4]); - - // $#Edited: 18 Jul 96 14:56 $levi }; protected method .add_parent_cmd() { @@ -649,16 +645,22 @@ return (traceback()[1])[2]; if (!name) return syn; + catch ~setnf + definer = definer.setting_definer(name); + with + return (traceback()[1])[2]; // setup some default config opts based off the desired type config = #[]; if ((m = "t?ype" in (opts.slice(1)))) { type = (| ((opts[m])[4]).to_symbol() |); - if ((!type) || ((!($data_lib.is_valid_type(type))) && (type != 'boolean))) - return "Types can be any ColdC type and \"boolean\""; + if ((!type) || (!($settings.is_valid_type(type)))) + return "Types can be any ColdC type and " + (($settings.valid_types()).to_english("", " or ")); switch (type) { case 'boolean: config = #[['parse, ['is_boolean]], ['format, ['format_boolean]]]; + case 'itemlist: + // do nothing, we re-adjust things later default: config = #[['parse, ['is_type, type]]]; } @@ -674,6 +676,11 @@ config = (> ._def_setcmd_opt("c?lear", 'symbol, opts, config) <); config = (> ._def_setcmd_opt("f?ormat", 'symbol, opts, config) <); config = (> ._def_setcmd_opt("a?ccess", 'symbol, opts, config) <); + if (type == 'itemlist) { + config = config.add('parse, ['parse_itemlist, @(| config['parse] |) || []]); + if (!(config.contains('format))) + config = config.add('format, ['format_itemlist]); + } // now reconfig it for o in (config) { @@ -689,7 +696,7 @@ o = o[1]; .tell(((" +" + strsub(tostr(o), "_", "-")) + "=") + (val[1])); if (listlen(val) > 1) - .tell(((" +" + strsub(tostr(o), "_", "-")) + "-args=") + (sublist(val, 2.0).join(","))); + .tell(((" +" + strsub(tostr(o), "_", "-")) + "-args=") + (map m in (sublist(val, 2)) to (toliteral(m)).join(","))); } }; @@ -743,11 +750,13 @@ config = #[]; if ((m = "t?ype" in (opts.slice(1)))) { type = (| ((opts[m])[4]).to_symbol() |); - if ((!type) || ((!($data_lib.is_valid_type(type))) && (type != 'boolean))) - return "Types can be any ColdC type and \"boolean\""; + if ((!type) || (!($settings.is_valid_type(type)))) + return "Types can be any ColdC type and " + (($settings.valid_types()).to_english("", " or ")); switch (type) { case 'boolean: config = #[['parse, ['is_boolean]], ['format, ['format_boolean]]]; + case 'itemlist: + // do nothing, we re-adjust things later default: config = #[['parse, ['is_type, type]]]; } @@ -763,6 +772,11 @@ config = (> ._def_setcmd_opt("c?lear", 'symbol, opts, config) <); config = (> ._def_setcmd_opt("f?ormat", 'symbol, opts, config) <); config = (> ._def_setcmd_opt("a?ccess", 'symbol, opts, config) <); + if (type == 'itemlist) { + config = config.add('parse, ['parse_itemlist, @(| config['parse] |) || []]); + if (!(config.contains('format))) + config = config.add('format, ['format_itemlist]); + } // now add it.. catch any @@ -818,8 +832,6 @@ return (traceback()[1])[2]; } return strfmt("Command %d removed from %s.%s()", t, ref[3], ref[4]); - - // $#Edited: 18 Jul 96 14:56 $levi }; protected method .del_method_cmd() { @@ -975,7 +987,7 @@ if (gen.is_numeric()) gen = ['generations, toint(gen)]; else if (gen) - gen = ['ancestors_to, (> .match_env_nice(gen) <)]; + gen = ['ancestors_descending, (> .match_env_nice(gen) <)]; else gen = ['ancestors_to, def]; def = 0; @@ -984,6 +996,8 @@ } what = [args[1]] + ((| args[5] |) ? [args[5]] : []); obj = args[2]; + if (type(obj) == 'frob) + return ["The target object was a frob. Please use @exam instead."]; out = $object_lib.format_object(obj, chop); if (!(args[4])) f = .get_setting("match-default", $programmer); @@ -1142,6 +1156,8 @@ str = strsed(str, "^ *as +([^; ]+)[ ;]+", ""); if ((!(definer.is_writable_by(this()))) || (!(obj.is_writable_by(this())))) return ("You do not have permission to evaluate on " + (reg[1])) + "."; + if (!(obj.is(definer))) + return (obj + " isn't a child of ") + definer; } else { obj = (definer = this()); } @@ -1176,6 +1192,12 @@ // Display the errors, or the result. if ((result[1]) == 'errors) { .tell(result[2]); + } else if ((result[1]) == 'traceback) { + .tell_traceback(result[2]); + line = strfmt("[ seconds: %l.%6{0}r; operations: %s", times[2], times[3], times[1]); + if (times[2]) + line += (" (" + ((times[1]) / (times[2]))) + " ticks per second)"; + return line + " ]"; } else { if (type(result[2]) == 'objnum) .tell("=> " + ((| (result[2]).namef('xref) |) || (result[2]))); @@ -1188,8 +1210,6 @@ line += (" (" + ((times[1]) / (times[2]))) + " ticks per second)"; return line + " ]"; } - - // $#Edited: 17 Dec 96 15:11 $miro }; protected method .eval_offset() { @@ -1234,38 +1254,45 @@ public method .evaluate() { arg str, obj, definer, @mode; - var start, end, time, ticks, mtime, times, method, errs, trace; + var start, end, time, ticks, mtime, times1, times2, method, errs, trace, result, is_error; mode = mode ? (mode[1]) : 0; if (sender() != $eval_parser) (> .perms(caller(), $programmer) <); method = tosym("tmp_eval_" + time()); - if ((errs = (> definer.add_method([str], method) <))) + if ((errs = (> definer.add_method([str], method, 'evalonly) <))) { + if (mode) + return [[0, 0, 0], ['errors, errs, 0, 0], []]; + else return [[0, 0, 0], ['errors, errs, 0, 0]]; + } catch any { if (mode in ['trace, 'profile]) debug_callers(1); else if (mode == 'debug) debug_callers(2); - times = [tick(), time(), mtime(), (> obj.(method)() <), mtime(), time(), tick()]; + times1 = [tick(), time(), mtime()]; + result = (> obj.(method)() <); + times2 = [mtime(), time(), tick()]; trace = call_trace(); debug_callers(0); } with { + times2 = [mtime(), time(), tick()]; + result = traceback(); + is_error = 1; debug_callers(0); - (| definer.del_method(method) |); - rethrow(error()); } (| definer.del_method(method) |); // figure up the actual times - time = (times[6]) - (times[2]); - ticks = (times[7]) - (times[1]); - if ((times[5]) > (times[3])) - mtime = (times[5]) - (times[3]); + time = (times2[2]) - (times1[2]); + ticks = (times2[3]) - (times1[1]); + if ((times2[1]) > (times1[3])) + mtime = (times2[1]) - (times1[3]); else if (time) - mtime = ((time * 1000000) + (1000000 - (times[3]))) + (times[5]); + mtime = ((time * 1000000) + (1000000 - (times1[3]))) + (times2[1]); else - mtime = (1000000 - (times[5])) + (times[3]); + mtime = (1000000 - (times2[1])) + (times1[3]); // offset it? if (eval_offset && (mode != 'no_offset)) { @@ -1274,11 +1301,8 @@ mtime -= eval_offset[3]; } if (trace) - return [[ticks, time, abs(mtime)], ['result, times[4]], $code_lib.generate_debug_listing(trace, mode)]; - return [[ticks, time, abs(mtime)], ['result, times[4]]]; - - // $#Edited: 17 Dec 96 15:11 $miro - // $#Edited: 06 Feb 97 23:09 $miro + return [[ticks, time, abs(mtime)], ['result, result], $code_lib.generate_debug_listing(trace, mode)]; + return [[ticks, time, abs(mtime)], [is_error ? 'traceback : 'result, result]]; }; protected method .format_method() { @@ -1298,9 +1322,6 @@ default: return ([$object_lib.format_method_header(obj, method, opt, flags, obj.method_access(method))] + (code.prefix(" "))) + ["."]; } - - // $#Edited: 09 Aug 96 10:29 $brandon - // $#Edited: 30 Nov 96 21:22 $miro }; protected method .grep_brief() { @@ -1474,9 +1495,9 @@ protected method .grep_replace_method() { arg obj, method, regexp, replace; - var code, x, l, lr, errs, what; + var old_code, code, x, l, lr, errs, what; - code = obj.list_method(method); + old_code = (code = obj.list_method(method)); for x in [1 .. listlen(code)] { l = code[x]; if (!match_regexp(l, regexp)) @@ -1496,7 +1517,7 @@ } refresh(); } - if ((errs = obj.add_method(code, method))) + if ((old_code != code) && (errs = obj.add_method(code, method))) .tell(((([((("Error in compilation of updated method " + obj) + ".") + method) + "():"] + (errs.prefix(" "))) + ["-- Method code: "]) + (code.prefix(" "))) + ["--"]); }; @@ -1512,10 +1533,6 @@ if (!(node.is($help_node))) return (node.namef('ref)) + " is not a descendant of $help_node."; return (["@hwrite " + node] + ((node.body()).uncompile())) + ["."]; - - // $#Edited: 22 Jul 96 12:03 $jenner - // $#Copied 10 Nov 96 14:21 from $help_editing_ui.help_list_cmd() by $brandon - // $#Moved 10 Nov 96 14:23 from $builder.help_list_cmd() by $brandon }; protected method .help_write_cmd() { @@ -1556,6 +1573,8 @@ (> .perms(caller(), 'command) <); obj = .match_env_nice(obj); + if (type(obj) == 'frob) + return ["The target object was a frob."]; .tell((((((((obj.namef('xref)) + " ") + ($object_lib.see_perms(obj))) + " ") + toliteral(obj.parents())) + " ") + tostr(obj.size())) + " bytes"); }; @@ -1597,7 +1616,7 @@ (> .perms(caller(), 'command) <); if ((opts = .get_setting("@list-options", $programmer))) { - opts = $parse_lib.getopt(opts, [["n?umbers"], ["t?extdump"]]); + opts = $parse_lib.opt(opts, "n?umbers", "t?extdump"); opts = union(args[3], opts[2]); } else { opts = args[3]; @@ -1680,7 +1699,7 @@ code = def.list_method(meth); with return (traceback()[1])[2]; - return ([(((("#$# edit name: " + meth) + " upload: @program ") + def) + ".") + meth] + (code.prefix(" "))) + ["."]; + return ([(((((("#$# edit name: " + def) + ".") + meth) + " upload: @program ") + def) + ".") + meth] + (code.prefix(" "))) + ["."]; }; protected method .managed_cmd() { @@ -1706,7 +1725,7 @@ } out += [((" " + ((obj.namef('xref)).pad(len))) + " ") + ($object_lib.see_perms(obj, ["", ""]))]; } - return out; + return out + ["---"]; }; protected method .move_cmd() { @@ -1761,14 +1780,12 @@ if ((how == 'move) && (!((src[3]).is_writable_by(this())))) return ("You do not have permission to move from " + (src[3])) + "."; if (!((dest[3]).is_writable_by(this()))) - return ((("You do not have permission to " + how) + " to ") + (src[3])) + "."; + return ((("You do not have permission to " + how) + " to ") + (dest[3])) + "."; catch any (> .(tosym("_move_" + (src[1])))(how == 'move, src[3], src[4], dest[3], dest[4], comment) <); with return (traceback()[1])[2]; return ((((("You " + how) + " ") + ($parse_lib.buildref(@src))) + " to ") + ($parse_lib.buildref(@dest))) + "."; - - // $#Edited: 18 Jul 96 14:56 $levi }; protected method .new_editor_session() { @@ -1791,7 +1808,7 @@ return (> pass(ref, opts, type) <); } if (.active_editor()) - return [("Editor invoked with " + ((.active_editor()).session_name())) + ".", "Type 'help' to list available commands."]; + return [("Editing " + ((.active_editor()).session_name())) + ".", "Type 'help' to list available commands."]; else return ["Remote editing invoked."]; }; @@ -1890,8 +1907,6 @@ if (value in ["regexp", "pattern", "begin"]) return tosym("match_" + (value.lowercase())); throw(~perm, "You can match with: regexp, pattern, begin."); - - // $#Copied 14 Mar 97 17:47 from $thing.check_match_with() by $user_bruce }; public method .parse_methodcmd_options() { @@ -2041,8 +2056,6 @@ } with { return (traceback()[1])[2]; } - - // $#Edited: 29 Nov 96 14:31 $brandon }; protected method .rehash_cmd() { @@ -2084,6 +2097,8 @@ f = .get_setting("match-default", $programmer); match = .get_setting("match-with", $programmer); obj = (args[1])[3]; + if (type(obj) == 'frob) + return ["The target object was a frob. Please use @exam instead."]; .tell([((("Object: " + obj) + " [") + ((obj.size()).to_english())) + " bytes]", "Parents: " + ((obj.parents()).join(", "))]); if ('method in show) { if (!(obj.has_flag('methods, this()))) @@ -2097,6 +2112,7 @@ else .tell(._show_variables(obj, f, match, chop)); } + .tell("---"); }; public method .spawn_cmd() { @@ -2176,8 +2192,6 @@ return ("Sucessfully destroyed new object " + line) + "."; } } - - // $#Moved 16 Dec 96 19:45 from $user.spawn_cmd() by $brandon }; protected method .trace_method_cmd() { diff -rwu src-3.0a7/read_parser.cdc ColdCore-3.0a9.02/src/read_parser.cdc --- src-3.0a7/read_parser.cdc Sat Aug 9 19:09:33 1997 +++ ColdCore-3.0a9.02/src/read_parser.cdc Tue Aug 19 12:15:36 1997 @@ -6,7 +6,6 @@ var $root inited = 1; var $root managed = [$read_parser]; var $root manager = $read_parser; -var $root owned = [$read_parser]; public method .add() { arg dict, @args; @@ -43,8 +42,6 @@ } else { return (<this(), (.parse_line(dict, line))>); } - - // $#Edited: 08 Jan 96 18:31 Lynx ($lynx) }; public method .parse_line() { diff -rwu src-3.0a7/realm.cdc ColdCore-3.0a9.02/src/realm.cdc --- src-3.0a7/realm.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/realm.cdc Tue Aug 19 12:15:20 1997 @@ -1,17 +1,20 @@ -new object $realm: $frob, $has_name, $realm_settings, $event_handler; +new object $realm: $realm_settings, $event_handler, $has_name; +var $foundation defined_msgs = #[["night", #[['branches, ["general"]]]], ["predawn", #[['branches, ["general"]]]], ["dawn", #[['branches, ["general"]]]], ["morning", #[['branches, ["general"]]]], ["noon", #[['branches, ["general"]]]], ["afternoon", #[['branches, ["general"]]]], ["sunset", #[['branches, ["general"]]]], ["evening", #[['branches, ["general"]]]]]; +var $foundation msgs = #[]; var $has_name name = ['uniq, "Realm", "the Realm"]; -var $realm links = 0; -var $realm local = #[['weather, "nice"], ['weather_text, <$ctext_frob, [[], #[]]>], ['map_position, [0, 0, "00"]], ['map_object, $generic_map], ['climate, $climate], ['location, 'interior], ['season, "summer"], [$place, 'interior], ['timeobject, $world_time], ['timezone, 0]]; +var $realm last_daytime = 0; +var $realm links = #[]; +var $realm local = []; var $root created_on = 796268969; var $root defined_settings = #[["weather-time", #[['get, ['get_realm_setting]], ['parse, ['parse_weather_time]], ['format, ['format_weather_time]]]]]; var $root flags = ['methods, 'code, 'variables, 'core]; +var $root help_node = $help_places_realms; var $root inited = 1; var $root managed = [$realm]; var $root manager = $realm; -var $root owned = [$realm]; -var $root settings = #[["weather-time", [$weather_1, "spring", $climate_taobh_thiar, 0, $world_time, 0]], ["propagate", 1]]; +var $root settings = #[["weather-time", [$weather_1, "spring", $climate_taobh_thiar, 0, $world_time, 0]], ["propagate", 0], ["map-position", 0]]; var $root trusted_by = [$world]; public method ._check_links() { @@ -35,8 +38,6 @@ links = d; if (propagate_check) (| ((.parents())[1])._check_links(@propagate_check) |); - - // $#Edited: 15 Feb 97 19:46 $miro }; public method .add_exit_to() { @@ -52,21 +53,28 @@ // The format is: links, source, destination, path source->dest links = links.add_elem(dest.realm(), [this(), sender(), dest, []]); } - - // $#Edited: 19 Feb 97 02:23 $miro }; public method .advance_weather() { + arg ticked; var d, new; (caller() == $world) || (> .perms(sender()) <); d = .get_setting("weather-time", $realm); + if (ticked) { + d = d.replace(2, $world_time.current_season()); new = (d[3]).advance(d[1], d[2], (d[4]) || []); if (new != (d[1])) { d = d.replace(1, new); .set_setting("weather-time", $realm, d); .realm_announce(new.eval_message("invoke", $weather, .ctext_variables())); } + } + new = ((d[5]).daytime(d[6], (d[3]).daylength(d[2])))[2]; + if (new != last_daytime) { + last_daytime = new; + .realm_announce(.eval_message(tostr(new), $realm, .ctext_variables())); + } }; public method .cleanup_local() { @@ -74,8 +82,11 @@ t = this(); local = filter i in (local) where ((| (i.realm()) == t |)); +}; - // $#Edited: 19 Feb 97 02:23 $miro +public method .core_realm() { + links = #[]; + local = []; }; public method .ctext_variables() { @@ -92,6 +103,8 @@ arg value; var out, i; + if (!value) + return "None"; out = "%l %l in %l%l, %l".format((value[1]).name(), value[2], (value[3]).namef('ref), (value[4]) ? (" influenced by " + (map i in (value[4]) to (((i[1]).name()) + (((i[2]) == 50) ? "" : ((" = " + (i[2])) + "%"))).join("; "))) : "", (value[5]).namef('ref)); if ((value[6]) > 0) out += "+"; @@ -100,31 +113,29 @@ return out; }; +public method .get_msg() { + arg name, definer; + var t; + + if (!(t = pass(name, definer))) + return ((.parents())[1]).get_msg(name, definer); + else + return t; +}; + public method .init_realm() { local = []; links = #[]; - - // $#Edited: 15 Feb 97 20:04 $miro -}; - -public method .init_realms_frob() { - local = #[]; - - // $#Edited: 12 Aug 96 17:54 $jenner }; public method .local() { return local; - - // $#Edited: 12 Aug 96 17:54 $jenner }; frob method .name() { arg @args; return (> pass(@args) <); - - // $#Edited: 15 Feb 97 19:46 $miro }; public method .new() { @@ -134,8 +145,6 @@ local = local.setadd(sender()); .cleanup_local(); return this(); - - // $#Edited: 15 Feb 97 20:04 $miro }; public method .parse_weather_time() { @@ -143,7 +152,9 @@ var m, climate, depend, i, obj, tmp, str; if (type(value) == 'list) - value = (value.join()).trim(); + return value; + if ((!value) || (value == "none")) + return 0; value = (| (value.regexp("^(.+) (.+) in (.+),([^+-]+)([+-] *[0-9]+)?$")).mmap('trim) |); if (!value) throw(~type, "Value is not parsable as weather/time data."); @@ -184,8 +195,6 @@ (caller() == this()) || (> .perms(sender()) <); $world.send_event('realm_announce, message); - - // $#Edited: 07 Mar 97 16:32 $miro }; public method .realm_name() { @@ -195,8 +204,6 @@ if ((realms.length()) > 2) realms = [realms[1], realms.last()]; return realms.join(", "); - - // $#Edited: 15 Feb 97 19:46 $miro }; public method .realms() { @@ -205,8 +212,12 @@ if (definer() == this()) return []; return [.name()] + (((.parents())[1]).realms()); +}; - // $#Edited: 15 Feb 97 19:46 $miro +protected method .set_realm_local() { + arg new; + + local = new; }; root method .uninit_realm() { @@ -214,8 +225,6 @@ for x in (local) (| x.set_realm($realm_of_creation) |); - - // $#Edited: 15 Feb 97 20:04 $miro }; root method .uninit_realms_frob() { diff -rwu src-3.0a7/realm_base_eval.cdc ColdCore-3.0a9.02/src/realm_base_eval.cdc --- src-3.0a7/realm_base_eval.cdc Sat Aug 9 19:09:48 1997 +++ ColdCore-3.0a9.02/src/realm_base_eval.cdc Tue Aug 19 12:15:17 1997 @@ -13,8 +13,6 @@ v = vars['daytime]; return [((vars['time]) == 'post) ? (v[3]) : [v[3]], vars]; - - // $#Edited: 22 Dec 96 15:49 $miro }; public method .gen_hour() { @@ -23,8 +21,6 @@ v = vars['daytime]; return [((vars['time]) == 'post) ? tostr(v[1]) : [tostr(v[1])], vars]; - - // $#Edited: 22 Dec 96 15:49 $miro }; public method .gen_light() { @@ -33,8 +29,6 @@ v = vars['daytime]; return [((vars['time]) == 'post) ? (v[2]) : [v[2]], vars]; - - // $#Edited: 22 Dec 96 15:49 $miro }; diff -rwu src-3.0a7/realm_of_creation.cdc ColdCore-3.0a9.02/src/realm_of_creation.cdc --- src-3.0a7/realm_of_creation.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/realm_of_creation.cdc Tue Aug 19 12:15:20 1997 @@ -3,20 +3,16 @@ var $has_name name = ['prop, "<Creation>", "<Creation>"]; var $realm links = #[]; -var $realm local = [$nowhere, $body_cave, $void, $place, $the_pit]; +var $realm local = [$the_pit]; var $root created_on = 796268969; var $root flags = ['methods, 'code, 'variables, 'core]; var $root inited = 1; var $root managed = [$realm_of_creation]; var $root manager = $realm_of_creation; -var $root owned = [$realm_of_creation]; -var $root settings = #[["propagate", 1]]; +var $root settings = #[["propagate", 0], ["map-position", 0]]; -public method .core_realm_of_creation() { - local = [$the_pit]; - links = #[]; - - // $#Edited: 15 Feb 97 19:46 $miro +root method .core_realm_of_creation() { + .set_realm_local([$the_pit]); }; diff -rwu src-3.0a7/realm_settings.cdc ColdCore-3.0a9.02/src/realm_settings.cdc --- src-3.0a7/realm_settings.cdc Sat Aug 9 19:09:31 1997 +++ ColdCore-3.0a9.02/src/realm_settings.cdc Tue Aug 19 12:15:20 1997 @@ -1,18 +1,24 @@ new object $realm_settings: $foundation; *var $root child_index = '-' realm_settings.cdc var $root created_on = 854028767; -var $root defined_settings = #[["map-position", #[['get, ['get_realm_setting]], ['parse, ['parse_map_position]], ['format, ['format_map_position]]]], ["propagate", #[['get, ['get_realm_setting]], ['parse, ['is_boolean]], ['format, ['format_boolean]]]]]; +var $root defined_settings = #[["map-position", #[['get, ['get_realm_setting]], ['parse, ['parse_map_position]], ['format, ['format_map_position]]]], ["propagate", #[['get, ['get_realm_setting]], ['parse, ['is_propagator]], ['format, ['format_propagator]]]]]; var $root flags = ['variables, 'methods, 'code, 'core]; var $root inited = 1; var $root managed = [$realm_settings]; var $root manager = $realm_settings; -var $root settings = #[["propagate", 0], ["map-position", [0, 0, "99", $help_cmd_spawn]]]; +var $root settings = #[["propagate", 0], ["map-position", 0]]; + +root method .core_realm_settings() { + .set_setting("map-position", definer(), "none"); + .set_setting("propagate", definer(), "none"); +}; public method .format_map_position() { arg value; + if (!value) + return "none"; return "window %l, %l tag %l on %l".format(@value); }; @@ -22,16 +28,21 @@ t = this(); if (.has_ancestor($place)) { - if ((.local_settings_dict(definer)).contains(name)) + if ((.settings()).contains(name)) + return .get_local_setting(name, definer); + return (.realm()).get_realm_setting(name, definer, @args); + } else if ((.settings()).contains(name)) { return .get_local_setting(name, definer); - t = .realm(); + } else { + return ((.parents())[1]).get_realm_setting(name, definer, @args); } - return t.get_setting(name, definer, @args); }; public method .parse_map_position() { arg value; + if (value in ["n", "no", "none", "0"]) + return 0; if (type(value) == 'list) value = value.join(); value = (| (value.match_pattern("window *,* tag * on *")).mmap('trim) |); diff -rwu src-3.0a7/reaper.cdc ColdCore-3.0a9.02/src/reaper.cdc --- src-3.0a7/reaper.cdc Sat Aug 9 19:09:30 1997 +++ ColdCore-3.0a9.02/src/reaper.cdc Tue Aug 19 12:15:19 1997 @@ -20,16 +20,14 @@ var $root inited = 1; var $root managed = [$reaper]; var $root manager = $reaper; -var $root owned = [$reaper]; var $root quota = 75000; var $root settings = #[["home", $body_cave]]; var $thing gender = $gender_male; var $user action = ""; var $user connected_at = 0; var $user connections = []; -var $user context = #[['last, $body_cave]]; var $user creation_time = 780375877; -var $user formatter = $mail_list; +var $user formatter = $plain_format; var $user last_command_at = 0; var $user parsers = [$command_parser]; var $user password = "*"; diff -rwu src-3.0a7/reaper_log.cdc ColdCore-3.0a9.02/src/reaper_log.cdc --- src-3.0a7/reaper_log.cdc Sat Aug 9 19:09:33 1997 +++ ColdCore-3.0a9.02/src/reaper_log.cdc Tue Aug 19 12:15:18 1997 @@ -11,7 +11,6 @@ var $root inited = 1; var $root managed = [$reaper_log]; var $root manager = $reaper_log; -var $root owned = [$reaper_log]; var $thing gender = $gender_neuter; diff -rwu src-3.0a7/rect.cdc ColdCore-3.0a9.02/src/rect.cdc --- src-3.0a7/rect.cdc Sat Aug 9 19:09:33 1997 +++ ColdCore-3.0a9.02/src/rect.cdc Tue Aug 19 12:15:36 1997 @@ -11,8 +11,6 @@ arg point, box; return ($math.is_lower(point, box[2])) && ($math.is_lower(box[1], point)); - - // $#Edited: 26 Oct 96 17:57 $miro }; public method .intersection() { @@ -20,16 +18,12 @@ // Doesn't check for validity return [$math.major(r1[1], r2[1]), $math.minor(r1[2], r2[2])]; - - // $#Edited: 26 Oct 96 14:30 $miro }; public method .nondegenerate() { arg r1; return $math.is_lower(@r1); - - // $#Edited: 26 Oct 96 14:30 $miro }; public method .rect_size() { @@ -46,8 +40,6 @@ arg r1, r2; return [$math.minor(r1[1], r2[1]), $math.major(r1[2], r2[2])]; - - // $#Edited: 26 Oct 96 14:30 $miro }; diff -rwu src-3.0a7/registry.cdc ColdCore-3.0a9.02/src/registry.cdc --- src-3.0a7/registry.cdc Sat Aug 9 19:09:34 1997 +++ ColdCore-3.0a9.02/src/registry.cdc Tue Aug 19 12:15:21 1997 @@ -9,14 +9,12 @@ *var $registry reserved_names = ' ' registry.cdc DEFAULT [] *var $registry stripped = ' ' registry.cdc DEFAULT 0 *var $registry stripped_characters = ' ' registry.cdc DEFAULT "" *var $root child_index = '-' registry.cdc var $root created_on = 796268969; var $root fertile = 1; var $root flags = ['methods, 'code, 'fertile, 'variables, 'core]; var $root inited = 1; var $root managed = [$registry]; var $root manager = $registry; -var $root owned = [$registry]; public method .database() { if (!(.has_flag('variables, sender()))) @@ -77,6 +75,10 @@ (> pass(name) <); }; +public method .reserved_names() { + return reserved_names || []; +}; + public method .search() { arg name; var tmp; @@ -160,7 +162,7 @@ } // check reserved and invalid names - if (reserved_names && (sname in reserved_names)) + if (sname in (.reserved_names())) throw(~invname, ("`" + name) + "' is a reserved name."); if (invalid_names && (m = regexp(sname, invalid_names))) throw(~invname, ("`" + (m[2])) + "' is not allowed as part of a name."); diff -rwu src-3.0a7/robot.cdc ColdCore-3.0a9.02/src/robot.cdc --- src-3.0a7/robot.cdc Sat Aug 9 19:09:30 1997 +++ ColdCore-3.0a9.02/src/robot.cdc Tue Aug 19 12:15:18 1997 @@ -1,5 +1,5 @@ -new object $robot: $body; +new object $robot: $body, $has_reactions; var $body body_parts = #[]; var $described prose = <$ctext_frob, [["A generic automated robot object."], #[['this, $robot]]]>; @@ -13,10 +13,11 @@ var $robot last_id = 0; var $robot match_types = #[["regexp", ['regexp, "rex"]], ["pattern", ['match_pattern, "pat"]], ["template", ['match_template, "tmp"]]]; var $robot reactions = 0; -var $root flags = ['core]; +var $root created_on = 796268969; +var $root flags = ['methods, 'code, 'variables, 'core, 'fertile, 'command_cache]; +var $root inited = 1; var $root managed = [$robot]; var $root manager = $robot; -var $root owned = [$robot]; var $thing gender = $gender_neuter; public method .activate_reaction() { @@ -193,8 +194,6 @@ if (!active_ids) clear_var('active_ids); } - - // $#Edited: 19 Dec 96 10:38 $brandon }; public method .del_reaction() { @@ -236,8 +235,6 @@ return; if (event == 'social) .check_reactions(args[2], args[3], args[1]); - - // $#Edited: 07 Mar 97 15:57 $miro }; public method .match_type() { @@ -247,8 +244,6 @@ if (!dict_contains(match_types, type)) throw(~type, "Invalid type matcher: " + type); return (| match_types[type] |); - - // $#Edited: 18 Dec 96 17:41 $brandon }; public method .parse_line() { @@ -269,15 +264,13 @@ } }; -public method .react_command() { +protected method .react_command() { arg str, match, sender, cmd; .parse_line(cmd); - - // $#Edited: 17 Dec 96 21:51 $brandon }; -public method .react_subcmd() { +protected method .react_subcmd() { arg str, match, sender, cmd; var m; @@ -289,8 +282,6 @@ public method .reactions() { return reactions; - - // $#Edited: 18 Dec 96 10:25 $brandon }; public method .reactions_cmd() { @@ -302,7 +293,7 @@ for id in (dict_keys(reactions || #[])) { [m, tmpl, type, chance, times, [method, args], min, max] = reactions[id]; t = $robot.match_type(m); - a = dict_contains(active_ids, id); + a = dict_contains(active_ids || #[], id); out += [strfmt("%l%3r %3r %4r %6l %8c %22l %l %l", a ? "*" : " ", id, chance, (times == (-1)) ? "inf" : times, type, (min == max) ? min : ((min + "~") + max), method, t[2], tmpl ? (("\"" + tmpl) + "\"") : "anything")]; } if (out) diff -rwu src-3.0a7/root.cdc ColdCore-3.0a9.02/src/root.cdc --- src-3.0a7/root.cdc Sat Aug 9 19:09:28 1997 +++ ColdCore-3.0a9.02/src/root.cdc Tue Aug 19 12:15:16 1997 @@ -1,11 +1,11 @@ object $root; *var $root child_index = '-' root.cdc +var $root child_index = 0; var $root created_on = 0; -var $root defined_settings = #[]; +var $root defined_settings = #[["help-node", #[['get, ['help_node]], ['set, ['set_help_node_setting]], ['parse, ['parse_help_node_setting]], ['format, ['format_help_node_setting]]]]]; var $root fertile = 1; -var $root flags = ['methods, 'code, 'fertile, 'core, 'variables]; +var $root flags = ['methods, 'code, 'core, 'variables]; var $root help_node = 0; var $root inited = 0; var $root managed = 0; @@ -18,6 +18,19 @@ var $root writers = [$root]; var $root writes = 0; +protected method ._all_defined_settings(): nooverride { + var a, all, d; + + all = #[]; + for a in (ancestors()) { + catch any { + for d in (dict_keys(a.defined_settings())) + all = dict_add(all, d, a); + } + } + return all; +}; + private method ._clean_root() { arg v, m; var obj, value; @@ -136,6 +149,7 @@ arg flag; (> .perms(sender(), 'manager) <); + (> $sys.touch('coreok) <); if ((flag == 'core) && (!($sys.is_system(sender())))) throw(~perm, "Only system objects can set the 'core flag."); (flag == 'fertile) && (> .perms(sender(), 'manager) <); @@ -149,11 +163,14 @@ }; public method .add_method() { - arg code, name; - var l, m, line; + arg code, name, @evalonly; + var l, m, line, errs; (> .perms(sender()) <); - (| $sys.touch() |); + if (evalonly && (caller() == $programmer)) + (> $sys.touch('lockok) <); + else + (> $sys.touch() <); // check for a few things only admins can do if (!(sender().is($admin))) { @@ -165,16 +182,25 @@ } } } - return (> add_method(code, name) <); + errs = (> add_method(code, name) <); + for l in [1 .. listlen(errs)] { + line = errs[l]; + if (match_regexp(line, "Line [0-9]+: Unknown function length.")) { + line = substr(line, 1, strlen(line) - 1); + errs = replace(errs, l, line + "(), try listlen(), strlen() or buflen()"); + } + } + return errs; }; public method .add_parent() { arg parent; (> .perms(sender(), 'manager) <); + (> $sys.touch() <); (> parent.will_inherit(sender()) <); if (.has_ancestor(parent)) - throw(~perm, ((sender() + " already has ") + this()) + " as an ancestor."); + throw(~perm, ((this() + " already has ") + parent) + " as an ancestor."); .change_parents(parents() + [parent]); }; @@ -182,6 +208,7 @@ arg obj; (caller() == definer()) || (> .perms(sender(), 'manager) <); + (> $sys.touch('coreok) <); trusted = (trusted || []).setadd(obj); obj.add_trusted_obj(); }; @@ -190,11 +217,12 @@ trusted_by = (trusted_by || []).setadd(sender()); }; -public method .add_var() { +public method .add_var(): nooverride { arg name, @args; var tmp, kid; (> .perms(sender()) <); + (> $sys.touch() <); if (!(tostr(name).valid_ident())) throw(~invident, name + " is not a valid ident."); (> add_var(name) <); @@ -216,8 +244,6 @@ rethrow(error()); } } - - // $#Edited: 08 Jan 96 09:34 Lynx ($lynx) }; root method .add_writable_obj(): nooverride { @@ -228,26 +254,44 @@ arg obj; (> .perms(sender(), 'manager) <); + (> $sys.touch('coreok) <); writers = (writers || []).setadd(obj); obj.add_writable_obj(); }; public method .all_defined_settings(): nooverride { - var a, all, d; + if (!(.has_flag('variables, sender()))) + throw(~perm, ((sender().namef('ref)) + " does not have permission to view settings on ") + (.name('ref))); + return ._all_defined_settings(); +}; - (> .perms(sender()) <); - all = #[]; - for a in (ancestors()) { - catch any { - for d in (dict_keys(a.defined_settings())) - all = dict_add(all, d, a); +public method .anc2(): nooverride { + var i, c, parent, d; + + d = #[]; + for parent in (parents()) + d = dict_add(d, parent, 1); + while ((| (c = dict_keys(d)[++i]) |)) { + for parent in (c.parents()) { + pause(); + d = dict_add(d, parent, 1); } + pause(); } - return all; + return dict_keys(d); }; public method .ancestors(): nooverride { - return ancestors(); + arg @args; + + return ancestors(@args); +}; + +public method .ancestors_descending() { + arg obj; + var anc; + + return filter anc in (.ancestors()) where (anc.has_ancestor(obj)); }; public method .ancestors_to(): nooverride { @@ -284,14 +328,12 @@ out = out.union(i.ancestry(gen - 1)); } return out; - - // $#Edited: 22 Nov 96 17:42 $miro }; public method .as_this_run() { arg obj, method, args; - if (caller() != $scheduler) + if (!((caller() == $scheduler) || (caller().is($http_interface)))) throw(~perm, "Sender not allowed to gain access to object perms."); return (> obj.(method)(@args) <); }; @@ -309,8 +351,6 @@ output += part; } return output; - - // $#Edited: 30 Nov 96 20:00 $miro }; public method .change_manager(): nooverride { @@ -319,6 +359,7 @@ if ((caller() != definer()) && (!($sys.is_system(sender())))) throw(~perm, "You must have system privileges to change the manager."); + (> $sys.touch() <); if (type(new) != 'objnum) throw(~invarg, "Managers must be given as a single dbref."); old = .manager(); @@ -329,72 +370,90 @@ root method .change_parents(): nooverride { arg parents; - var old_a, old_p, p, o, a, new_a, m, def, objs, d; + var old_a, old_p, a, obj, new_a, definer, branch, method, str; - // NOTE: add a system at some point for queing messages to a - // user when they aren't connected (so the tell's below will be seen) if (!parents) throw(~noparents, "Objects must have at least 1 parent"); - // remember the old ancestors and parents - old_a = ancestors(); + // remember a few things + old_a = setremove(ancestors(), this()); old_p = .parents(); + branch = (.descendants()) + [this()]; - // build the new ancestors list by hand, so we can uninit befor changing - new_a = [this(), @parents]; - for p in (parents) - new_a = new_a.union(p.ancestors()); + // build the new ancestors list by hand, so we can figure out what is + // changing, and uninitialize those ancestors that are going away + new_a = []; + for obj in (parents) + new_a = new_a.union(obj.ancestors()); - // uninit any old parents - objs = (.descendants()) + [this()]; + // uninit any ancestors going away for a in (old_a.set_difference(new_a)) { - pause(); - if (!(m = tosym("uninit_" + tostr(a.objname())))) - continue; - if ((def = (| find_method(m) |))) { - if (def != a) { - (| (def.manager()).tell(((("Uninitialization method for " + a) + " in wrong place (") + find_method(m)) + ")") |); + // call this ancestor's uninit on the obj and all its children + method = tosym("uninit_" + (a.objname())); + if ((definer = (| find_method(method) |))) { + if (definer != a) { + // scream madly and run around--everybody should know this + str = "UNINIT ERROR: uninit method for " + a; + str += (" in wrong place (" + definer) + ")"; + (| (definer.manager()).tell(str) |); + (| (a.manager()).tell(str) |); + (| sender().tell(str) |); continue; } - for d in (objs) { - pause(); + + // call the uninit method on this object only catch any { - d.(m)(); + .(method)(); } with { - if (def) { - (| (def.manager()).tell(((("UNINIT ERROR " + this()) + "<") + def) + ">:") |); - (| (def.manager()).tell_traceback(traceback()) |); - } - } + // try and let somebody know they made a boo-boo somewhere + str = ((("UNINIT ERROR " + obj) + "<") + this()) + ">:"; + (| (.manager()).tell(str) |); + (| (.manager()).tell_traceback(traceback()) |); + (| sender().tell(str) |); + (| sender().tell_traceback(traceback()) |); + (| sender().tell("Continuing chparent..") |); } - $sys.clear_definer_vars(a, objs); } + + // cleanup any old obj vars left lying around + // if (branch) + // $sys.clear_definer_vars(a, branch); + $sys.clear_definer_vars(a, [this()]); + refresh(); } - // do the change + // make the change (> chparents(parents) <); - // init new + // init anybody new to the family for a in (ancestors().set_difference(old_a)) { - if (!(m = tosym("init_" + tostr(a.objname())))) - continue; - if ((def = (| find_method(m) |))) { - if (def != a) { - (| (def.manager()).tell(((("Initialization method for " + a) + " in wrong place (") + find_method(m)) + ")") |); + method = tosym("init_" + (a.objname())); + if ((definer = (| find_method(method) |))) { + if (definer != a) { + // scream madly and run around--everybody should know this + // (damn inlaws, can't ever get things right) + str = "INIT ERROR: uninit method for " + a; + str += (" in wrong place (" + definer) + ")"; + (| (definer.manager()).tell(str) |); + (| (a.manager()).tell(str) |); + (| sender().tell(str) |); continue; } - for d in (objs) { - pause(); + + // introduce the new ancestor catch any { - d.(m)(); + .(method)(); } with { - if (def) { - (| (def.manager()).tell(((("INIT ERROR " + this()) + "<") + def) + ">:") |); - (| (def.manager()).tell_traceback(traceback()) |); - } - } + // try and let somebody know they made a boo-boo somewhere + str = ((("INIT ERROR " + obj) + "<") + this()) + ">:"; + (| (.manager()).tell(str) |); + (| (.manager()).tell_traceback(traceback()) |); + (| sender().tell(str) |); + (| sender().tell_traceback(traceback()) |); + (| sender().tell("Continuing chparent..") |); } } + refresh(); } }; @@ -408,6 +467,7 @@ if (!(| .perms(sender(), 'manager) |)) (> .perms(caller(), $root, $sys) <); + (> $sys.touch() <); if (!parents) throw(~noparents, "There must be at least 1 parent for each object."); @@ -481,6 +541,10 @@ } }; +root method .core_root() { + (| clear_var('child_index) |) || (child_index = 0); +}; + public method .corify(): nooverride { var d; @@ -489,7 +553,7 @@ // reverse engineer it--if coreify_<object> exists, // call it on this object and all of its descendants. - for d in (.descendants()) { + for d in (((.descendants()).setremove($sys)) + [$sys]) { .corify_descendants_of(d); refresh(); } @@ -508,12 +572,11 @@ } with { return; } - (| obj.(name)() |); - for d in (obj.descendants()) { + for d in ([obj] + (obj.descendants())) { catch any { (> d.(name)() <); } with { - $sys.log(((("ERROR encountered in " + d) + ".") + name) + "():"); + $sys.log(((("** ERROR encountered in " + d) + ".") + name) + "():"); for l in ($parse_lib.traceback(traceback())) $sys.log(l); } @@ -551,18 +614,17 @@ public method .debug() { arg @stuff; - var x, line, mngr, meth; + var x, line, mngr, meth, stack; - meth = (| (stack()[2])[3] |); + stack = stack(); + meth = (| (((stack[2])[3]) + "() line ") + ((stack[2])[4]) |); if (meth) - line = ((("DEBUG " + sender()) + ".") + meth) + "(): "; + line = ((("DEBUG " + sender()) + ".") + meth) + ": "; else line = ("DEBUG " + sender()) + ": "; for x in (stuff) line = (line + " ") + toliteral(x); (| (.manager()).tell(line) |); - - // $#Edited: 13 Jun 96 01:13 $levi }; public method .define_setting(): nooverride { @@ -595,6 +657,9 @@ arg flag; (> .perms(sender(), 'manager) <); + (> $sys.touch('coreok) <); + if ((flag == 'core) && (!($sys.writable_core()))) + throw(~perm, this() + " is a core object, and the core isn't writable."); // let them add any flag they want flags = (flags || []).setremove(flag); @@ -618,6 +683,7 @@ var parents; (> .perms(sender(), 'manager) <); + (> $sys.touch() <); if (!valid(parent)) throw(~type, "Not a valid parent, must send a valid object."); parents = .parents(); @@ -631,6 +697,7 @@ arg obj; (> .perms(sender(), 'manager) <); + (> $sys.touch('coreok) <); trusted = (trusted || []).setremove(obj); if (!trusted) clear_var('trusted); @@ -648,6 +715,7 @@ var n, obj; (caller() == definer()) || (> .perms(sender()) <); + (> $sys.touch() <); // try and clear the variable on all of the descendants, before deleting // the variable... @@ -668,6 +736,7 @@ (caller() == definer()) || (> .perms(sender(), 'manager) <); writers = (writers || []).setremove(obj); + (> $sys.touch('coreok) <); if (!writers) (| clear_var('writers) |); obj.del_writable_obj(); @@ -712,7 +781,7 @@ (> .perms(sender(), 'manager) <); if (.has_flag('core)) throw(~perm, "This object is a core object, and cannot be destroyed!"); - (> .uninitialize() <); + (| .uninitialize('destroy) |); destroy(); }; @@ -740,8 +809,6 @@ } (| del_method(method) |); return ['result, result]; - - // $#Edited: 06 Jan 96 14:58 Lynx ($lynx) }; public method .examine() { @@ -770,14 +837,21 @@ public method .format_descendants() { arg ind, done, depth, max, yes, no, above; - var c, anc, list, id, perms, f, show; + var c, anc, list, id, perms, f, show, myflags; show = 1; - for f in (.flags()) { - if (yes && (!(f in yes))) { - show = 0; + myflags = .flags(); + if (yes) { + for f in (yes) { + if (f in myflags) { + show = 1; break; + } else { + show = 0.0; + } } + } + for f in (.flags()) { if (no && (f in no)) { show = 0; break; @@ -809,6 +883,14 @@ return list; }; +public method .format_help_node_setting() { + arg node; + + if (node) + return node.namef('ref); + return ""; +}; + public method .format_setting(): nooverride { arg name, definer, value; var i, args; @@ -882,6 +964,8 @@ }; public method .get_quota(): nooverride { + arg @args; + return quota; }; @@ -922,9 +1006,9 @@ }; public method .help_node() { - return help_node; + arg @args; - // $#Edited: 30 Jul 96 16:45 $jenner + return help_node; }; public method .hname() { @@ -955,13 +1039,13 @@ continue; if ((def = (| find_method(method) |))) { if (def != a) { - (| (def.manager()).tell(((("Uninitialization method for " + a) + " in wrong place (") + find_method(method)) + ")") |); + (| (def.manager()).tell(((("Initialization method for " + a) + " in wrong place (") + find_method(method)) + ")") |); } else { catch any { .(method)(); } with { if (def) { - (| (def.manager()).tell(((("UNINIT ERROR " + this()) + "<") + def) + ">:") |); + (| (def.manager()).tell(((("INIT ERROR " + this()) + "<") + def) + ">:") |); (| (def.manager()).tell_traceback(traceback()) |); } } @@ -1078,7 +1162,6 @@ public method .method_bytecode() { arg method; - throw(~wait, "this is broken right now."); return (> method_bytecode(method) <); }; @@ -1112,8 +1195,6 @@ arg type; return tostr(this()); - - // $# Edited 28 Oct 1995 21:06 Lynx ($lynx) }; public method .new() { @@ -1137,8 +1218,6 @@ pause(); } return kids.keys(); - - // $#Edited: 30 Jun 96 23:06 $jenner }; public method .objname(): nooverride { @@ -1147,14 +1226,23 @@ public method .objnum(): nooverride { return objnum(); - - // $#Edited: 06 Jan 96 13:28 Lynx ($lynx) }; public method .parents(): nooverride { return parents(); }; +public method .parse_help_node_setting() { + arg value, @args; + + if (!value) + return 0; + value = (> $object_lib.to_dbref(value) <); + if (!(value.is($help_node))) + throw(~perm, (value.namef('ref)) + " is not a $help_node."); + return value; +}; + public method .perms(): nooverride { arg what, @args; var flag; @@ -1216,7 +1304,7 @@ arg now, new; (> .perms(sender()) <); - (| $sys.touch() |); + (> $sys.touch() <); return (> rename_method(now, new) <); }; @@ -1224,6 +1312,7 @@ arg new_flags; (> .perms(sender(), 'manager) <); + (> $sys.touch() <); if (type(new_flags) != 'list) throw(~invflags, "Flags must be submitted as a list of symbols."); if ((!new_flags) && flags) @@ -1234,13 +1323,13 @@ flags = new_flags; }; -public method .set_hnode() { - arg node; - - (> .perms(sender(), 'manager) <); - help_node = node; +protected method .set_help_node_setting() { + arg name, definer, value; - // $#Edited: 30 Jul 96 16:46 $jenner + if (!value) + (| clear_var('help_node) |); + else + help_node = value; }; public method .set_method_access(): nooverride { @@ -1248,6 +1337,7 @@ if (!(.is_writable_by(sender()))) throw(~perm, (sender() + " cannot write to ") + this()); + (> $sys.touch() <); return (> set_method_access(method, state) <); }; @@ -1256,6 +1346,7 @@ if (!(.is_writable_by(sender()))) throw(~perm, (sender() + " cannot write to ") + this()); + (> $sys.touch() <); if (('locked in flags) && (!($sys.is_system(sender())))) throw(~perm, "Only administrators can set the locked method flag."); return (> set_method_flags(method, flags) <); @@ -1267,6 +1358,7 @@ (> .perms(sender()) <); if (.has_flag('core)) throw(~perm, this() + " is a core object; you cannot change its object name!"); + (> $sys.touch() <); // Make sure first argument is a symbol. if (type(objname) != 'symbol) @@ -1284,13 +1376,14 @@ public method .set_quota(): nooverride { arg value; - (> .perms(caller(), $user, @$sys.system(), $root) <); + (> .perms(caller(), $user, @$sys.system(), $root, $admin) <); quota = value; }; -private method .set_quota_exempt(): nooverride { +public method .set_quota_exempt(): nooverride { arg bool; + (> .perms(caller(), $user, @$sys.system(), $root) <); if (bool) quota_exempt = 1; else @@ -1348,8 +1441,6 @@ arg setting; return defined_settings[setting]; - - // $#Edited: 05 Mar 97 20:50 $brandon }; public method .settings(): nooverride { @@ -1380,6 +1471,10 @@ return $sys.spawn_sender(suffix, sender()); }; +public method .test_method() { + return "from root"; +}; + public method .trusted(): nooverride { arg @literal; @@ -1395,7 +1490,7 @@ public method .trusts(): nooverride { arg obj; - return (| obj in (.trusted()) |) || ((obj == $scheduler) || ($sys.is_system(obj))); + return (| obj in (.trusted()) |) || ((obj in [$scheduler, $directories]) || ($sys.is_system(obj))); }; public method .undefine_setting(): nooverride { @@ -1448,34 +1543,74 @@ }; public method .uninitialize(): nooverride { - var a, v, d, def, method, objs; + arg @destroyed; + var a, v, d, definer, method, descendants, str; (> .perms(caller(), $root, $sys) <); - objs = (.descendants()) + [this()]; + destroyed = destroyed ? 1 : 0; + descendants = (.descendants()) + [this()]; + + // call [ancestors...].uninit_ancestor() on the object being destroyed for a in (ancestors()) { - pause(); - if (!(method = tosym("uninit_" + tostr(a.objname())))) - continue; - if ((def = (| find_method(method) |))) { - if (def != a) { - (| (def.manager()).tell(((("Uninitialization method for " + a) + " in wrong place (") + find_method(method)) + ")") |); + method = tosym("uninit_" + (a.objname())); + if ((definer = (| find_method(method) |))) { + if (definer != a) { + // scream madly and run around--everybody should know this + str = "UNINIT ERROR: uninit method for " + a; + str += (" in wrong place (" + definer) + ")"; + (| (definer.manager()).tell(str) |); + (| (a.manager()).tell(str) |); + (| sender().tell(str) |); continue; } - for d in (objs) { - pause(); catch any { - d.(method)(); + .(method)(); } with { - if (def) { - (| (def.manager()).tell(((("UNINIT ERROR " + this()) + "<") + def) + ">:") |); - (| (def.manager()).tell_traceback(traceback()) |); + // try and let somebody know they made a boo-boo somewhere + str = ((("UNINIT ERROR " + this()) + "<") + definer) + ">:"; + if (definer) { + (| (definer.manager()).tell(str) |); + (| (definer.manager()).tell_traceback(traceback()) |); + } + (| sender().tell(str) |); (| sender().tell_traceback(traceback()) |); + (| sender().tell("Continuing uninit..") |); + } + } + refresh(); } + + // if we have descendants, clean anything from the object being dested + method = tosym("uninit_" + (.objname())); + if ((definer = (| find_method(method) |))) { + if (definer != this()) { + // scream madly and run around--everybody should know this + str = "UNINIT ERROR: uninit method for " + a; + str += (" in wrong place (" + definer) + ")"; + (| (definer.manager()).tell(str) |); + (| (.manager()).tell(str) |); + (| sender().tell(str) |); + } else { + for d in (descendants) { + catch any { + d.(method)(); + } with { + // try and let somebody know they made a boo-boo somewhere + str = ((("UNINIT ERROR " + d) + "<") + this()) + ">:"; + (| (.manager()).tell(str) |); + (| (.manager()).tell_traceback(traceback()) |); + (| sender().tell(str) |); + (| sender().tell_traceback(traceback()) |); + (| sender().tell("Continuing uninit..") |); } + refresh(); } - $sys.clear_definer_vars(a, objs); } } + + // clear vars + if ((!destroyed) && descendants) + $sys.clear_definer_vars(this(), descendants); }; public method .valid_setting_attr(): nooverride { @@ -1512,15 +1647,15 @@ } } return data; - - // $#Edited: 22 Nov 96 17:42 $miro }; public method .variables(): nooverride { + if (!(.has_flag('variables, sender()))) + throw(~perm, (sender() + " doesn't have permission to find methods on ") + this()); return variables(); }; -public method .will_inherit(): nooverride { +public method .will_inherit() { arg who; if (this() in (sender().parents())) diff -rwu src-3.0a7/rtree.cdc ColdCore-3.0a9.02/src/rtree.cdc --- src-3.0a7/rtree.cdc Sat Aug 9 19:09:33 1997 +++ ColdCore-3.0a9.02/src/rtree.cdc Tue Aug 19 12:15:36 1997 @@ -47,9 +47,6 @@ return [[b, l], 1, box]; } return [self, 0, 0]; - - // $#Edited: 01 Nov 96 15:48 $miro - // $#Edited: 30 Nov 96 21:22 $miro }; public method ._insert() { @@ -76,8 +73,6 @@ else return ._split((boxes.delete(u)) + (ret.slice(3)), (trees.delete(u)) + [[(ret[1])[1], (ret[1])[2]], [(ret[2])[1], (ret[2])[2]]]); } - - // $#Edited: 01 Nov 96 15:48 $miro }; public method ._insert_where() { @@ -93,8 +88,6 @@ } } return u; - - // $#Edited: 01 Nov 96 15:48 $miro }; public method ._split() { @@ -140,8 +133,6 @@ } } return [[l1, n1, r1], [l2, n2, r2]]; - - // $#Edited: 01 Nov 96 15:48 $miro }; public method .delete() { @@ -150,14 +141,6 @@ ret = ._delete(self, point, box); return (ret[1]) ? (<this(), (ret[1])>) : (.empty()); - - // $#Edited: 01 Nov 96 15:48 $miro -}; - -public method .empty() { - return (<$rtree, [[], []]>); - - // $#Edited: 01 Nov 96 15:48 $miro }; public method .insert() { @@ -171,8 +154,10 @@ return (<$rtree, (ret[1])>); else return (<$rtree, [ret.slice(3), [[(ret[1])[1], (ret[1])[2]], [(ret[2])[1], (ret[2])[2]]]]>); +}; - // $#Edited: 01 Nov 96 15:48 $miro +public method .new() { + return (<$rtree, [[], []]>); }; public method .search() { @@ -189,8 +174,6 @@ l += .search(trees[i], point); } return l; - - // $#Edited: 01 Nov 96 15:48 $miro }; diff -rwu src-3.0a7/scheduler.cdc ColdCore-3.0a9.02/src/scheduler.cdc --- src-3.0a7/scheduler.cdc Tue Aug 12 15:44:57 1997 +++ ColdCore-3.0a9.02/src/scheduler.cdc Tue Aug 19 12:15:17 1997 @@ -6,7 +6,6 @@ var $root inited = 1; var $root managed = [$scheduler]; var $root manager = $scheduler; -var $root owned = [$scheduler]; var $scheduler blocked_tasks = #[]; var $scheduler expected_lag = 0; var $scheduler server_lag = 0; @@ -23,8 +22,6 @@ if (type(object) != 'objnum) throw(~type, "Object must be a dbref."); sub_schedulers += [object]; - - // $#Edited: 30 Nov 96 21:22 $miro }; public method .add_task() { @@ -48,8 +45,6 @@ task = [tid, time + task_time, task_time, sender(), caller(), method, flags, args]; .add_to_task_queue(task); return tid; - - // $#Edited: 21 Nov 96 20:38 $miro }; private method .add_to_task_queue() { @@ -59,8 +54,6 @@ // We don't want to run out of tics task_queue = $heap.push(task_queue, task, 2); - - // $#Edited: 14 Mar 97 21:33 $miro }; public method .block_task() { @@ -92,6 +85,7 @@ }; root method .core_scheduler() { + suspended_tasks = #[]; task_queue = []; }; @@ -102,8 +96,6 @@ // this must *not* throw task_queue = $heap.del(task_queue, i, 2); - - // $#Edited: 14 Mar 97 21:33 $miro }; public method .del_sub_scheduler() { @@ -123,8 +115,6 @@ if (s < (sub_schedulers.length())) s += [sub_schedulers.subrange(pos + 1)]; sub_schedulers = s; - - // $#Edited: 30 Nov 96 21:22 $miro }; public method .del_task() { @@ -143,8 +133,6 @@ } } throw(~tasknf, "No task found by that TID"); - - // $#Edited: 21 Nov 96 20:38 $miro }; public method .has_blocked_tasks() { @@ -163,17 +151,15 @@ while (task_queue && (t > ((task_queue[1])[2]))) { task = task_queue[1]; catch any - (> (task[5]).as_this_run(task[5], task[6], task[8]) <); + (> (task[4]).as_this_run(task[4], task[6], task[8]) <); with - (| ((task[5]).manager()).tell_traceback(traceback()) |); + (| ((task[4]).manager()).tell_traceback(traceback()) |); .remove_first_task(); } // call sub schedulers for sub in (sub_schedulers) (| sub.pulse() |); - - // $#Edited: 21 Nov 96 20:38 $miro }; private method .remove_first_task() { @@ -185,8 +171,6 @@ } if (!task_queue) task_index = 1; - - // $#Edited: 21 Nov 96 20:38 $miro }; public method .resume() { @@ -226,8 +210,6 @@ arg task; return (> suspended_tasks[task] <); - - // $#Edited: 29 Oct 96 19:02 $brandon }; public method .sys_add_task() { @@ -261,8 +243,6 @@ task = [tid, task_time + time, task_time, sender, caller, method, flags, args]; .add_to_task_queue(task); return tid; - - // $#Edited: 21 Nov 96 20:38 $miro }; public method .task_info() { @@ -270,16 +250,12 @@ (> .perms(sender(), 'system) <); return (> task_info(@args) <); - - // $#Edited: 29 Oct 96 17:54 $brandon }; public method .task_queue() { // sender must be system, for now (> .perms(sender(), 'system) <); return task_queue; - - // $#Edited: 21 Nov 96 20:38 $miro }; public method .unblock_task() { diff -rwu src-3.0a7/settings.cdc ColdCore-3.0a9.02/src/settings.cdc --- src-3.0a7/settings.cdc Sat Aug 9 19:09:48 1997 +++ ColdCore-3.0a9.02/src/settings.cdc Tue Aug 19 12:15:17 1997 @@ -16,12 +16,16 @@ return "no"; }; +public method .format_itemlist() { + arg data; + + return data.join(", "); +}; + public method .format_object() { arg value; return value.namef('xref); - - // $#Edited: 21 Mar 97 15:56 $brandon }; public method .format_onoff() { @@ -33,6 +37,12 @@ return "off"; }; +public method .format_propagator() { + arg value; + + return (type(value) == 'frob) ? (value.format()) : "no"; +}; + public method .is_boolean() { arg value; var bool; @@ -42,22 +52,96 @@ return bool; }; +public method .is_propagator() { + arg value; + + return (> $propagator.new_with(value) <); +}; + public method .is_type() { - arg value, type; + arg value, type, @subtypes; + var i; if (type(value) == type) return value; switch (type) { + case 'list: + value = fromliteral(value); + if (type(value) != 'list) + throw(~type, "Value is unparsable as list."); + if (subtypes) + value = map i in (value) to ((> .is_type(i, subtypes[1]) <)); + return value; + case 'dictionary: + value = fromliteral(value); + if (type(value) != 'dictionary) + throw(~type, "Value is unparsable as dictionary."); + if (subtypes) + value = hash i in (value) to ((> [.is_type(i, subtypes[1]), .is_type(i, subtypes[2])] <)); + return value; case 'integer: if (value.is_numeric()) return toint(value); else - throw(~type, "Value is unparseable as integer."); + throw(~type, "Value is unparsable as integer."); case 'objnum: return (> $object_lib.to_dbref(value) <); default: return value; } +}; + +public method .is_valid_type() { + arg type; + + return ($data_lib.is_valid_type(type)) || (type in (.valid_types())); +}; + +public method .parse_itemlist() { + arg value, method, @args; + var action, list, item, out; + + if (value && ((value[1]) in ["+", "-"])) { + if ((value[1]) == "-") + action = 'del; + else + action = 'add; + list = [substr(value, 2)]; + } else { + action = 'set; + list = value.explode_english_list(); + } + out = []; + for item in (list) { + if (method) { + catch ~methodnf + item = (> sender().(method)(item, action, @args) <); + with + item = (> .(method)(item, action, @args) <); + } + out += [item]; + } + if (action == 'set) + return [action, out]; + else + return [action, out[1]]; +}; + +public method .parse_object() { + arg value, @args; + var obj; + + catch any { + return $object_lib.to_dbref(value); + } with { + if (!user()) + rethrow(error()); + } + return (> user().match_environment(value) <); +}; + +public method .valid_types() { + return ['boolean, 'itemlist]; }; diff -rwu src-3.0a7/settings_ui.cdc ColdCore-3.0a9.02/src/settings_ui.cdc --- src-3.0a7/settings_ui.cdc Sat Aug 9 19:09:48 1997 +++ ColdCore-3.0a9.02/src/settings_ui.cdc Tue Aug 19 12:15:20 1997 @@ -10,7 +10,6 @@ var $root inited = 1; var $root managed = [$settings_ui]; var $root manager = $settings_ui; -var $root owned = [$settings_ui]; public method ._change_setting() { arg name, value, definer, object; @@ -32,8 +31,6 @@ (> object.OLD_set_setting(definer, name, value) <); with throw(~stop, (traceback()[1])[2]); - - // $#Edited: 30 Nov 96 21:22 $miro }; public method ._show_setting() { @@ -77,8 +74,6 @@ if (!out) out = [" (none)"]; return [(definer.namef('xref)) + ":"] + out; - - // $#Edited: 30 Nov 96 21:22 $miro }; protected method .set_cmd() { diff -rwu src-3.0a7/slate.cdc ColdCore-3.0a9.02/src/slate.cdc --- src-3.0a7/slate.cdc Sat Aug 9 19:09:48 1997 +++ ColdCore-3.0a9.02/src/slate.cdc Tue Aug 19 12:15:20 1997 @@ -10,7 +10,6 @@ var $root inited = 1; var $root managed = [$slate]; var $root manager = $slate; -var $root owned = [$slate]; var $slate connection = 0; var $slate received_text = []; var $slate remote_host = ""; diff -rwu src-3.0a7/smtp.cdc ColdCore-3.0a9.02/src/smtp.cdc --- src-3.0a7/smtp.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/smtp.cdc Tue Aug 19 12:15:36 1997 @@ -2,206 +2,567 @@ new object $smtp: $network; var $root created_on = 845213524; +var $root defined_settings = #[["aliases", #[['get, ['get_aliases_setting]], ['set, ['set_aliases_setting]], ['parse, ['parse_itemlist, 'parse_alias_setting]], ['format, ['fmt_aliases_setting]]]], ["hosts", #[['get, ['get_hosts_setting]], ['set, ['set_hosts_setting]], ['parse, ['parse_itemlist, 'parse_host_setting]], ['format, ['format_itemlist]]]], ["maildrop", #[['get, ['get_maildrop_setting]], ['set, ['set_maildrop_setting]], ['parse, ['parse_maildrop_setting]], ['format, ['fmt_maildrop_setting]]]]]; var $root flags = ['variables, 'methods, 'code, 'core]; var $root inited = 1; var $root managed = [$smtp]; var $root manager = $smtp; +var $root trusted = [$login_interface, $user_info]; var $root trusted_by = [$outbound_connection]; -var $smtp debugging = []; +var $smtp hosts = 0; +var $smtp mail_aliases = #[["postmaster", $mail_postmaster], ["admin", $mail_admin], ["abuse", $mail_admin], ["MAILER-DAEMON", $mail_postmaster]]; var $smtp maildrop = "127.0.0.1"; var $smtp postmaster = 0; +var $smtp timeouts = #[]; var $smtp valid_email_regexp = "^[-a-z0-9_!.%+$'=]+[^.]$"; -var $smtp valid_host_regexp = "^([-a-z0-9]+\.)+(gov|edu|com|org|int|mil|net|nato|arpa|[a-z][a-z])$"; -private method ._send() { - arg conn, line, debugto; +protected method .DATA() { + arg c, body; + var lines, code, line, i; - if (debugto) - debugto.mmap('tell, "SEND: " + line); - conn.write_string(line + "\n"); + .set_timeout(c, 120); + c.write("DATA"); + lines = (> .get_response(c) <); + [code, line] = lines[1]; + if (code != 354) + throw(~error, (lines.slice(2)).join(), code); - // $#Edited: 27 Oct 96 10:12 $brian + // escape period DATA termination + while ((i = find i in (body) where (i == "."))) + body = replace(body, i, ".."); + + // send it + c.write(body + ["."]); + lines = (> .get_response(c) <); + [code, line] = lines[1]; + if (code != 250) + throw(~error, (lines.slice(2)).join(), code); +}; + +protected method .MAIL_FROM() { + arg c, address; + var lines, code, line; + + .set_timeout(c, 120); + c.write(("MAIL FROM: <" + address) + ">"); + lines = (> .get_response(c) <); + [code, line] = lines[1]; + if (code == 250) + return lines.slice(2); + throw(~error, (lines.slice(2)).join(), code); +}; + +protected method .QUIT() { + arg c; + var lines, code, line, i; + + .set_timeout(c, 120); + c.write("QUIT"); + + // get it, but ignore it + lines = (> .get_response(c) <); +}; + +protected method .RCPT_TO() { + arg c, address; + var lines, code, line; + + .set_timeout(c, 120); + c.write(("RCPT TO: <" + address) + ">"); + lines = (> .get_response(c) <); + [code, line] = lines[1]; + if ((code < 300) && (code >= 200)) + return [code, lines.slice(2)]; + throw(~error, (lines.slice(2)).join(), code); +}; + +protected method .RSET() { + arg c; + var lines, code, line, i; + + .set_timeout(c, 120); + c.write("RSET"); + + // get it, but ignore it + lines = (> .get_response(c) <); +}; + +protected method .VRFY() { + arg c, address; + var lines, code, line; + + .set_timeout(c, 120); + c.write("VRFY " + address); + lines = (> .get_response(c) <); + [code, line] = lines[1]; + if ((code < 300) && (code >= 200)) + return [code, lines.slice(2)]; + throw(~error, (lines.slice(2)).join(), code); +}; + +public method .add_mail_alias() { + arg alias, recip; + var name; + + if (type(alias) != 'string) + throw(~type, "First argument must be a string name for the alias"); + if ((type(recip) != 'objnum) || (!(recip.is($mail_list)))) + throw(~type, "Second argument is not a valid $mail_list"); + name = alias; + name = strsed(alias, "[^a-z0-9\.-]+", "", "g"); + if (name != alias) + throw(~type, "Alias may only be alphanumeric characters, or a period or dash"); + mail_aliases = dict_add(mail_aliases, alias, recip); +}; + +public method .allowed() { + arg cmd; + + return 1; +}; + +protected method .close_session() { + arg c; + + (| c.close() |); + .set_timeout(c, 0); +}; + +protected method .connect_to_smtp_host() { + arg ip, @host; + var line, c; + + if (host) + host = host[1]; + else + host = ip; + c = $outbound_connection.new(); + catch any { + c.open_connection(ip, 25); + (> .negotiate_connect(c) <); + } with { + (| c.close() |); + if (error() == ~refused) + throw(~refused, "Unable to open SMTP connection to " + host); + else + rethrow(error()); + } + return c; }; public method .connection_going_away() { arg addr, port; - return; - - // $#Edited: 25 Oct 96 23:08 $brian }; public method .connection_starting() { arg addr, port; - return; - - // $#Edited: 25 Oct 96 23:08 $brian }; root method .core_smtp(): nooverride { - postmaster = 0; - debugging = []; maildrop = "127.0.0.1"; + hosts = 0; +}; + +public method .del_mail_alias() { + arg alias; - // $#Edited: 21 Dec 96 23:55 $brian + return dict_del(mail_aliases, alias); }; -public method .errors_to_address() { - return .postmaster(); +public method .fmt_aliases_setting() { + arg data; + var a; - // $#Edited: 25 Oct 96 22:39 $brian + return map a in (data) to (((a[1]) + ":") + ((a[2]).mail_name())).join(", "); }; -public method .invalid_email_address() { - arg address; - var at, name, host; +public method .fmt_maildrop_setting() { + arg data; - if (!address) - return "no email address supplied"; - if (!(at = address.rindex("@"))) - return "not a valid email address"; - name = address.subrange(1, at - 1); - host = address.subrange(at + 1); - if ((name.match_regexp("^in%")) || (name.match_regexp("^smtp%"))) - return ("'" + name) + "' doesn't look like a valid username (try removing the 'in%' or 'smtp%')"; - if (!(host.match_regexp(valid_host_regexp))) - return ("'" + host) + "' doesn't look like a valid Internet host"; - if (!(name.match_regexp(valid_email_regexp))) - return ("'" + name) + "' doesn't look like a valid username for Internet mail"; - return ""; + return (| (($dns.hostname(data)) + "/") + data |) || data; +}; + +public method .format_email_address() { + arg recip, @notfull; + var host, mailname; - // $#Edited: 25 Oct 96 22:39 $brian + host = (| (.get_hosts_setting())[1] |); + mailname = recip.mail_name(); + if ((| .lookup_alias((recip.name()).replace(" ", "-")) |)) { + mailname = strsed(mailname, "^[*~]", ""); + } else { + mailname = strsub(recip.mail_name(), "*", "list-"); + mailname = strsub(mailname, "~", "user-"); + } + if (host) { + if (notfull) + return (mailname + "@") + host; + return ((((((recip.name()).capitalize()) + " <") + mailname) + "@") + host) + ">"; + } else { + if (notfull) + return mailname; + return ((((recip.name()).capitalize()) + " <") + mailname) + ">"; + } }; -public method .invalid_hostname() { - arg hostname; +protected method .get_aliases_setting() { + arg @args; - return (hostname.match_regexp(valid_host_regexp)) ? "" : (("'" + hostname) + "' is not a valid internet host name"); + return mail_aliases; }; -public method .maildrop() { - return maildrop || "localhost"; +public method .get_email_address() { + arg type; + var email, r, host; - // $#Edited: 25 Oct 96 22:39 $brian + if (type(type) != 'string) + type = tostr(type); + return .format_email_address((| .parse_recipient(type) |) || $mail_admin); }; -public method .parse_address() { - arg addr; +public method .get_hosts_setting() { + arg @args; + + return hosts || [$dns.hostname("")]; +}; - return [(| addr.subrange(1, (addr.rindex("@")) - 1) |) || addr, (| addr.subrange((addr.rindex("@")) + 1) |) || ""]; +public method .get_maildrop_setting() { + arg @args; - // $#Edited: 25 Oct 96 22:39 $brian + return maildrop; }; -public method .postmaster() { - return postmaster || ($sys.get_system_email('default)); +protected method .get_response() { + arg c; + var line, code, m, more, out; - // $#Edited: 25 Oct 96 22:39 $brian + if (c.is_reading_block()) + throw(~engaged, "Connection is already reading."); + more = 1; + out = []; + while (more) { + line = (c.start_reading_block('one))[1]; + if (line == 'aborted) + throw(~aborted, "Connection read aborted."); + m = regexp(line, "^([0-9]+)([- ])(.*)$"); + if (listlen(m) != 3) + throw(~invalid, "Unexpected response from server: " + line); + more = (m[2]) == "-"; + out += [[toint(m[1]), m[3]]]; + } + return out; }; -public method .raw_sendmail() { - arg recip, @body; - var x, blank, data, debugto, target, line, state, timeout; +public method .get_system_email() { + arg type; + var email, r, host; - (sender() == this()) || (> .perms(sender(), 'system) <); - if (type(debugging) == 'list) - debugto = debugging; - else - debugto = debugging && [.manager()]; - data = []; - for x in (body) { - refresh(); - if (!(blank || (x.match_regexp("[a-z0-9-]*: ")))) { - if (x) - data += [""]; - blank++; + if (type(type) != 'string) + type = tostr(type); + + // format aliases here, so .format_email_address() doesn't confuse them + if ((r = (| .lookup_alias(type) |))) { + if ((host = (| (.get_hosts_setting())[1] |))) + return (type + "@") + host; + return type; } - data += [(x == ".") ? ("." + x) : x]; + if ((r = (| .parse_recipient(type) |))) + return .format_email_address(r, 'notfull); + r = $mail_admin; + if ((host = (| (.get_hosts_setting())[1] |))) + return "admin@" + host; + return "admin"; +}; + +public method .lookup_alias() { + arg name; + + return (> mail_aliases[name] <); +}; + +public method .mail_aliases() { + return mail_aliases; +}; + +protected method .negotiate_connect() { + arg c; + var lines, code, line; + + .set_timeout(c, 120); + lines = (> .get_response(c) <); + [code, line] = lines[1]; + if (code == 421) + throw(~notavail, (lines.slice(2)).join()); + if (code != 220) + throw(~invalid, (("Unknown response from server: " + code) + " ") + line); + .set_timeout(c, 120); + c.write("HELO " + ($sys.server_info('server_hostname))); + lines = (> .get_response(c) <); + [code, line] = lines[1]; + if (code == 250) + return; + if ((code % 500) < 100) + throw(~syntax, "I'm doing something wrong: " + line); + if (code == 421) + throw(~notavail, (lines.slice(2)).join()); + throw(~invalid, (("Unknown response from server: " + code) + " ") + line); +}; + +public method .parse_alias() { + arg alias; + var tmp, obj, o; + + tmp = explode(alias, ":"); + if (listlen(tmp) != 2) + throw(~type, ("Invalid alias pair '" + alias) + "', should be ALIAS:OBJ"); + [alias, obj] = tmp; + tmp = strsed(alias, "[^a-z0-9\.-]+", "", "g"); + if (tmp != alias) + throw(~type, "Alias must be composed of a-z, 0-9, a period or a dash"); + if (obj && ((obj[1]) == "$")) { + if (!(o = (| $object_lib.to_dbref(obj) |))) + throw(~type, "Invalid object: " + obj); + } else if (!(o = (| $mail_lib.match_mail_recipient(obj) |))) { + throw(~type, "Invalid mail recipient: " + obj); } - pause(); - target = $outbound_connection.new(); - catch any { - target.open_connection(.maildrop(), 25); - } with { - line = "Cannot open connection to maildrop: " + ((traceback()[1])[2]); - (| target.close() |); - throw(~mailerr, line); + if (!(o.is($mail_list))) + throw(~type, ("Object " + o) + " is not a valid mail recipient."); + return [alias, o]; +}; + +public method .parse_alias_setting() { + arg value, action, @args; + var a; + + if (action == 'del) { + value = explode(value, ":")[1]; + a = strsed(value, "[^a-z0-9\.-]+", "", "g"); + if (a != value) + throw(~type, "Alias must be composed of a-z, 0-9, a period or a dash"); + if (!dict_contains(mail_aliases, value)) + throw(~failed, ("The alias '" + value) + "' is not set, and thus cannot be removed"); + return value; + } else { + return (> .parse_alias(value) <); } - timeout = $scheduler.add_task(120, 'timeout, target); - state = 'connect; - catch any { - while (type((| (x = target.start_reading_block('one)) |)) == 'list) { - x = x[1]; - if (debugto) - debugto.mmap('tell, "GET: " + x); - if (x && (!((x[1]) in "23"))) { - target.close(); - (| $scheduler.del_task(timeout) |); - return x; - } else if (x && ((x[4]) == "-")) { - continue; - } - switch (state) { - case 'connect: - ._send(target, "HELO " + ($sys.server_info('server_hostname)), debugto); - state = 'from; - case 'from: - ._send(target, ("MAIL FROM: <" + (.postmaster())) + ">", debugto); - state = 'rcpt; - case 'rcpt: - ._send(target, ("RCPT TO:<" + recip) + ">", debugto); - state = 'data; - case 'data: - ._send(target, "DATA", debugto); - state = 'send_data; - case 'send_data: - for line in (data) - ._send(target, line, debugto); - ._send(target, ".", debugto); - state = 'quit; - case 'quit: - ._send(target, "QUIT", debugto); - break; +}; + +public method .parse_email_address() { + arg address, @lookup; + var name, host, ip, h; + + if (!address) + throw(~invemail, "No email address supplied."); + address = explode(address, "@"); + if (listlen(address) != 2) + throw(~invemail, ("\"" + (address.join("@"))) + "\" is not a valid email address."); + [name, host] = address; + if (!match_regexp(name, valid_email_regexp)) + throw(~invemail, ("'" + name) + "' is not a valid Internet mail username"); + if (lookup) { + ip = $dns.ip(host); + if ((!ip) || (ip == "-1")) + throw(~invemail, ("'" + host) + "' does not resolv to an IP address"); + h = $dns.hostname(ip); + if (!($dns.valid_hostname(h))) + throw(~invemail, (("Invalid DNS entry for: " + host) + "/") + ip); + host = h; + } else if (!($dns.valid_hostname(host))) { + throw(~invemail, ("Invalid hostname \"" + host) + "\""); } + return [name, host, ip]; +}; + +public method .parse_host_setting() { + arg value, action, @args; + + if (action == 'del) { + if (!(value in hosts)) + throw(~failed, ("The host '" + value) + "' is not set, and thus cannot be removed"); + return value; + } else { + (> $dns.ip(value) <); + return lowercase(value); } - (| target.close() |); - return 0; +}; + +public method .parse_maildrop_setting() { + arg value, @args; + var ip; + + ip = explode(ip, "/")[1]; + ip = (| $dns.ip(value) |) || ip; + catch any { + $dns.hostname(ip); } with { - (| target.close() |); - (| $scheduler.del_task(timeout) |); + if (error() == ~invip) rethrow(error()); } - (| $scheduler.del_task(timeout) |); - - // $#Edited: 25 Oct 96 22:39 $brian + return ip; }; -public method .return_address() { - return .postmaster(); +public method .parse_recipient() { + arg user; + var x, host; + + if (((user[1]) == "<") && ((user[user.length()]) == ">")) + user = user.subrange(2, (user.length()) - 2); + if ("@" in user) { + [user, host] = explode(user, "@"); + if (!(host in ($smtp.get_hosts_setting()))) + throw(~perm, "Unwilling to accept or relay mail for: " + host, 571); + } + user = user.trim(); + user = strsed(user, "^list-", "*"); + user = strsed(user, "^user-", "~"); + return (| $smtp.lookup_alias(user) |) || (> $mail_lib.match_mail_recipient(user) <); +}; - // $#Edited: 25 Oct 96 22:39 $brian +public method .remove_aliases() { + var x; + + (> .perms(caller(), $mail_list) <); + for x in (mail_aliases) { + if ((x[2]) == sender()) + mail_aliases = dict_del(mail_aliases, x[1]); + } }; public method .sendmail() { - arg recip, subj, @lines; - var mailagent, reason; + arg from, recip, subj, @body; + var mailagent, header, c; (> .perms(sender(), 'trusts) <); mailagent = ((((($motd.server_name()) + " (") + ($sys.server_info('server_hostname))) + ":") + ($login_daemon.current_port())) + ")"; - if ((reason = .invalid_email_address(recip))) - throw(~invemail, reason); - return .raw_sendmail(recip, "Date: " + ($time.format("%a, %e %b %Y %T %Z")), "From: " + (.return_address()), "To: " + recip, "Subject: " + subj, "Errors-to: " + (.errors_to_address()), "X-Mail-Agent: " + mailagent, @lines); + (> .parse_email_address(recip) <); + if (!from) + from = 'postmaster; + if (type(from) == 'symbol) + from = .get_email_address(from); + header = ["Date: " + ($time.format("%a, %d %b %Y %T %Z")), "From: " + from, "To: " + recip, "Subject: " + subj, "Errors-to: " + (.get_email_address('postmaster)), "X-Mail-Agent: " + mailagent]; + + // connect to maildrop + c = (> .connect_to_smtp_host(maildrop) <); + + // send it off + catch any { + (> .MAIL_FROM(c, from) <); + (> .RCPT_TO(c, recip) <); + (> .DATA(c, (header + [""]) + body) <); + (> .QUIT(c) <); + .close_session(c); + } with { + .close_session(c); + rethrow(error()); + } +}; - // $#Edited: 25 Oct 96 22:39 $brian +protected method .set_aliases_setting() { + arg name, definer, value; + + switch (value[1]) { + case 'set: + mail_aliases = value[2]; + case 'add: + mail_aliases = dict_add(mail_aliases, @value[2]); + case 'del: + mail_aliases = dict_del(mail_aliases, value[2]); + default: + throw(~type, "Unknown action: " + (value[1])); + } +}; + +protected method .set_hosts_setting() { + arg name, definer, value; + + switch (value[1]) { + case 'set: + hosts = value[2]; + case 'add: + hosts = setadd(hosts, value[2]); + case 'del: + hosts = setremove(hosts, value[2]); + default: + throw(~type, "Unknown action: " + (value[1])); + } +}; + +public method .set_maildrop_setting() { + arg name, definer, value; + + maildrop = value; +}; + +protected method .set_timeout() { + arg c, timeout; + var task; + + task = (| timeouts[task_id()] |); + if (task) + (| $scheduler.del_task(task) |); + if (timeout) { + task = $scheduler.add_task(timeout, 'timeout, [c]); + timeouts = dict_add(timeouts || #[], task_id(), task); + } else if (dict_contains(timeouts || #[], task_id())) { + timeouts = dict_del(timeouts, task_id()); + } }; protected method .timeout() { arg conn; (| conn.close() |); +}; - // $#Edited: 27 Oct 96 11:02 $brian +public method .verify_email_address() { + arg address; + var c, lines, code, email, name, m; + + if (!(| .perms(caller(), 'trusts) |)) + (> .perms(sender(), 'trusts) <); + + // connect + address = (> .parse_email_address(address, 'resolv_host) <); + c = (> .connect_to_smtp_host(address[3], address[2]) <); + + // VRFY enabled? + catch ~error { + [code, lines] = (> .VRFY(c, address[1]) <); + if (code == 250) { + .QUIT(c); + .close_session(c); + + // munch on it a little + if ((m = regexp(lines[1], "^([^<]+)<([^>]+)>"))) { + [name, email] = m; + } else if ((m = regexp(lines[1], "<([^>]+)>"))) { + email = m[1]; + name = strsed(lines[1], " *<[^>]+> *", ""); + } else { + [email, (name ?= "")] = lines; + } + return [email.trim(), name.trim()]; + } + } + + // nope, try RCPT.. + catch any { + (> .MAIL_FROM(c, $smtp.get_email_address('postmaster)) <); + [code, lines] = (> .RCPT_TO(c, address[1]) <); + .QUIT(c); + .close_session(c); + if ((m = regexp(lines[1], "<([^>]+)>"))) + email = m[1]; + else + email = lines[1]; + return [email.trim()]; + } with { + .QUIT(c); + .close_session(c); + rethrow(error()); + } }; diff -rwu src-3.0a7/smtp_connection.cdc ColdCore-3.0a9.02/src/smtp_connection.cdc --- src-3.0a7/smtp_connection.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/smtp_connection.cdc Tue Aug 19 12:15:36 1997 @@ -1,5 +1,5 @@ -new object $smtp_connection: $connection; +new object $smtp_connection: $inbound_connection; var $connection buffer = `[]; var $connection interface = $smtp_interface; diff -rwu src-3.0a7/smtp_daemon.cdc ColdCore-3.0a9.02/src/smtp_daemon.cdc --- src-3.0a7/smtp_daemon.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/smtp_daemon.cdc Tue Aug 19 12:15:36 1997 @@ -3,19 +3,17 @@ var $daemon connection = $smtp_connection; var $daemon current_port = 1125; -var $daemon default_port = 1125; +var $daemon listen = [[1125]]; var $root created_on = 849170427; var $root flags = ['variables, 'methods, 'code, 'core]; var $root inited = 1; var $root managed = [$smtp_daemon]; var $root manager = $smtp_daemon; -var $smtp_daemon msg_id = 19; +var $smtp_daemon msg_id = 64; public method .get_msg_id() { msg_id++; return msg_id; - - // $#Edited: 30 Nov 96 03:43 $brad }; diff -rwu src-3.0a7/smtp_interface.cdc ColdCore-3.0a9.02/src/smtp_interface.cdc --- src-3.0a7/smtp_interface.cdc Sat Aug 9 19:09:31 1997 +++ ColdCore-3.0a9.02/src/smtp_interface.cdc Tue Aug 19 12:15:21 1997 @@ -15,18 +14,17 @@ var $smtp_interface cmd_help = #[["HELP", ["HELP [<topic>]", " For more help on any command type 'help <cmd>'"]], ["QUIT", ["QUIT", " Ends your mail session"]], ["EXPN", ["EXPN <recipient>", " Expand an address."]], ["VRFY", ["VRFY <recipient>", " Verify an address."]], ["HELO", ["HELO <hostname>", " Introduce yourself."]], ["MAIL", ["MAIL FROM: <sender>", " Specify sender/return path."]], ["NOOP", ["NOOP", " Do nothing"]], ["RCPT", ["RCPT TO:<recipient>", " Specifies the recipient. Can be used any number of times."]], ["DATA", ["DATA", " Following data is collected as the message", " End with a single dot"]]]; var $smtp_interface cmds = #[["HELP", 'help_cmd], ["QUIT", 'quit_cmd], ["VRFY", 'verify_cmd], ["EXPN", 'verify_cmd], ["HELO", 'hello_cmd], ["MAIL", 'mail_from_cmd], ["NOOP", 'noop_cmd], ["RCPT", 'recipient_cmd], ["DATA", 'data_cmd]]; var $smtp_interface given_hostname = ""; +var $smtp_interface header = 0; var $smtp_interface mail_body = 0; var $smtp_interface mail_from = 0; var $smtp_interface mail_status = 0; var $smtp_interface mail_to = 0; +var $smtp_interface read_header = 0; public method .connection_starting() { arg addr, port; - $brad.debug("New SMTP connection"); - (.connection()).write((("220 " + ($sys.server_info('server_hostname))) + " SMTP ColdMail 0.01/0.01; ") + ($time.format("%a, %e %b %Y %T %Z"))); - - // $#Edited: 29 Nov 96 13:34 $brad + (.connection()).write((("220 " + ($sys.server_info('server_hostname))) + " SMTP ColdMail 1.0/1.0; ") + ($time.format("%a, %d %b %Y %T %Z"))); }; public method .data_cmd() { @@ -42,30 +40,22 @@ conn.write("354 Enter mail, end with \".\" on a line by itself"); mail_status = 'read_body; } - - // $#Edited: 30 Nov 96 03:54 $brad }; public method .get_cmd() { arg cmd; return (> cmds[cmd] <); - - // $#Edited: 28 Nov 96 14:29 $brad }; public method .get_cmd_help() { arg help; return (> cmd_help[help] <); - - // $#Edited: 28 Nov 96 14:32 $brad }; public method .get_cmds() { return cmds.keys(); - - // $#Edited: 28 Nov 96 14:37 $brad }; public method .hello_cmd() { @@ -81,8 +71,6 @@ } else { conn.write("503 portland.puremagic.com Duplicate HELO"); } - - // $#Edited: 29 Nov 96 15:54 $brad }; public method .help_cmd() { @@ -105,17 +93,11 @@ conn.write(("504 HELP topic '" + rest) + "' not found."); } } - - // $#Edited: 29 Nov 96 15:48 $brad }; public method .init_smtp_interface() { - mail_from = ""; - mail_to = []; - mail_body = []; + .reset_interface(); mail_status = 'idle; - - // $#Edited: 30 Nov 96 03:35 $brad }; public method .mail_from_cmd() { @@ -128,33 +110,38 @@ } else if (mail_from != "") { conn.write("503 Sender already specified"); } else { + .reset_interface(); mail_from = (rest.subrange(6)).trim(); - mail_to = []; - mail_body = []; conn.write(("250 " + mail_from) + "... sender ok"); } - - // $#Edited: 30 Nov 96 03:01 $brad }; public method .noop_cmd() { arg rest; (.connection()).write("250 Ok"); - - // $#Edited: 30 Nov 96 00:00 $brad }; public method .parse_line() { arg line; - var method, cmd, args; + var method, cmd, args, name, rest, m, last; - $brad.debug(line); if (mail_status == 'read_body) { if (line == ".") { return .send_mail(); } else { + if (read_header) { mail_body += [line]; + } else if (!line) { + read_header = 1; + } else if ((m = regexp(line, "^([^ ][^:]+) *: *(.*)$"))) { + header += [m]; + } else if (header) { + last = header[listlen(header)]; + header = sublist(header, 1, listlen(header)); + last = replace(last, 2, (last[2]) + line); + header += [last]; + } return; } } @@ -170,19 +157,6 @@ return 'disconenct; } return .(method)(args); - - // $#Edited: 30 Nov 96 03:53 $brad - // $#Edited: 30 Nov 96 21:22 $miro -}; - -public method .parse_user() { - arg user; - - if (((user[1]) == "<") && ((user[user.length()]) == ">")) - user = user.subrange(2, (user.length()) - 2); - return (> $mail_lib.match_mail_recipient(user.trim()) <); - - // $#Edited: 30 Nov 96 03:14 $brad }; public method .quit_cmd() { @@ -190,8 +164,6 @@ (.connection()).write(("221 " + ($sys.server_info('server_hostname))) + " closing connection"); return 'disconnect; - - // $#Edited: 29 Nov 96 15:44 $brad }; public method .recipient_cmd() { @@ -204,52 +176,57 @@ } else if (((rest.length()) <= 3) || (((i = ":" in rest) != 3) || ((| rest.subrange(1, 3) |) != "to:"))) { conn.write(("501 Syntax error in \"" + (rest.subrange(1, (i == 0) ? (rest.length()) : (i - 1)))) + "\""); } else { - catch ~ambig, ~listnf { - user = .parse_user(rest.subrange(4)); + catch any { + user = $smtp.parse_recipient(rest.subrange(4)); mail_to += [user]; conn.write(("250 " + user) + "... recipient ok"); } with { - if (error() == ~listnf) - conn.write("550 User unknown"); + if (error() == ~ambig) + conn.write("553 Ambiguous Recipient"); else - conn.write("553 User ambiguous"); + conn.write(((((traceback()[1])[3]) || 550) + " ") + ((traceback()[1])[2])); } } +}; - // $#Edited: 30 Nov 96 03:14 $brad - // $#Edited: 30 Nov 96 21:22 $miro +public method .reset_interface() { + header = []; + read_header = 0; + mail_from = ""; + mail_to = []; + mail_body = []; }; public method .send_mail() { - var mail; + var mail, l, subj; .set_name(mail_from, 'prop); mail = $mail_message.new_mail(); - mail.set_subject("internet mail"); + subj = "<NO SUBJECT>"; + for l in (header) { + if ((l[1]) == "Subject") + subj = l[2]; + } + mail.set_subject(subj); mail.set_text(mail_body); catch any { + mail.set_meta(header); mail.send(@mail_to); mail.set_from(mail_from); (.connection()).write(("250 " + ($smtp_daemon.get_msg_id())) + " Message accepted for delivery"); } with { (.connection()).write("550 Requested action not taken: Error delivering mail"); - $brad.debug(traceback()); } - mail_status = 'idle; - mail_from = ""; - mail_to = []; - mail_body = []; - - // $#Edited: 30 Nov 96 04:46 $brad + .reset_interface(); }; public method .uninit_smtp_interface() { + header = 0; + read_header = 0; mail_from = 0; mail_to = 0; mail_body = 0; mail_status = 0; - - // $#Edited: 30 Nov 96 03:35 $brad }; public method .verify_cmd() { @@ -260,27 +237,29 @@ if ((rest.length()) == 0) { conn.write("501 Argument required"); } else { + if (!($smtp.allowed('VRFY))) { + conn.write("252 VRFY not allowed"); + return; + } out = []; for i in (rest.explode()) { - catch ~ambig, ~listnf { - user = .parse_user(i); - out += [user.name()]; + catch any { + out = setadd(out, $smtp.parse_recipient(i)); } with { switch (error()) { case ~ambig: - conn.write(("553 " + i) + "... user ambiguous"); + conn.write("553 Ambiguous Recipient"); default: - conn.write(("550 " + i) + "... user unknown"); + conn.write(((((traceback()[1])[3]) || 550) + " ") + ((traceback()[1])[2])); return; } } } - for i in [1 .. out.length()] - conn.write((((((((i == (out.length())) ? "250 " : "250-") + (out[i])) + " <") + (out[i])) + "%cold@") + ($sys.server_info('server_hostname))) + ">"); + for i in [1 .. (out.length()) - 1] + conn.write("250-" + ($smtp.format_email_address(out[i]))); + if (out) + conn.write("250 " + ($smtp.format_email_address(out.last()))); } - - // $#Edited: 30 Nov 96 02:59 $brad - // $#Edited: 30 Nov 96 21:22 $miro }; diff -rwu src-3.0a7/social.cdc ColdCore-3.0a9.02/src/social.cdc --- src-3.0a7/social.cdc Sat Aug 9 19:09:48 1997 +++ ColdCore-3.0a9.02/src/social.cdc Tue Aug 19 12:15:19 1997 @@ -10,7 +10,6 @@ var $root inited = 1; var $root managed = [$social]; var $root manager = $social; -var $root owned = [$social]; var $user_interfaces links = 1; protected method .social_cmd() { @@ -27,10 +26,6 @@ } } (.location()).announce(.eval_message(cmd, vars)); - - // $#Edited: 24 Jul 96 20:33 $jenner - // $#Edited: 26 Jul 96 16:03 $jenner - // $#Edited: 13 Nov 96 00:21 $levi }; diff -rwu src-3.0a7/storyteller.cdc ColdCore-3.0a9.02/src/storyteller.cdc --- src-3.0a7/storyteller.cdc Sat Aug 9 19:09:30 1997 +++ ColdCore-3.0a9.02/src/storyteller.cdc Tue Aug 19 12:15:19 1997 @@ -1,33 +1,18 @@ -new object $storyteller: $player; +new object $storyteller: $builder; var $has_commands local = #[]; var $has_commands remote = #[]; var $has_commands shortcuts = #[]; var $located location = $body_cave; *var $location contents = ' ' storyteller.cdc -var $player agility = [0, 0]; -var $player appearance = [0, 0]; -var $player backbone = [0, 0]; -var $player charisma = [0, 0]; -var $player health = [0, 0]; -var $player humanity = [0, 0]; -var $player intellect = [0, 0]; -var $player knowledge = [0, 0]; -var $player life = [0, 0]; -var $player perception = [0, 0]; -var $player presence = [0, 0]; -var $player source = [0, 0]; -var $player strength = [0, 0]; -var $player weapons = []; var $root created_on = 809928922; var $root flags = ['methods, 'code, 'variables, 'core]; var $root inited = 1; var $root managed = [$storyteller]; var $root manager = $storyteller; -var $root owned = [$storyteller]; var $thing gender = 0; -var $user formatter = $mail_list; +var $user formatter = $plain_format; var $user password = "*"; var $user task_connections = #[]; diff -rwu src-3.0a7/string.cdc ColdCore-3.0a9.02/src/string.cdc --- src-3.0a7/string.cdc Sat Aug 9 19:09:29 1997 +++ ColdCore-3.0a9.02/src/string.cdc Tue Aug 19 12:15:16 1997 @@ -6,7 +6,6 @@ var $root inited = 1; var $root managed = [$string]; var $root manager = $string; -var $root owned = [$string]; var $string alphabet = "abcdefghijklmnopqrstuvwxyz"; var $string base64str = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; var $string non_alphanumeric = "!@#$%^&*()_+-=~`'{}[]|/?\",.<>;: "; @@ -87,10 +86,6 @@ out_buf = out_buf + `[(((ints[1]).shleft(2)) % 256) + ((ints[2]).shright(4)), (((ints[2]).shleft(4)) % 256) + ((ints[3]).shright(2)), (((ints[3]).shleft(6)) % 256) + (ints[4])]; } return out_buf.to_string(); - - // $#Edited: 08 Dec 96 02:12 $user_dizzledorf - // $#Edited: 08 Dec 96 02:13 $user_dizzledorf - // $#Edited: 17 Dec 96 13:43 $brad }; public method .explode(): native; @@ -274,6 +269,28 @@ public method .format(): native; +public method .global_regexp() { + arg string, regexp; + var result, location, left, begin_match, end_match; + + result = []; + left = string; + while (left) { + if ((location = match_regexp(left, regexp))) { + [begin_match, end_match] = location[1]; + result += [(begin_match == 1) ? "" : (left.subrange(1, begin_match - 1))]; + result += [left.subrange(begin_match, end_match)]; + left = left.subrange(begin_match + end_match); + } else { + result += [left]; + left = ""; + } + } + if (!((result.length()) % 2)) + result += [""]; + return result; +}; + public method .html_escape(): native; public method .is_boolean() { @@ -334,8 +351,6 @@ arg str; return str[random(strlen(str))]; - - // $#Edited: 19 Feb 97 11:22 $brandon }; public method .rangeset() { @@ -349,6 +364,13 @@ public method .replace(): native; +public method .rformat() { + arg first, second, @rest; + + // so you can mmap a list of strings through strfmt + return strfmt(second, first, @rest); +}; + public method .right() { arg str, width, @fchar; @@ -391,6 +413,30 @@ arg string; return (> str_to_buf(string) <); +}; + +public method .to_bytes() { + arg str; + var words, num; + + words = str.explode(); + if (listlen(words) == 1) { + if (!(words = regexp(words[1], "^([0-9]+)(.*)$"))) + throw(~type, "Invalid size."); + } + num = (> (words[1]).to_number() <); + switch (words[2]) { + case "b", "byte", "bytes": + return num; + case "k", "kb", "kbytes", "kilobytes": + return num * 1024; + case "m", "mb", "mbytes", "megabytes": + return (num * 1024) * 1024; + case "g", "gb", "gbytes", "gigabytes": + return ((num * 1024) * 1024) * 1024; + default: + throw(~type, "Invalid byte size: " + (words[2])); + } }; public method .to_html() { diff -rwu src-3.0a7/symbol.cdc ColdCore-3.0a9.02/src/symbol.cdc --- src-3.0a7/symbol.cdc Sat Aug 9 19:09:47 1997 +++ ColdCore-3.0a9.02/src/symbol.cdc Tue Aug 19 12:15:37 1997 @@ -6,7 +6,6 @@ var $root inited = 1; var $root managed = [$symbol]; var $root manager = $symbol; -var $root owned = [$symbol]; public method .to_string() { arg sym; diff -rwu src-3.0a7/sys.cdc ColdCore-3.0a9.02/src/sys.cdc --- src-3.0a7/sys.cdc Mon Aug 18 11:42:49 1997 +++ ColdCore-3.0a9.02/src/sys.cdc Tue Aug 19 12:15:16 1997 @@ -2,26 +2,26 @@ object $sys: $root; var $root created_on = 796268969; +var $root defined_settings = #[["loggers", #[['get, ['loggers]], ['set, ['set_loggers]], ['parse, ['parse_itemlist, 'parse_object]], ['format, ['format_itemlist]]]], ["deny-hosts", #[['get, ['deny_hosts]], ['set, ['set_deny_hosts]], ['parse, ['parse_itemlist, 'parse_deny_host]], ['format, ['format_itemlist]]]], ["deny-users", #[['get, ['deny_users]], ['set, ['set_deny_users]], ['parse, ['parse_itemlist, 'parse_deny_user]], ['format, ['format_itemlist]]]], ["backup-interval", #[['get, ['get_backup_interval]], ['set, ['set_backup_interval]], ['parse, ['parse_backup_interval]], ['format, ['fmt_backup_interval]]]], ["validate-email-addresses", #[['parse, ['is_boolean]], ['format, ['format_boolean]], ['get, ['validate_email_addresses]], ['set, ['set_validate_email_addresses]]]], ["initial-quota", #[['get, ['get_initial_quota]], ['set, ['set_initial_quota]], ['parse, ['parse_initial_quota]], ['format, ['fmt_initial_quota]]]], ["new-user-class", #[['get, ['get_new_user_class]], ['set, ['set_new_user_class]], ['parse, ['parse_new_user_class]], ['format, ['format_object]]]], ["anonymous-user-class", #[['get, ['get_anon_user_class]], ['set, ['set_anon_user_class]], ['parse, ['parse_anon_user_class]], ['format, ['format_object]]]], ["startup-objects", #[['get, ['get_startup_objects]], ['set, ['set_startup_objects]], ['parse, ['parse_itemlist, 'parse_startup_object]], ['format, ['format_itemlist]]]], ["writable-core", #[['get, ['writable_core]], ['set, ['set_writable_core]], ['parse, ['is_boolean]], ['format, ['format_boolean]]]]]; var $root flags = ['methods, 'code, 'core, 'variables]; var $root inited = 1; var $root managed = [$sys]; var $root manager = $sys; -var $root owned = [$sys]; var $root quota_exempt = 1; *var $sys admins = '-' sys.cdc DEFAULT [$user_brandon] +var $sys admins = []; *var $sys agents = ' ' sys.cdc DEFAULT [$root, $daemon] *var $sys backup = '-' sys.cdc DEFAULT #[['interval, 3600], ['last, 859064901], ['next, 871158538], ['started, 859064901]] +var $sys backup = #[['interval, 3600], ['last, 0], ['next, 0]]; *var $sys bindings = ' ' sys.cdc DEFAULT #[['atomic, $sys], ['create, $sys], ['backup, $sys], ['shutdown, $sys], ['set_heartbeat, $sys], ['cancel, $scheduler], ['task_info, $scheduler], ['execute, $sys], ['bind_function, $sys], ['unbind_function, $sys], ['bind_port, $daemon], ['unbind_port, $daemon], ['open_connection, $connection], ['reassign_connection, $daemon], ['fopen, $file], ['fstat, $file], ['fchmod, $file], ['fmkdir, $file], ['frmdir, $file], ['files, $file], ['fremove, $file], ['frename, $file], ['fclose, $file], ['fseek, $file], ['feof, $file], ['fwrite, $file], ['fread, $file], ['fflush, $file], ['chparents, $root], ['destroy, $root], ['dblog, $sys], ['add_var, $root], ['del_var, $root], ['variables, $root], ['list_method, $root], ['add_method, $root], ['del_method, $root], ['method_bytecode, $root], ['methods, $root], ['rename_method, $root], ['set_method_access, $root], ['set_method_flags, $root], ['data, $root], ['del_objname, $root], ['set_objname, $root], ['suspend, $scheduler], ['resume, $scheduler], ['set_user, $user], ['config, $sys]] *var $sys blacklist = '-' sys.cdc DEFAULT [] -var $sys core_version = "3.0a7"; -var $sys loggers = [$http_interface, $daemon, $user, $connection]; *var $sys server_address = '-' sys.cdc DEFAULT ["129.123.4.76", "ice.cold.org"] *var $sys starting = '-' sys.cdc DEFAULT #[['quota, 75000], ['new_user_class, $admin], ['anonymous_user_class, $guest]] *var $sys startup = '-' sys.cdc DEFAULT #[['objects, [$login_daemon, $lag_watcher, $http_daemon, $smtp_daemon, $world]], ['heartbeat_interval, 2]] +var $sys core_version = "3.0a9.02"; +var $sys deny_hosts = []; +var $sys deny_users = []; +var $sys loggers = [$daemon, $user, $connection, $dns]; +var $sys starting = #[['quota, 76800], ['new_user_class, $admin], ['anonymous_user_class, $guest]]; +var $sys startup = #[['objects, [$login_daemon, $http_daemon, $smtp_daemon, $world, $dns, $lag_watcher]], ['heartbeat_interval, 2]]; *var $sys system = ' ' sys.cdc DEFAULT [$sys, $root] *var $sys system_email_addresses = '-' sys.cdc DEFAULT #[['default, "nobody@need.to.set.this.address"]] *var $sys touched = '-' sys.cdc DEFAULT 871154974 *var $sys validate_email_addresses = '-' sys.cdc DEFAULT 1 +var $sys touched = 0; +var $sys validate_email_addresses = 0; +var $sys writable_core = 0; private method ._loop_for_core() { arg code; @@ -38,36 +38,14 @@ public method ._status(): native; public method .add_method() { - arg code, name; + arg code, name, @evalonly; var line; (> .perms(sender()) <); - line = ("SYSTEM: ." + tostr(name)) + "() MODIFIED"; + line = (("SYSTEM: ." + tostr(name)) + "() ") + (evalonly ? "EVAL" : "MODIFIED"); line = (line + " by ") + (sender().namef('ref)); .log(line); - return (> pass(code, name) <); -}; - -public method .add_system_email() { - arg key, email; - - (> .perms(sender(), 'manager) <); - if (type(key) != 'symbol) - throw(~type, "Key is not a symbol."); - if (type(email) != 'string) - throw(~type, "Email address is not a string."); - system_email_addresses = system_email_addresses.add(key, email); -}; - -public method .add_to_blacklist() { - arg domain, duration; - - (> .perms(sender(), 'system) <); - blacklist = blacklist.setadd(domain); - if (duration > 0) - $scheduler.add_task(duration, 'del_from_blacklist, domain); - - // $#Edited: 30 Sep 96 10:30 $brandon + return (> pass(code, name, @evalonly) <); }; public method .add_to_system() { @@ -93,8 +71,6 @@ (> .perms(sender(), 'system) <); return (> atomic(@args) <); - - // $#Edited: 26 Sep 96 11:56 $brandon }; public method .backup() { @@ -115,23 +91,6 @@ } }; -public method .blacklist() { - return blacklist; - - // $#Edited: 30 Sep 96 10:30 $brandon -}; - -public method .blacklisted() { - arg remote; - var t; - - for t in (blacklist) { - if (match_pattern(remote, t)) - return 1; - } - return 0; -}; - private method .clean_database() { var obj, p, c, cmd, other; @@ -184,8 +143,16 @@ }; root method .core_sys(): nooverride { - starting = dict_add(starting, 'new_user_class, $admin); - system_email_addresses = #[['default, "nobody@need.to.set.this.address"]]; + deny_hosts = (deny_users = []); + touched = 0; + system = [$sys, $root]; + backup = #[['interval, 3600], ['last, 0], ['next, 0]]; + validate_email_addresses = 0; + starting = #[['quota, 76800], ['new_user_class, $admin], ['anonymous_user_class, $guest]]; + startup = #[['objects, [$login_daemon, $http_daemon, $smtp_daemon, $world, $dns, $lag_watcher]], ['heartbeat_interval, 2]]; + agents = [$root, $daemon]; + admins = []; + writable_core = 0; }; private method .create() { @@ -227,15 +194,6 @@ return user; }; -public method .del_from_blacklist() { - arg domain; - - (> .perms(sender(), 'system) <); - blacklist = blacklist.setremove(domain); - - // $#Edited: 30 Sep 96 10:30 $brandon -}; - public method .del_from_system() { arg obj; @@ -246,11 +204,16 @@ system = system.setremove(obj); }; -public method .del_system_email() { - arg key; +public method .deny_hosts() { + arg @args; + + return deny_hosts; +}; + +public method .deny_users() { + arg @args; - (> .perms(sender(), 'manager) <); - system_email_addresses = system_email_addresses.del(key); + return deny_users; }; public method .destroy_sender() { @@ -337,6 +300,7 @@ private method .finish_core() { // cleanup heartbeat + set_heartbeat(0); .add_method(TMP_HEARTBEAT_CODE, 'heartbeat); .del_var('TMP_HEARTBEAT_CODE); @@ -353,6 +317,42 @@ } }; +public method .fmt_backup_interval() { + arg data; + + return $time.to_english(data); +}; + +public method .fmt_initial_quota() { + arg data; + + return data.to_bytes(); +}; + +public method .get_anon_user_class() { + arg @args; + + return starting['anonymous_user_class]; +}; + +public method .get_backup_interval() { + arg @args; + + return backup['interval]; +}; + +public method .get_initial_quota() { + arg @args; + + return starting['quota]; +}; + +public method .get_new_user_class() { + arg @args; + + return starting['new_user_class]; +}; + public method .get_starting() { arg what; @@ -365,15 +365,10 @@ return startup[what]; }; -public method .get_system_email() { - arg what; - var email; - - // email directory for system services, such as arch admins. - email = (| system_email_addresses[what] |) || ((| system_email_addresses['default] |) || "<no email set>"); - return email; +public method .get_startup_objects() { + arg @args; - // $#Edited: 30 Nov 96 20:00 $miro + return startup['objects]; }; driver method .heartbeat() { @@ -384,6 +379,17 @@ .do_backup(this(), 'interval); }; +public method .host_denied() { + arg remote; + var t; + + for t in (deny_hosts) { + if (match_begin(remote, t) != 0) + return 1; + } + return 0; +}; + private method .init_database() { var obj, p, c, cmd, other; @@ -442,6 +448,8 @@ }; public method .loggers() { + arg @args; + return loggers; }; @@ -451,22 +459,55 @@ // core rooms should be +core, and cant be destroyed // traverse the list inverseley, less unseen heirarchial shuffling + dblog("** Starting Core Extraction " + ctime()); d = $root.descendants(); top = listlen(d); core_version = ver; - dblog(("** " + top) + " objects, destroying all non-core objects..."); + dblog(("** " + top) + " objects total, tidying up core objects..."); + + // tidy up core objects first + for obj in (d) { + refresh(); + if (obj.has_flag('core)) { + tmp++; catch any { - for x in [1 .. top] { - obj = d[(top - x) + 1]; - (| obj.destroy() |); - if (valid(obj)) { obj.change_manager(obj); for o in (obj.writers('literal)) { - obj.del_writer(o); refresh(); + obj.del_writer(o); + } + } with { + dblog(("** TIDY " + obj) + " traceback: "); + for o in ($parse_lib.traceback(traceback())) + dblog("** " + o); + } } } + + // nuke anything not core + dblog(("** " + tmp) + " core objects, destroying non-core objects..."); + for x in [1 .. top] { refresh(); + obj = d[(top - x) + 1]; + if (!valid(obj)) { + // dblog(".. Skipping invalid object " + obj); + continue; + } + if (!(obj.has_flag('core))) { + if (obj.children()) { + dblog("** ABORTING: A NON CORE OBJECT HAS CORE CHILDREN: "); + dblog((("** " + obj) + " => ") + (obj.children())); + shutdown(); + } + catch any { + // dblog(".. Destroying " + obj); + obj.destroy(); + } with { + dblog(("** " + obj) + ".destroy() traceback: "); + for o in ($parse_lib.traceback(traceback())) + dblog("** " + o); + } + } } // shutdown this task so that references can have @@ -474,11 +515,9 @@ dblog("** done, suspending for new task **"); // do this the hard way, to be secure + set_heartbeat(1); .add_var('TMP_HEARTBEAT_CODE, .list_method('heartbeat)); .add_method([".finish_core();"], 'heartbeat); - } with { - dblog("traceback: " + traceback()); - } }; public method .new_admin() { @@ -496,6 +535,88 @@ system = setremove(system, sender()); }; +public method .parse_anon_user_class() { + arg value, @args; + + value = (> $object_lib.to_dbref(value) <); + if (!(value.is($user))) + throw(~perm, (value.namef('ref)) + " is not a $user object."); + if (!(value.has_flag('command_cache))) + throw(~perm, (value.namef('ref)) + " is not a command cache object."); + return value; +}; + +public method .parse_backup_interval() { + arg value, @args; + + value = (> $time.from_english(value) <); + if (value < 300) + throw(~perm, "You cannot set your backup interval to less than 5 minutes"); + return value; +}; + +public method .parse_deny_host() { + arg value, @args; + var parts; + + // DNS Hostnames are not used due to the extreme slowdown it would + // cause to _ALL_ services + if (match_regexp(value, "[^0-9.]")) + throw(~type, "Invalid Internet Host IP address or subnet: " + value); + parts = explode(value, "."); + if (listlen(parts) < 2) + throw(~type, "Do you really want to deny an entire class A network?"); + if (listlen(parts) > 4) + throw(~type, "Invalid IP Address: " + (parts.join("."))); + return parts.join("."); +}; + +public method .parse_deny_user() { + arg value, @args; + var obj; + + if (value && ((value[1]) == "$")) { + obj = (> $object_lib.to_dbref(value) <); + if (!(obj.is($user))) + throw(~perm, (obj.namef('ref)) + " is not a user."); + } else { + obj = (> $user_db.search(value) <); + } + return obj; +}; + +public method .parse_initial_quota() { + arg value, @args; + + value = (> value.to_bytes() <); + if (value < 1024) + throw(~perm, "You cannot set your initial quota to less than 1 kb"); + return value; +}; + +public method .parse_new_user_class() { + arg value, @args; + + value = (> $object_lib.to_dbref(value) <); + if (!(value.is($user))) + throw(~perm, (value.namef('ref)) + " is not a $user object."); + if (!(value.has_flag('command_cache))) + throw(~perm, (value.namef('ref)) + " is not a command cache object."); + return value; +}; + +public method .parse_startup_object() { + arg value, action, @args; + + value = (> $object_lib.to_dbref(value) <); + if (action == 'del) { + if (!(value in (startup['objects]))) + throw(~failed, ("The object '" + value) + "' is not set, and thus cannot be removed"); + return value; + } + return value; +}; + root method .sender_going_away() { admins = admins.setremove(sender()); agents = agents.setremove(sender()); @@ -512,14 +633,14 @@ case 'startup_time: return startup['time]; case 'server_hostname: - return $network.hostname(); + return $dns.hostname(""); case 'server_ip: - return $network.ip(); + return $dns.ip(""); case 'last_backup: return backup['last]; case 'driver_version: tmp = .version(); - return (((((long ? "Cold Genesis " : "") + (tmp[1])) + ".") + (tmp[2])) + "p") + (tmp[3]); + return (((((((long ? "Cold Genesis " : "") + (tmp[1])) + ".") + (tmp[2])) + "p") + (tmp[3])) + "-") + ((listlen(tmp) == 3) ? "NEED TO UPGRADE" : (tmp[4])); case 'core_version: return (long ? "ColdCore " : "") + core_version; default: @@ -527,6 +648,75 @@ } }; +protected method .set_anon_user_class() { + arg name, definer, value; + + starting = starting.add('anon_user_class, value); +}; + +protected method .set_backup_interval() { + arg name, definer, value; + + backup = backup.add('interval, value); +}; + +protected method .set_deny_hosts() { + arg name, definer, value; + + switch (value[1]) { + case 'set: + deny_hosts = value[2]; + case 'add: + deny_hosts = setadd(deny_hosts, value[2]); + case 'del: + deny_hosts = setremove(deny_hosts, value[2]); + default: + throw(~type, "Unknown action: " + (value[1])); + } +}; + +protected method .set_deny_users() { + arg name, definer, value; + + switch (value[1]) { + case 'set: + deny_users = value[2]; + case 'add: + deny_users = setadd(deny_users, value[2]); + case 'del: + deny_users = setremove(deny_users, value[2]); + default: + throw(~type, "Unknown action: " + (value[1])); + } +}; + +protected method .set_initial_quota() { + arg name, definer, value; + + starting = starting.add('quota, value); +}; + +protected method .set_loggers() { + arg name, definer, value; + + switch (value[1]) { + case 'set: + loggers = value[2]; + case 'add: + loggers = setadd(loggers, value[2]); + case 'del: + loggers = setremove(loggers, value[2]); + default: + throw(~type, "Unknown action: " + (value[1])); + } +}; + +protected method .set_new_user_class() { + arg name, definer, value; + + starting = starting.add('new_user_class, value); +}; + public method .set_starting() { arg what, value; var valid; @@ -549,6 +739,33 @@ startup = startup.add(what, value); }; +protected method .set_startup_objects() { + arg name, definer, value; + + switch (value[1]) { + case 'set: + startup = startup.add('objects, value[2]); + case 'add: + startup = startup.add('objects, setadd(startup['objects], value[2])); + case 'del: + startup = startup.add('objects, setremove(startup['objects], value[2])); + default: + throw(~type, "Unknown action: " + (value[1])); + } +}; + +protected method .set_validate_email_addresses() { + arg name, definer, value; + + validate_email_addresses = value; +}; + +protected method .set_writable_core() { + arg name, definer, value; + + writable_core = value; +}; + public method .shutdown() { var opt, str, obj; @@ -562,6 +779,7 @@ with .log($parse_lib.traceback(traceback())); } + touched = 0; return shutdown(); }; @@ -585,6 +803,20 @@ } }; +public method .spawn_selfmanager() { + arg name, @writers; + var obj, w; + + // Differs from .spawn_sender in that the object created manages itself. + // Add to this list as necessary: + (> .perms(sender(), $mail_message) <); + obj = (> .create([sender()], name, this()) <); + for w in (writers) + obj.add_writer(w); + obj.change_manager(obj); + return obj; +}; + public method .spawn_sender() { arg suffix, manager; var namestr; @@ -674,6 +906,12 @@ } }; +public method .startup_dnsserv() { + if (sender() != $dns) + (> .perms(sender(), 'system) <); + execute("dnsstartup", [], 1); +}; + public method .status() { return (> ._status() <) + [backup['interval], backup['last], backup['next]]; }; @@ -687,19 +925,13 @@ (> .perms(sender(), 'system) <); return (> task_info(@args) <); - - // $#Edited: 19 Sep 96 09:59 $brandon -}; - -public method .tmp_eval_859065108() { - var me, here; - - me = $brandon; - here = $the_pit; - return (> .make_core("3.0a7") <); }; public method .touch() { + arg @nocorelock; + + if ((!nocorelock) && ((sender().has_flag('core)) && (!writable_core))) + throw(~perm, sender() + " is a core object, and the core isn't writable."); touched = time(); }; @@ -707,11 +939,25 @@ return touched; }; +public method .user_denied() { + arg user; + + return user in deny_users; +}; + public method .validate_email_addresses() { + arg @args; + return validate_email_addresses; }; public method .version(): native; + +public method .writable_core() { + arg @args; + + return writable_core; +}; bind_native .status() ._status(); diff -rwu src-3.0a7/tag.cdc ColdCore-3.0a9.02/src/tag.cdc --- src-3.0a7/tag.cdc Sat Aug 9 19:09:33 1997 +++ ColdCore-3.0a9.02/src/tag.cdc Tue Aug 19 12:15:36 1997 @@ -1,13 +1,11 @@ new object $tag: $frob; *var $root child_index = '-' tag.cdc var $root created_on = 837584128; var $root flags = ['variables, 'methods, 'code, 'core]; var $root inited = 1; var $root managed = [$tag]; var $root manager = $tag; -var $root owned = [$tag]; public method .add_ctext_flag() { arg self, key, value; @@ -16,10 +14,6 @@ eflags = (self[2]).addkey(key, value); self = self.replace(2, eflags); return (<this(), self>); - - // $#Edited: 13 Jul 96 17:12 Miro ($kahuna) - // $#Edited: 17 Jul 96 00:05 $kahuna - // $#Edited: 17 Jul 96 00:15 $jenner }; public method .append_arg() { @@ -28,31 +22,18 @@ args = (self[3]) + [new]; return (<this(), (self.replace(3, args))>); - - // $#Edited: 13 Jul 96 17:12 Miro ($kahuna) - // $#Edited: 17 Jul 96 00:05 $kahuna - // $#Edited: 17 Jul 96 00:15 $jenner - // $#Edited: 30 Nov 96 21:22 $miro }; public method .args() { arg self; return self[3]; - - // $#Edited: 13 Jul 96 17:12 Miro ($kahuna) - // $#Edited: 17 Jul 96 00:05 $kahuna - // $#Edited: 17 Jul 96 00:15 $jenner }; public method .ctext_flags() { arg self; return self[2]; - - // $#Edited: 13 Jul 96 17:12 Miro ($kahuna) - // $#Edited: 17 Jul 96 00:05 $kahuna - // $#Edited: 17 Jul 96 00:15 $jenner }; public method .eval_flags() { @@ -63,7 +44,7 @@ l = []; s = sender(); for i in (flags) { - if (type(i[2]) == 'frob) { + if (type(i[2]) != 'string) { [val, vars] = s._eval_ctext(i[2], vars); l += [[i[1], val]]; } else { @@ -71,29 +52,18 @@ } } return [this[1], l, this[3], this[4]]; - - // $#Edited: 29 Nov 96 16:22 $miro - // $#Edited: 30 Nov 96 21:22 $miro }; public method .method() { arg self; return self[4]; - - // $#Edited: 13 Jul 96 17:12 Miro ($kahuna) - // $#Edited: 17 Jul 96 00:05 $kahuna - // $#Edited: 17 Jul 96 00:15 $jenner }; public method .name() { arg self; return self[1]; - - // $#Edited: 13 Jul 96 17:12 Miro ($kahuna) - // $#Edited: 17 Jul 96 00:05 $kahuna - // $#Edited: 17 Jul 96 00:15 $jenner }; public method .new_tag() { @@ -120,10 +90,6 @@ arg self, args; return (<this(), (self.replace(3, args))>); - - // $#Edited: 13 Jul 96 17:12 Miro ($kahuna) - // $#Edited: 17 Jul 96 00:05 $kahuna - // $#Edited: 17 Jul 96 00:15 $jenner }; diff -rwu src-3.0a7/the_pit.cdc ColdCore-3.0a9.02/src/the_pit.cdc --- src-3.0a7/the_pit.cdc Sat Aug 9 19:09:31 1997 +++ ColdCore-3.0a9.02/src/the_pit.cdc Tue Aug 19 12:15:20 1997 @@ -2,8 +2,9 @@ new object $the_pit: $place; var $described prose = <$ctext_frob, [["A cozy atmosphere pervades this room, a small hideaway where people can come to relax and socialize. The cement walls are covered with various scribbles burn marks, and stains of unrecognizable origin."], #[]]>; -var $event_handler hooked = #[[$guest, ['movement]]]; -var $event_handler hooks = #[['movement, [$or_lock_frob, $help_cmd_core, $guest]], ['user_connect, [$or_lock_frob, $help_cmd_core]]]; +var $event_handler hooked = #[]; +var $event_handler hooks = #[]; +var $foundation msgs = #[["housekeeper", #[["general", <$ctext_frob, [["Dust bunnies rise from under the furniture to envelop ", <$generator, ["actor", [], [], 'gen_actor]>, "'s comatose form, leaving behind a small pile of musty lint."], #[]]>]]]]; var $has_commands local = #[]; var $has_name name = ['prop, "The Pit", "The Pit"]; *var $location contents = ' ' the_pit.cdc @@ -15,8 +16,7 @@ var $root inited = 1; var $root managed = [$the_pit]; var $root manager = $the_pit; -var $root owned = [$the_pit]; -var $root settings = #[["public-home", 0], ["map-position", [0, 0, "00", $map_of_taobh_thiar]], ["propagate", 1]]; +var $root settings = #[["public-home", 0], ["map-position", 0], ["propagate", 0]]; root method .core_the_pit() { .set_prose("A cozy atmosphere pervades this room, a small hideaway where people can come to relax and socialize. The cement walls are covered with various scribbles burn marks, and stains of unrecognizable origin."); diff -rwu src-3.0a7/thing.cdc ColdCore-3.0a9.02/src/thing.cdc --- src-3.0a7/thing.cdc Sat Aug 9 19:09:28 1997 +++ ColdCore-3.0a9.02/src/thing.cdc Tue Aug 19 12:15:18 1997 @@ -16,7 +15,6 @@ var $root inited = 1; var $root managed = [$thing]; var $root manager = $thing; -var $root owned = [$thing]; var $root settings = #[["home", $lost_and_found]]; var $thing gender = 0; var $thing lock = <$true_lock_frob, []>; @@ -41,8 +39,6 @@ } with { return (traceback()[1])[2]; } - - // $# Edited 05 Nov 1995 14:10 Lynx ($lynx) }; public method .check_gender() { @@ -67,9 +63,9 @@ unparse = value.unparse(); if (unparse == "yes") - return "self"; + return "unlocked"; else if (unparse == "no") - return "none"; + return "locked"; return unparse; }; @@ -83,7 +79,7 @@ return gender.pronoun('po); }; -root method .get_lock() { +public method .get_lock() { arg name, definer; return lock || (<$true_lock_frob, []>); @@ -153,28 +149,28 @@ home = (> .match_environment(value) <); if ((!(home.trusts(sender()))) && (!(home.get_setting("public-home", $place)))) - throw(~perm, ("You do not have permission to make " + (home.name())) + " your home."); + throw(~notpublic, ("You do not have permission to make " + (home.name())) + " your home."); return home; }; -root method .parse_lock() { +public method .parse_lock() { arg value; - if (value == "none") + if (value in ["lock", "locked"]) value = "no"; - else if (value == "self") + else if (value in ["unlock", "unlocked"]) value = "yes"; - return (> $lock_parser.parse(value, this()) <); + return (> $lock_parser.parse(value, user() || this()) <); }; protected method .set_gender() { arg name, definer, value; - (> .perms(sender(), 'manager) <); + (> .perms(sender()) <); gender = value; }; -root method .set_lock() { +protected method .set_lock() { arg name, definer, value; if (class(value) == $true_lock_frob) @@ -186,7 +182,6 @@ public method .tell() { arg @args; - // $#Edited: 23 Dec 96 15:38 $brandon }; public method .try_lock() { diff -rwu src-3.0a7/thing_frob.cdc ColdCore-3.0a9.02/src/thing_frob.cdc --- src-3.0a7/thing_frob.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/thing_frob.cdc Tue Aug 19 12:15:20 1997 @@ -5,14 +5,12 @@ var $has_name name = ['uniq, "Thing Frob", "the Thing Frob"]; var $located location = $void; var $located obvious = 1; *var $root child_index = '-' thing_frob.cdc var $root created_on = 796268969; var $root fertile = 1; var $root flags = ['methods, 'code, 'fertile, 'variables, 'core, 'frob]; var $root inited = 1; var $root managed = [$thing_frob]; var $root manager = $thing_frob; -var $root owned = [$thing_frob]; var $thing gender = $gender_neuter; frob method .add_name_template() { @@ -23,18 +21,17 @@ return .change_data(this, 'name_templates, new); }; -frob method .all_defined_settings() { +frob method .all_defined_settings(): nooverride { arg this; - return pass(); + (> .perms(this, sender()) <); + return ._all_defined_settings(); }; frob method .all_local_commands() { arg this; return pass(); - - // $#Edited: 17 Mar 97 21:50 $brandon }; frob method .all_msgs(): nooverride { @@ -225,6 +222,12 @@ return .description(this, flags); }; +frob method .get_lock() { + arg this, name, definer; + + return (| this['lock] |) || (<$true_lock_frob, []>); +}; + frob method .get_msg(): nooverride { arg this, name, definer; @@ -335,14 +338,20 @@ }; public method .new() { - var name, prose, data, n; + var location; - return (<this(), #[['prose, []], ['location, sender()], ['manager, sender()], ['name, .name('literal)]]>); + if (sender().is($location)) + location = sender(); + else if (sender().is($located)) + location = sender().location(); + else + location = $nowhere; + return (<this(), #[['prose, []], ['location, location], ['manager, sender()], ['name, .name('literal)]]>); }; public method .new_with() { arg @args; - var name, prose, data, n; + var name, prose, data, new; name = (listlen(args) > 0) && (args[1]); prose = (listlen(args) > 1) && (args[2]); @@ -378,6 +387,15 @@ throw(~perm, "You cannot set the gender on frobs, sorry."); }; +frob method .set_lock() { + arg this, name, definer, value; + + if (class(value) == $true_lock_frob) + return .change_data(this, 'lock, 0, 'remove); + else + return .change_data(this, 'lock, value); +}; + frob method .set_msg(): nooverride { arg this, name, branch, definer, value; var compiler, branches, msg, definer, msgs; @@ -419,8 +437,6 @@ throw(~invarg, "Type must be one of: 'prop, 'normal or 'uniq."); } return .change_data(this, 'name, new); - - // $#Edited: 30 Nov 96 20:00 $miro }; frob method .set_prose() { @@ -451,7 +467,7 @@ }; frob method .set_visibility() { - arg this, value; + arg this, name, definer, value; return .change_data(this, 'visibility, value); }; @@ -472,8 +488,6 @@ arg this, @args; return (| this['lock] |) ? ((this['lock]).try(@args)) : 1; - - // $#Edited: 17 Mar 97 02:55 $miro }; frob method .visibility() { @@ -488,6 +502,14 @@ if (!(> .try_lock(this, mover) <)) throw(~locked, ((((.name()).capitalize()) + " is locked to ") + ((this['lock]).lock_name('thing))) + "."); return 1; +}; + +frob method .writers(): nooverride { + arg this, @literal; + + if (literal) + return []; + return [this['manager]]; }; diff -rwu src-3.0a7/time.cdc ColdCore-3.0a9.02/src/time.cdc --- src-3.0a7/time.cdc Sat Aug 9 19:09:47 1997 +++ ColdCore-3.0a9.02/src/time.cdc Tue Aug 19 12:15:37 1997 @@ -6,7 +6,6 @@ var $root inited = 1; var $root managed = [$time]; var $root manager = $time; -var $root owned = [$time]; var $time days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]; var $time months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; var $time time_units = [[31536000, "year", "years", "yr", "yrs"], [2592000, "month", "months", "mo", "mos"], [604800, "week", "weeks", "wk", "wks"], [86400, "day", "days", "dy", "dys"], [3600, "hour", "hours", "hr", "hrs"], [60, "minute", "minutes", "min", "mins"], [1, "second", "seconds", "sec", "secs"]]; @@ -51,8 +50,6 @@ p = 2; return strfmt("%2{0}r:%2{0}r:%2{0}r", time / 3600, (time % 3600) / 60, time % 60); } - - // $#Edited: 30 Nov 96 21:22 $miro }; public method .format(): native; @@ -86,6 +83,7 @@ year = lt[7]; days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month]; while (time >= (days + ((month == 2) && (((year % 4) == 0) && (!((year % 400) in [100, 200, 300])))))) { + refresh(); time -= days; mnths++; month++; diff -rwu src-3.0a7/trash.cdc ColdCore-3.0a9.02/src/trash.cdc --- src-3.0a7/trash.cdc Sat Aug 9 19:09:31 1997 +++ ColdCore-3.0a9.02/src/trash.cdc Tue Aug 19 12:15:20 1997 @@ -14,15 +14,12 @@ var $root inited = 1; var $root managed = [$trash]; var $root manager = $trash; -var $root owned = [$trash]; var $thing gender = $gender_neuter; var $trash items = #[]; public method .del_sender_from_contents() { pass(); items = dict_del(items, sender()); - - // $#Edited: 22 Mar 97 12:03 $brandon }; public method .did_arrive() { diff -rwu src-3.0a7/trie.cdc ColdCore-3.0a9.02/src/trie.cdc --- src-3.0a7/trie.cdc Sat Aug 9 19:09:33 1997 +++ ColdCore-3.0a9.02/src/trie.cdc Tue Aug 19 12:15:36 1997 @@ -7,7 +7,6 @@ var $root inited = 1; var $root managed = [$trie]; var $root manager = $trie; -var $root owned = [$trie]; public method ._add() { arg trie, key, @values; @@ -31,9 +30,6 @@ if (!(n = (key[1]) in (trie[2]))) return [@trie.replace(2, (trie[2]) + (key[1])), ._add([0, ""], key.subrange(2), @values)]; return trie.replace(n + 2, ._add(trie[n + 2], key.subrange(2), @values)); - - // $#Edited: 20 Apr 96 21:55 Jenner ($jenner) - // $#Edited: 30 Nov 96 21:22 $miro }; public method ._del() { @@ -58,24 +54,18 @@ if (((trie.length()) == 3) && ((!(trie[1])) && (!((trie[3])[2])))) trie = [((trie[3])[1]).replace(1, (trie[2]) + (((trie[3])[1])[1])), ""]; return trie; - - // $#Edited: 21 Apr 96 14:07 Jenner ($jenner) }; public method .add() { arg @args; return (<$trie, (._add(@args))>); - - // $#Edited: 18 Apr 96 23:59 Jenner ($jenner) }; public method .del() { arg @args; return (<$trie, (._del(@args))>); - - // $#Edited: 21 Apr 96 13:47 Jenner ($jenner) }; public method .keys() { @@ -90,9 +80,6 @@ refresh(); } return l; - - // $#Edited: 21 Apr 96 14:37 Jenner ($jenner) - // $#Edited: 30 Nov 96 21:22 $miro }; public method .match_begin() { @@ -108,8 +95,6 @@ (> (t = .match_begin(trie[n + 2], key.subrange(2))) <); t = t.replace(1, (key[1]) + (t[1])); return t; - - // $#Edited: 21 Apr 96 14:20 Jenner ($jenner) }; public method .match_exact() { @@ -123,16 +108,12 @@ (> (t = .match_exact(trie[n + 2], key.subrange(2))) <); t = t.replace(1, (key[1]) + (t[1])); return t; - - // $#Edited: 21 Apr 96 14:29 Jenner ($jenner) }; public method .new() { arg @ignore; return (<this(), [0, ""]>); - - // $#Edited: 06 Nov 96 16:52 $brandon }; public method .to_dict() { @@ -148,8 +129,6 @@ refresh(); } return dict; - - // $#Edited: 30 Nov 96 21:22 $miro }; diff -rwu src-3.0a7/true.cdc ColdCore-3.0a9.02/src/true.cdc --- src-3.0a7/true.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/true.cdc Tue Aug 19 12:15:36 1997 @@ -6,7 +6,6 @@ var $root inited = 1; var $root managed = [$true]; var $root manager = $true; -var $root owned = [$true]; var $root trusted = []; public method .test() { diff -rwu src-3.0a7/true_lock_frob.cdc ColdCore-3.0a9.02/src/true_lock_frob.cdc --- src-3.0a7/true_lock_frob.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/true_lock_frob.cdc Tue Aug 19 12:15:36 1997 @@ -5,7 +5,12 @@ var $root flags = ['methods, 'code, 'variables, 'core]; var $root managed = [$true_lock_frob]; var $root manager = $true_lock_frob; -var $root owned = [$true_lock_frob]; + +public method .lock_name() { + arg value, @type; + + return "yes"; +}; public method .new_lock() { return (<this(), []>); diff -rwu src-3.0a7/uncompiler.cdc ColdCore-3.0a9.02/src/uncompiler.cdc --- src-3.0a7/uncompiler.cdc Sat Aug 9 19:09:48 1997 +++ ColdCore-3.0a9.02/src/uncompiler.cdc Tue Aug 19 12:15:17 1997 @@ -6,7 +6,6 @@ var $root inited = 1; var $root managed = [$uncompiler]; var $root manager = $uncompiler; -var $root owned = [$uncompiler]; public method ._eval_ctext() { arg data, vars, @quote_all; @@ -41,8 +40,6 @@ token = next; } return [out, vars]; - - // $#Edited: 22 Jan 97 15:32 $miro }; public method ._spaces() { @@ -59,17 +56,12 @@ } } return token; - - // $#Edited: 22 Jan 97 21:24 $miro - // $#Edited: 22 Jan 97 21:41 $miro }; public method .do_br() { arg vars, flags, args; return [["", "{br}"], vars]; - - // $#Edited: 23 Jan 97 15:40 $brandon }; public method .do_dd() { @@ -78,17 +70,12 @@ [args, vars] = ._eval_ctext(args, vars); return [(["", "{dd: "].affix(args)).affix("}"), vars]; - - // $#Edited: 29 Nov 96 16:22 $miro }; public method .do_detail() { arg vars, flags, args; return .eval_formatter((<$format, ["detail", flags, (| (vars['details])[flags.getkey("name")] |) || ["UNKNOWN"], 'DO_NOT_CALL_THIS]>), vars); - - // $#Edited: 30 Oct 96 23:38 $miro - // $#Edited: 29 Nov 96 16:29 $miro }; public method .do_dfn() { @@ -113,13 +100,14 @@ var dl, token; if ((| flags.getkey("columned") |)) - dl = "{dl columned:"; + dl = "{dl columned"; else - dl = "{dl:"; + dl = "{dl"; + if ((| flags.getkey("ind") |)) + dl += " ind=" + (flags.getkey("ind")); + dl += ":"; [args, vars] = ._eval_ctext(args, vars); return [((["", dl].affix(args.prefix(" "))).affix("}")) + [""], vars]; - - // $#Edited: 29 Nov 96 16:31 $miro }; public method .do_dt() { @@ -128,8 +116,6 @@ [args, vars] = ._eval_ctext(args, vars); return [(["", "{dt: "].affix(args)).affix("}"), vars]; - - // $#Edited: 29 Nov 96 16:22 $miro }; public method .do_lh() { @@ -144,8 +130,6 @@ [args, vars] = ._eval_ctext(args, vars); return [(["", "{li:"].affix(args)).affix("}"), vars]; - - // $#Edited: 29 Nov 96 16:22 $miro }; public method .do_np() { @@ -164,8 +148,6 @@ arg vars, flags, args; return [(["{quote "].affix((args[1]).explode("\n", 1))).affix("}"), vars]; - - // $#Edited: 02 Aug 96 18:01 $jenner }; public method .do_subj() { @@ -175,8 +157,30 @@ [args, vars] = ._eval_ctext(args, vars); l = toint((| flags.getkey("level") |) || "4"); return [(["", "", ("{subj level=" + l) + ":"].affix(args)).affix(["}"]), vars]; +}; - // $#Edited: 29 Nov 96 16:22 $miro +public method .do_switch() { + arg vars, flags, args; + var i, j, out, def, ret, val, l, lower, upper, val; + + def = [""]; + [val, vars] = ._eval_ctext(flags.getkey("value"), vars); + out = [""]; + for i in (args) { + [ret, vars] = ._eval_ctext(i[2], vars); + if ((i[1]) == 'default) { + def = ["", "[default]", ""].affix(ret.prefix(" ")); + } else if ((i[1]) == 'ranges) { + for j in (i[2]) { + [lower, upper, ret] = j; + [ret, vars] = ._eval_ctext(ret, vars); + out = (out.affix(["", ((("[range:" + lower) + "..") + upper) + "]", ""])).affix(ret.prefix(" ")); + } + } else { + out = (out.affix(["", ("[case:" + (i[1])) + "]", ""])).affix(ret.prefix(" ")); + } + } + return [(((["", "{switch value="].affix(val)).affix(":")).affix((out.affix(def)).prefix(" "))).affix(["}", ""]), vars]; }; public method .do_td() { @@ -219,8 +223,6 @@ [args, vars] = ._eval_ctext(args, vars); return [((["", "{ul:"].affix(args.prefix(" "))).affix("}")) + [""], vars]; - - // $#Edited: 29 Nov 96 16:22 $miro }; public method .eval_formatter() { @@ -250,8 +252,6 @@ out = out.affix("}"); return [out, vars]; } - - // $#Edited: 29 Nov 96 16:22 $miro }; public method .eval_generator() { @@ -280,8 +280,6 @@ } return [out.affix("]"), vars]; } - - // $#Edited: 29 Nov 96 16:22 $miro }; public method .gen_switch() { @@ -306,24 +304,18 @@ } } return [(((["", "[switch value="].affix(val)).affix(":")).affix((out.affix(def)).prefix(" "))).affix(["]", ""]), vars]; - - // $#Edited: 22 Jan 97 16:37 $miro }; public method .quote() { arg s; return s.sed("([][{}\])", "\%1", "g"); - - // $#Edited: 21 Nov 96 18:41 $miro }; public method .quote_all() { arg s; return s.sed("([][{}\:= ])", "\%1", "g"); - - // $#Edited: 21 Nov 96 18:40 $miro }; diff -rwu src-3.0a7/user.cdc ColdCore-3.0a9.02/src/user.cdc --- src-3.0a7/user.cdc Sat Aug 9 19:09:30 1997 +++ ColdCore-3.0a9.02/src/user.cdc Tue Aug 19 12:15:19 1997 @@ -1,5 +1,5 @@ -new object $user: $body, $mail_ui, $command_aliases, $bad_commands, $help_ui, $editor_reference, $channel_ui, $user_info; +new object $user: $body, $mail_ui, $command_aliases, $bad_commands, $help_ui, $editor_reference, $channel_ui, $user_info, $menu; var $channel_ui active_channels = #[]; var $channel_ui channel_dict = #[]; @@ -21,8 +21,8 @@ [["@news", "", "@news", 'news_cmd, #[]]]], ["@forget", [["@forget", "*", "@forget <any>", 'forget_cmd, #[[1, ['any, []]]]]]],\ ["@whereis|@where-is",\ [["@whereis|@where-is", "*", "@whereis|@where-is <any>", 'whereis_cmd, #[[1, ['any, []]]]]]],\ - ["@ways",\ - [["@ways", "", "@ways", 'ways_cmd, #[]]]], ["@password|@passwd", [["@password|@passwd", "*", "@password|@passwd <any>", 'password_cmd, #[[1, ['any, []]]]]]],\ + ["@password|@passwd",\ + [["@password|@passwd", "*", "@password|@passwd <any>", 'password_cmd, #[[1, ['any, []]]]]]],\ ["@age",\ [["@age", "*", "@age <object>", 'age_cmd, #[[1, ['object, []]]]]]],\ ["@context",\ @@ -35,8 +35,6 @@ [["@add-writer|@aw", "*", "@add-writer|@aw <any>", 'add_writer_cmd, #[[1, ['any, []]]]]]],\ ["@del-writer|@dw",\ [["@del-writer|@dw", "*", "@del-writer|@dw <any>", 'del_writer_cmd, #[[1, ['any, []]]]]]],\ - ["@chman?age",\ - [["@chman?age", "*", "@chman?age <any>", 'chmanage_cmd, #[[1, ['any, []]]]]]],\ ["@manage?d",\ [["@manage?d", "*", "@manage?d <any>", 'managed_cmd, #[[1, ['any, []]]]]]],\ ["@remember",\ @@ -58,7 +56,7 @@ ["@monitor",\ [["@monitor", "*", "@monitor <any>", 'monitor_cmd, #[[1, ['any, []]]]]]],\ ["@ex?amine",\ - [["@ex?amine", "*", "@ex?amine <object:+c?hop>", 'examine_cmd, #[[1, ['object_opt, [["c?hop"]]]]]]]],\ + [["@ex?amine", "*", "@ex?amine <object:+c?hop>", 'examine_cmd, #[[1, ['object_opt, ["c?hop"]]]]]]],\ ["@map",\ [["@map", "", "@map", 'map_cmd, #[]]]], ["@finger|@ustat", [["@finger|@ustat", "*", "@finger|@ustat <user>", 'finger_cmd, #[[1, ['user, []]]]]]],\ ["@trusts|@trustee?s",\ @@ -67,8 +65,6 @@ [["@writers", "*", "@writers <object>", 'writers_cmd, #[[1, ['object, []]]]]]],\ ["@manager",\ [["@manager", "*", "@manager <object>", 'manager_cmd, #[[1, ['object, []]]]]]],\ - ["view",\ - [["view", "*", "view <any>", 'view_detail_cmd, #[[1, ['any, []]]]]]],\ ["@desc?ribe|@prose",\ [["@desc?ribe|@prose", "*", "@desc?ribe|@prose <any>", 'description_cmd, #[[1, ['any, []]]]]]],\ ["l?ook|exam?ine",\ @@ -98,7 +94,11 @@ ["@date|@time",\ [["@date|@time", "*", "@date|@time <any>", 'date_cmd, #[[1, ['any, []]]]]]],\ ["@set",\ - [["@set", "*", "@set <any>", 'set_cmd, #[[1, ['any, []]]]]]]]; + [["@set", "*", "@set <any>", 'set_cmd, #[[1, ['any, []]]]]]],\ + ["PUEBLOCLIENT",\ + [["PUEBLOCLIENT", "*", "PUEBLOCLIENT <any>", 'pueblo_cmd, #[[1, ['any, []]]]]]],\ + ["@ways|@exits",\ + [["@ways|@exits", "*", "@ways|@exits <any>", 'ways_cmd, #[[1, ['any, []]]]]]]]; var $has_commands shortcuts = #[["--*", ['remote_cmd, ["@page ", "", " with ", 1]]], ["-* *", ['remote_cmd, ["@page ", 1, " with ", 2]]]]; var $has_name name = ['prop, "Generic User Object", "Generic User Object"]; var $located location = $void; @@ -113,14 +113,12 @@ var $mail_list senders = 1; var $mail_ui current = #[['location, 0], ['list, $user]]; var $mail_ui subscribed = #[[$user, [791485891, 0]]]; *var $root child_index = '-' user.cdc var $root created_on = 796268969; var $root defined_settings = #[["experienced", #[['parse, ['is_boolean]], ['format, ['format_boolean]]]], ["global-tell", #[['get, ['get_global_tell]], ['set, ['set_global_tell]], ['parse, ['is_boolean]], ['format, ['format_boolean]]]], ["cols", #[['get, ['get_cols]], ['set, ['set_cols]], ['parse, ['is_type, 'integer]]]], ["rows", #[['get, ['get_rows]], ['set, ['set_rows]], ['parse, ['is_type, 'integer]]]], ["prompt", #[['parse, ['is_boolean]], ['format, ['format_boolean]]]], ["auto-look", #[['get, ['get_auto_look]], ['set, ['set_auto_look]], ['parse, ['is_boolean]], ['format, ['format_boolean]]]], ["content-type", #[['set, ['set_content_type]], ['parse, ['parse_content_type]], ['format, ['format_content_type]], ['clear, ['clear_content_type]], ['get, ['get_content_type]]]], ["extended-parsers", #[['parse, ['parse_ext_parsers]], ['format, ['format_ext_parsers]]]], ["exit-style", #[['parse, ['parse_exit_style]]]], ["title", #[['get, ['title]], ['set, ['set_title]]]]]; var $root flags = ['methods, 'code, 'core, 'command_cache, 'variables]; var $root inited = 1; var $root managed = [$user]; var $root manager = $user; -var $root owned = [$user]; var $root settings = #[["experienced", 0], ["exit-style", 'none], ["home", $body_cave], ["prompt", 0], ["extended-parsers", []]]; var $root trusted_by = [$user_db]; var $thing gender = $gender_neuter; @@ -132,22 +130,48 @@ var $user connected_seconds = 0; var $user connections = []; var $user content_type = 'plain; -var $user context = #[['last, $body_cave]]; +var $user context = #[['last, $root], ["it", $robot]]; var $user evaluator = 0; var $user ext_parsers = 0; var $user failed = 0; -var $user formatter = $text_format; +var $user formatter = $plain_format; var $user global_tell = 0; var $user last_command_at = 0; var $user monitor = 0; var $user parsers = [$command_parser]; var $user password = "*"; +var $user reap_notified = 0; var $user registered = 0; var $user remembered = 0; var $user rows = 0; var $user task_connections = #[]; var $user title = 0; +public method ._edit_mail_callback() { + arg text, cdata; + var list, subj, err, mail; + + // not necessarily safe perm checks + (> .perms(caller(), $editor_session, $editor_reference) <); + list = cdata[2]; + subj = cdata[3]; + if (!subj) { + subj = .prompt("Subject: "); + if (subj == "@abort") + return "** Aborted mail send **"; + if (subj == 'engaged) + return "** Already reading input - mail send aborted **"; + } + mail = $mail_message.new_mail(); + mail.set_subject(subj); + mail.set_text(text); + catch any + mail.send(@list); + with + return ['failed, [(traceback()[1])[2]]]; + return ['success, ["Mail sent to " + (list.map_to_english('mail_name))]]; +}; + protected method ._exam_sub() { arg name, plural, cmd, chop, obj, meth, @args; var list, line; @@ -219,8 +243,6 @@ public method ._tmp_wwmmmww() { $world.hook_into_event('realm_announce); - - // $#Edited: 07 Mar 97 16:31 $miro }; protected method ._who_admins() { @@ -250,8 +272,6 @@ if (!admins) return 0; return [admins, t]; - - // $#Edited: 30 Nov 96 21:22 $miro }; protected method ._who_at_place() { @@ -278,13 +298,11 @@ args = [@args, [['namef, 'titled], ['idle_time]]]; args = [@args, ["Name", "Times (idle)"], [1, 1]]; return args; - - // $#Edited: 30 Nov 96 21:22 $miro }; protected method ._who_is() { arg @args; - var person, p, who; + var person, p, who, x; who = []; args = ($string.explode_english_list(@args)) || []; @@ -294,7 +312,7 @@ } with { switch (error()) { case ~ambig: - .tell(((("The name \"" + p) + "\" can match any of: ") + ($list.to_english($list.mmap((traceback()[1])[3], 'namef)))) + "."); + .tell(((("The name \"" + p) + "\" can match any of: ") + ($list.to_english(filter x in ($user_db.users()) where (x.match_begin(p))))) + "."); default: .tell(("I don't know who \"" + p) + "\" is."); } @@ -305,8 +323,6 @@ if (!who) return 0; return [who, ((who.length()) == 1) ? "User" : "Users"]; - - // $#Edited: 30 Nov 96 21:22 $miro }; protected method ._who_programmers() { @@ -337,8 +353,6 @@ if (!progs) return 0; return [progs, t]; - - // $#Edited: 30 Nov 96 21:22 $miro }; protected method ._who_short() { @@ -354,9 +368,6 @@ tmp = (namestr.length()) + 2; } .tell($list.columnize(who, (.linelen()) / (tmp + 1), " ", .linelen())); - - // $# Edited 05 Nov 1995 13:56 Lynx ($lynx) - // $#Edited: 30 Nov 96 21:22 $miro }; public method .action() { @@ -387,8 +398,6 @@ return "zoned"; else return "long gone"; - - // $# Edited 28 Oct 1995 20:36 Lynx ($lynx) }; public method .add_command_alias() { @@ -457,8 +466,6 @@ } } parsers += [parser]; - - // $#Edited: 30 Nov 96 21:22 $miro }; protected method .add_remembered() { @@ -483,8 +490,6 @@ } with { return (traceback()[1])[2]; } - - // $#Edited: 18 Jul 96 14:56 $levi }; protected method .add_writer_cmd() { @@ -494,7 +499,7 @@ (> .perms(caller(), 'command) <); args = (args.replace(" to ", " ")).explode(); if ((!args) || ((args.length()) != 2)) - .tell_error(cmd + " <writer> [to] <object>"); + (> .tell_error(cmd + " <writer> [to] <object>") <); writer = .match_env_nice(args[1]); obj = .match_env_nice(args[2]); catch any { @@ -515,7 +520,7 @@ gender = (obj.gender()).pronoun('psc); else gender = "It"; - out = [((obj.name()) + " was created on ") + ($time.format("%A %B %e %Y", time)), ((gender + " is ") + ($time.elapsed(time() - time, 'long))) + " old."]; + out = [((obj.name()) + " was created on ") + ($time.format("%A %B %d %Y", time)), ((gender + " is ") + ($time.elapsed(time() - time, 'long))) + " old."]; if (obj.is($user)) out += [((gender + " has logged ") + ($time.elapsed(obj.connected_seconds(), 'long))) + " online."]; return out; @@ -526,7 +531,7 @@ var who, obj, col, str, out, total, line, syntax, loc, size, full, s, o; (> .perms(caller(), 'command) <); - o = $parse_lib.getopt(args, [["f?ull"]]); + o = $parse_lib.opt(args, "f?ull"); args = (o[1]).join(); full = (| "f?ull" in ((o[2]).slice(1)) |); if (full) @@ -583,7 +588,7 @@ arg str, @cinfo; var match, warn; - (> .perms(caller(), definer(), $login_interface) <); + (> .perms(caller(), definer(), $login_interface, $security_lib) <); // no password means always match if (!password) @@ -649,12 +654,11 @@ protected method .commands_cmd() { arg cmdstr, cmd, args; - var s, full, o, opt, opts, lcmds, rcmds, len, obj, shorts, m, c, local, remote, short, all; + var s, full, o, opt, lcmds, rcmds, len, obj, shorts, m, c, local, remote, short, all; (> .perms(caller(), 'command) <); s = cmd + " [options] <object>"; - opts = [["f?ull"], ["a?ll"], ["l?ocal"], ["r?emote"], ["s?hortcuts"]]; - args = $parse_lib.getopt(args, opts); + args = $parse_lib.opt(args, "f?ull", "a?ll", "l?ocal", "r?emote", "s?hortcuts"); o = args[2]; local = (remote = (short = 1)); if ((opt = "f?ull" in (o.slice(1)))) @@ -669,7 +673,7 @@ local = (o[opt])[3]; args = (args[1]).join(); if ((!args) && (!all)) { - (| .tell_error(cmd + " [options] <object>") |); + (| .tell_error(cmd + " <object> [options]") |); return "! Defaults: -f?ull -a?ll +l?ocal +r?emote +s?hortcuts"; } else { args = args || "me"; @@ -722,8 +726,6 @@ o += [" " + $command_lib.(m)(c)]; } return o || ("No commands defined on " + (obj.namef('ref))); - - // $#Edited: 05 Feb 97 13:15 $brad }; public method .connected() { @@ -752,8 +754,6 @@ case 'seconds: return time() - connected_at; } - - // $#Edited: 30 Nov 96 21:22 $miro }; public method .connection_going_away() { @@ -822,8 +822,12 @@ out += ["Last her: " + ((| (context["her"]).name() |) || "(nothing)")]; out += ["Last him: " + ((| (context["him"]).name() |) || "(nothing)")]; return out; +}; - // $#Edited: 30 Nov 96 20:00 $miro +root method .core_user() { + // for now we dont core the bug system + (| .del_command("@rep?ort", 'report_cmd) |); + (| .del_method('report_cmd) |); }; public method .date_cmd() { @@ -847,7 +851,10 @@ arg cmdstr, com, template; (> .perms(caller(), 'command) <); - template = (template.explode_quoted())[1]; + template = template.explode_quoted(); + if (listlen(template) == 0) + return ("Syntax: " + com) + " <template>"; + template = template[1]; catch ~aliasnf (> .del_command_alias(template) <); with @@ -939,17 +946,17 @@ arg flags; var c, contents, ctext, pronoun, lines, p, br; + br = $cml_lib.format_br_tag(); pronoun = (.gender()).pronoun('psc); if (connections) - lines = [((pronoun + " is ") + ((.activity()) || "awake")) + "."]; + lines = [((pronoun + " is ") + ((.activity()) || "awake")) + ".", br]; else - lines = [(pronoun + " is asleep, and was last connected ") + ($time.format("%d %B %y %H:%M", abs(connected_at)))]; + lines = [(pronoun + " is asleep, and was last connected ") + ($time.format("%d %B %y %H:%M", abs(connected_at))), br]; if ((contents = .contents())) { lines += [pronoun + " is holding:"]; - for c in (contents) - lines += [" " + (c.name())]; + lines += [(<$format, ["dfn", [["nobound", 1]], [(<$generator, ["join", [["separator", br]], map c in (contents) to ($cml_lib.format_obj_tag('look, c, c.name(), 'contained)), 'gen_join]>)], 'do_dfn]>)]; } - return (> pass(flags) <) + lines; + return (> pass(flags) <) + [$ctext_frob.new_with(lines)]; }; protected method .description_cmd() { @@ -1028,8 +1035,6 @@ return (traceback()[1])[2]; } } - - // $# Edited 05 Nov 1995 14:10 Lynx ($lynx) }; public method .evaluator() { @@ -1038,16 +1043,32 @@ protected method .examine_cmd() { arg cmdstr, cmd, args; - var obj, opts, i, chop, out, m, cmds, c, desc; + var obj, opts, i, chop, out, m, cmds, c, desc, notfrobby, frobhandler; (> .perms(caller(), $user) <); obj = args[1]; opts = args[3]; chop = .linelen(); + if (type(obj) != 'frob) + notfrobby = 1; + if (notfrobby) c = obj.created_on(); if ((i = "ch?op" in (opts.slice(1))) && (!((opts[i])[3]))) chop = 0; - out = ["Object (@rename): " + (obj.namef('ref)), "Templates (@ant): " + ((| (obj.name_templates()).to_english("none") |) || "none"), "Created: " + (c ? ctime(c) : "(Before Time)"), (("Quota: " + ((obj.quota()).to_english())) + " bytes") + ((obj.quota_exempt()) ? " ** exempt **" : ""), ("Size: " + ((obj.size()).to_english())) + " bytes (on disk)", "Perms (@chmod): " + (((.flags()).prefix("+")).join()), "Manager (@chmanage): " + ($object_lib.get_name(obj.manager(), 'namef, ['ref])), ._exam_sub("Writer", 1, "@aw/@dw", chop, obj, 'writers, 'literal), ._exam_sub("Trusted", 0, "@at/@dt", chop, obj, 'trusted, 'literal), ._exam_sub("Parent", 1, "@ap/@dp", chop, obj, 'parents)]; + out = ["Object (@rename): " + (obj.namef('ref)), "Templates (@ant): " + ((| (obj.name_templates()).to_english("none") |) || "none")]; + if (notfrobby) + out += ["Created: " + (c ? ctime(c) : "(Before Time)"), (("Quota: " + ((obj.quota()).to_english())) + " bytes") + ((obj.quota_exempt()) ? " ** exempt **" : "")]; + out += [("Size: " + ((obj.size()).to_english())) + " bytes (on disk)"]; + if (notfrobby) + out += ["Perms (@chmod): " + (((obj.flags()).prefix("+")).join())]; + out += ["Manager (@chmanage): " + ($object_lib.get_name(obj.manager(), 'namef, ['ref])), ._exam_sub("Writer", 1, "@aw/@dw", chop, obj, 'writers, 'literal)]; + if (notfrobby) + out += [._exam_sub("Trusted", 0, "@at/@dt", chop, obj, 'trusted, 'literal), ._exam_sub("Parent", 1, "@ap/@dp", chop, obj, 'parents)]; + if (!notfrobby) { + out += ["Frob Class: " + frob_class(obj)]; + if ((frobhandler = (| frob_handler(obj) |))) + out += ["Frob Handler: " + frobhandler]; + } if (obj.has_ancestor($located)) out += ["Location (@move): " + ($object_lib.get_name(obj.location(), 'namef, ['xref]))]; if ((desc = (| obj.prose() |))) @@ -1057,8 +1078,6 @@ if ((cmds = (| obj.local_commands() |))) out += $command_lib.format_commands_short(#[[obj, cmds]], "Local", .linelen()); return out + ((| obj.examine() |) || []); - - // $#Edited: 31 Jan 97 22:00 $user_vang }; public method .find_object() { @@ -1107,9 +1126,7 @@ if (who.connected()) return out + [(" " + (who.name())) + " is currently connected."]; else - return out + [((((" " + (who.name())) + " was last connected at ") + ($time.format("%r", abs(who.connected_at())))) + " ") + ($time.format("%A %B %e %Y", abs(who.connected_at())))]; - - // $#Edited: 03 Dec 96 01:12 $brad + return out + [((((" " + (who.name())) + " was last connected at ") + ($time.format("%r", abs(who.connected_at())))) + " ") + ($time.format("%A %B %d %Y", abs(who.connected_at())))]; }; protected method .forget_cmd() { @@ -1150,10 +1167,14 @@ if (showdef) showdef = showdef[1]; + catch ~perm { if (type(showdef) == 'objnum) sets = hash s in (showdef.defined_settings()) to ([s[1], showdef]); else sets = target.all_defined_settings(); + } with { + return ["** Permission Denied"]; + } out = sets; for s in (sets) { catch any @@ -1242,7 +1263,7 @@ public method .get_content_type() { arg name, definer; - return content_type; + return content_type || 'plain; }; protected method .get_from_cmd() { @@ -1289,8 +1310,6 @@ return (traceback()[1])[2]; } } - - // $# Edited 05 Nov 1995 13:58 Lynx ($lynx) }; public method .get_global_tell() { @@ -1385,8 +1404,6 @@ case 'seconds: return idle; } - - // $#Edited: 30 Nov 96 21:22 $miro }; root method .init_user() { @@ -1402,7 +1419,7 @@ .set_flags([]); .move_to($body_cave); task_connections = #[]; - formatter = $text_format; + formatter = $plain_format; }; protected method .inventory_cmd() { @@ -1417,8 +1434,6 @@ } else { .tell("You are empty-handed."); } - - // $# Edited 05 Nov 1995 13:54 Lynx ($lynx) }; public method .is_tellable_by() { @@ -1442,7 +1457,7 @@ public method .login() { arg connection; - var loc, cmd, p, c, last; + var loc, cmd, p, c, last, tmp; if ((sender() != this()) || (definer() != caller())) throw(~perm, "Invalid access to private method."); @@ -1454,8 +1469,10 @@ } (| .reset_help_history() |); for p in (parents()) - p.cache_init(); + (| p.cache_init() |); $user_db.did_connect(); + if (reap_notified) + clear_var('reap_notified); last = connected_at; connected_at = time(); last_command_at = time(); @@ -1474,8 +1491,7 @@ (| .edit_sessions_notify() |); .hook_events('startup); $world.hook_into_event('realm_announce); - - // $#Edited: 07 Mar 97 16:29 $miro + context = #[]; }; public method .login_again() { @@ -1493,7 +1509,7 @@ protected method .login_notify(): forked { arg connection, last; - var l, sub, out; + var l, sub, out, ans; sub = .subscribed(); out = []; @@ -1506,7 +1522,7 @@ if ((.last_received_on()) > (((.subscribed())[this()])[1])) .tell("<Mail> You have new mail (use `@help mail` to learn about mail)"); if (last) - .tell("<Login> Last connected at " + ($time.format("%A %B %e %I:%M %p %Y", abs(last)))); + .tell("<Login> Last connected at " + ($time.format("%A %B %d %I:%M %p %Y", abs(last)))); if (failed) { (| .tell(("<Login> ** " + failed) + " failed login attempts **") |); (| clear_var('failed) |); @@ -1547,8 +1563,7 @@ (| .new_list(this()) |); .unhook_events('startup); $world.unhook_from_event('realm_announce); - - // $#Edited: 07 Mar 97 16:29 $miro + (| clear_var('context) |); }; public method .logout_connection() { @@ -1680,9 +1695,7 @@ var match, gend; if ((!str) && (match = (| context['last] |))) { - if (!valid(match)) - context = context.del('last); - else + if (valid(match)) return match; } if ((match = (| (.remembered())[str] |))) { @@ -1716,8 +1729,6 @@ protected method .monitor() { return monitor; - - // $#Edited: 21 Mar 97 20:34 $brandon }; protected method .monitor_cmd() { @@ -1731,7 +1742,7 @@ out = []; len = .linelen(); for e in (monitor || []) { - line = strfmt("%20S %30S ", (e[1]).namef('xref), ((((e[2]) + ".") + (e[4])) + "() line ") + (e[5])) + (e[6]); + line = strfmt("%20S %30S ", (| (e[1]).namef('xref) |) || toliteral(e[1]), ((((e[2]) + ".") + (e[4])) + "() line ") + (e[5])) + (e[6]); if (strlen(line) > len) line = line.chop(len); out += [line]; @@ -1745,8 +1756,6 @@ (| clear_var('monitor) |); return "You are no longer monitoring what you hear."; } - - // $#Edited: 06 May 96 22:09 $lynx }; public method .msg_cmd() { @@ -1756,7 +1765,7 @@ (> .perms(caller(), 'command) <); // it niggles the string enough to 'clean' up little mistakes - [args, opts] = $parse_lib.getopt(args, [["c?lear", 0]]); + [args, opts] = $parse_lib.opt(args, "c?lear"); args = join(args).trim(); clear = "c?lear" in (opts.slice(1)); if ((what = regexp(args, "^([^:=]+): *(.*)$"))) { @@ -1837,8 +1846,6 @@ default: return (> pass(type) <); } - - // $# Edited 28 Oct 1995 21:06 Lynx ($lynx) }; protected method .new_cmd() { @@ -1911,8 +1918,6 @@ return [("Editor invoked with " + ((.active_editor()).session_name())) + ".", "Type 'help' to list available commands."]; else return ["Remote editing invoked."]; - - // $#Edited: 20 Feb 97 20:01 $miro }; protected method .news_cmd() { @@ -1952,14 +1957,16 @@ public method .parse_content_type() { arg value, @args; - var type, types; + var type, types, valid, f; - types = ["plain", "html", "wrap?ped"]; - for type in (types) { - if (match_template(value, type) || match_template(value, "text/" + type)) - return "text/" + strsed(type, "[^a-z]", "", "g"); - } - throw(~check, "Content-type must be one of: " + ((types.prefix("text/")).to_english("", " or "))); + value = strsed(value, "text/", ""); + if (!match_regexp(value, "[^a-z]")) { + if ((| lookup(tosym(value + "_format")) |)) + return tosym(value); + } + valid = $formatter.descendants(); + valid = map f in (valid) to ("text/" + (substr(tostr(f), 2).sed("_format$", ""))).sort(); + throw(~check, "Content-type must be one of: " + (valid.to_english("", " or "))); }; public method .parse_exit_style() { @@ -2065,9 +2072,11 @@ c = .task_connection(); if (!args) { c.local_echo_off(); - while ((!curr) && (curr != "@abort")) + while (!curr) curr = (.prompt("Current Password (@abort to abort): ")).trim(); c.local_echo_on(); + if (curr == "@abort") + return "*** Aborted ***"; } else { curr = args[1]; } @@ -2076,10 +2085,18 @@ if (listlen(args) < 2) { c.local_echo_off(); while (1) { - while ((!new) && (new != "@abort")) + while (!new) new = (.prompt("New Password (@abort to abort): ")).trim(); - while ((!verify) && (verify != "@abort")) + if (new == "@abort") { + c.local_echo_on(); + return "*** Aborted ***"; + } + while (!verify) verify = (.prompt("Retype New Password (@abort to abort): ")).trim(); + if (verify == "@abort") { + c.local_echo_on(); + return "*** Aborted ***"; + } if (new == verify) break; .tell("Passwords do not match!"); @@ -2143,14 +2160,10 @@ public method .personal_fields() { return #[["real-name", 1], ["email", 1], ["address", 1], ["affiliation", 1], ["position", 1], ["location", 1], ["interests", 1], ["plan", 1], ["projects", 1], ["home-page", 0]]; - - // $#Edited: 01 May 96 17:33 $lynx }; protected method .personal_info() { return info || #[]; - - // $#Edited: 01 May 96 17:31 $lynx }; public method .prompt() { @@ -2172,9 +2185,6 @@ if (match_regexp(input, "^(n|no)$")) return 0; return def; - - // $#Edited: 27 Oct 96 16:15 $brandon - // $#Edited: 30 Nov 96 21:22 $miro }; public method .ptell() { @@ -2187,6 +2197,13 @@ ._tell(what); }; +public method .pueblo_cmd() { + arg cmstr, cmd, args; + + (.connections()).mmap('write, "</xch_mudtext><img xch_mode=purehtml>"); + (.connections()).mmap('write, "<h1>Rich-HTML text enabled</h1>"); +}; + protected method .quit_cmd() { arg @args; @@ -2224,7 +2241,7 @@ if (!(.connections())) return 'not_connected; - con = .task_connection(); + con = (| .task_connection() |) || ((.connections())[1]); if (con.is_reading_block()) return 'engaged; [(head ?= ""), (abort_msg ?= "** Aborted **")] = args; @@ -2236,6 +2253,14 @@ return line[1]; }; +public method .reap_notified() { + return reap_notified; +}; + +public method .reap_status() { + return reap_status; +}; + private method .register_name() { arg new; @@ -2257,22 +2282,16 @@ with return (traceback()[1])[2]; return [("Registered alternate name \"" + name) + "\".", ("Registered names: " + (registered.to_english("none"))) + "."]; - - // $#Edited: 25 Nov 96 16:26 $brandon }; private method .registered_cmd() { arg @args; return ("Registered names: " + ((registered || []).to_english("none"))) + "."; - - // $#Edited: 25 Nov 96 16:26 $brandon }; public method .registered_names() { return registered || []; - - // $#Edited: 12 Mar 97 17:37 $brian }; protected method .rehash_cmd() { @@ -2420,8 +2439,6 @@ } with { return (traceback()[1])[2]; } - - // $#Edited: 19 Dec 96 09:52 $brandon }; protected method .reset_parsers() { @@ -2503,6 +2520,8 @@ setting = who.format_setting(name, def, who.get_setting(name, def)); return ["-- Setting changed to:", ((" " + name) + " = ") + setting, "--"]; } with { + if (error() == ~perm) + return "You are not allowed to change settings on " + (who.namef('ref)); return (traceback()[1])[2]; } }; @@ -2516,21 +2535,24 @@ cols = value; }; -public method .set_content_type() { +protected method .set_content_type() { arg name, definer, value; - var sets; + var sets, meth; + + // a touch of Pueblo cruft crap + if ((formatter == $pueblo_format) && (value != 'pueblo)) + (.connections()).mmap('write, "<img xch_mode=text>Rich-HTML disabled"); + content_type = value; + formatter = lookup(tosym(value + "_format")); + meth = tosym("set_content_type_" + value); + if ((| .find_method(meth) |)) + (> .(meth)() <); +}; - switch (value) { - case "text/html": +public method .set_content_type_pueblo(): forked { + .tell("This world is Pueblo 1.10 enhanced."); + .tell("Pueblo is annoyingly proprietary in that it requires this message to be printed, the administration appologizes for the disgustingness of this behaviour."); content_type = 'html; - formatter = $html_format; - case "text/wrapped": - content_type = 'wrapped; - formatter = $wrapped_text_format; - case "text/plain": - content_type = 'plain; - formatter = $text_format; - } }; protected method .set_global_tell() { @@ -2540,8 +2562,6 @@ clear_var('global_tell); else global_tell = 1; - - // $# Edited 20 Oct 1995 13:52 Lynx ($lynx) }; public method .set_name() { @@ -2586,6 +2606,26 @@ password = crypt(str); }; +public method .set_reap_notified() { + arg date; + + (> .perms(sender(), 'system) <); + if (date) + reap_notified = date; + else + (| clear_var('reap_notified) |); +}; + +public method .set_reap_status() { + arg status; + + (> .perms(sender(), 'system) <); + if (status) + reap_status = status; + else + (| clear_var('reap_status) |); +}; + protected method .set_rows() { arg name, definer, value, @args; @@ -2619,6 +2659,7 @@ root method .set_title() { arg name, definer, value; + .perms(sender()); if (strlen(value) > 30) throw(~type, "Titles must be under 30 characters."); title = value; @@ -2643,7 +2684,7 @@ stime = ((strsub($time.to_english(s[3]), " and", ",") + " and ") + ((s[4]) / 1000)) + " milliseconds"; out += ["System lag: " + ($lag_watcher.lag()), "Next dbref: " + ($sys.next_objnum()), "Driver: " + ($sys.server_info('driver_version, 'long)), "Core: " + ($sys.server_info('core_version, 'long)), ("Started: " + ($time.to_english(time() - ($sys.server_info('startup_time))))) + " ago", ("Backup: last: " + ($time.to_english(time() - (s[21])))) + " ago", (" next: " + ($time.to_english((s[22]) - time()))) + " from now", " interval: " + ($time.to_english(s[20]))]; if (!nosys) - out += ["CPU time used: user: " + utime, " system: " + stime, ((("Page: " + (s[9])) + " reclaims ") + (s[10])) + " faults", ((("Context switches: " + (s[17])) + " voluntary ") + (s[18])) + " involuntary", "Signals: " + (s[16])]; + out += ["CPU time used: user: " + utime, " system: " + stime, ((("Page: " + (s[9])) + " reclaims ") + (s[10])) + " faults", ((("Context switches: " + (s[17])) + " voluntary ") + (s[18])) + " involuntary", "Signals: " + (s[16]), "---"]; return out; }; @@ -2680,8 +2721,6 @@ return (traceback()[1])[2]; } } - - // $# Edited 05 Nov 1995 13:58 Lynx ($lynx) }; public method .task_connection() { @@ -2739,8 +2778,6 @@ name = "Object"; .tell((traceback[1]).replace("%O", name)); .tell(traceback.subrange(2)); - - // $#Edited: 10 Dec 96 18:00 $brandon }; public method .test() { @@ -2749,13 +2786,11 @@ out = []; for x in (.look_cmd("", "look", "me")) { if (type(x) == 'frob) - out += [$parse_lib.filter_ctext(x, #[['formatter, $text_format]])]; + out += [$parse_lib.filter_ctext(x, #[['formatter, $plain_format]])]; else out += [x]; } return out; - - // $#Edited: 07 Feb 97 13:24 $brandon }; public method .title() { @@ -2790,10 +2825,6 @@ password = 0; connections = 0; (| $user_db.remove(.name()) |); - - // $#Edited: 08 Jan 96 09:25 Lynx ($lynx) - // $#Edited: 10 Jul 96 01:41 $levi - // $#Edited: 09 Feb 97 13:47 $brad }; private method .unregister_name() { @@ -2803,8 +2834,6 @@ if (!registered) (| clear_var('registered) |); (| $user_db.remove(old) |); - - // $#Edited: 25 Nov 96 16:19 $brandon }; private method .unregister_name_cmd() { @@ -2815,20 +2844,6 @@ with return (traceback()[1])[2]; return [("Unregistered alternate name \"" + name) + "\".", ("Registered names: " + ((registered || []).to_english("none"))) + "."]; - - // $#Edited: 25 Nov 96 16:26 $brandon -}; - -protected method .view_detail_cmd() { - arg cmdstr, cmd, detail; - - (> .perms(caller(), 'command) <); - if ((| (detail = (.location()).get_detail(detail)) |)) - .tell(detail); - else - .tell("No such detail on your location."); - - // $#Edited: 30 Oct 96 23:38 $miro }; protected method .walk_path() { @@ -2858,7 +2873,7 @@ }; protected method .ways_cmd() { - arg cmdstr, cmd; + arg cmdstr, cmd, rest; var exits, e, line, out; (> .perms(caller(), 'command) <); @@ -2868,9 +2883,14 @@ // come up with some settings to configure how to display exits // for now they can deal with the following - out = [("Visible exits from " + ((.location()).name())) + ":"]; + out = []; + if ((.get_setting("exit-style", $user)) == 'none) { + out += ["Visible exits: "]; for e in (exits) out += [(((" " + (e.name())) + ((e.name_templates()) ? ((" (" + ((e.name_templates()).to_english())) + ")") : "")) + " to ") + ((e.dest()).name())]; + } else { + out += (.location()).format_exits(exits, #[['actor, this()]]); + } return out + ["---"]; }; @@ -2912,7 +2932,7 @@ } else if (((line[1])[1]) == "@") { args = ._who_at_place((line[1]).subrange(2)); } else { - args = $parse_lib.getopt(line[1], [["a?ll"], ["p?rogrammers"], ["a?dmins"], ["s?hort"]]); + args = $parse_lib.opt(line[1], "a?ll", "p?rogrammers", "a?dmins", "s?hort"); opts = args[2]; args = args[1]; if ((opt = "a?ll" in (opts.slice(1)))) diff -rwu src-3.0a7/user_db.cdc ColdCore-3.0a9.02/src/user_db.cdc --- src-3.0a7/user_db.cdc Sat Aug 9 19:09:34 1997 +++ ColdCore-3.0a9.02/src/user_db.cdc Tue Aug 19 12:15:21 1997 @@ -13,10 +13,9 @@ var $root inited = 1; var $root managed = [$user_db]; var $root manager = $user_db; -var $root owned = [$user_db]; var $root trusted = [$user]; var $user_db connected = []; -var $user_db invalid_chars = "$#@!^&%~"; +var $user_db invalid_chars = "$#@!^&%~:"; public method .clean_user_db() { var key, db, invalid; @@ -67,8 +66,21 @@ return (> .search(name) <); }; +public method .reserved_names() { + return pass() + ((($smtp.mail_aliases()).keys()).mmap('strip)); +}; + public method .total_connected() { return (.connected()).length(); +}; + +public method .user_dbrefs() { + var db; + + db = .database(); + if (type(db) != 'dictionary) + db = db.to_dict(); + return (db.values()).compress(); }; public method .users() { diff -rwu src-3.0a7/user_info.cdc ColdCore-3.0a9.02/src/user_info.cdc --- src-3.0a7/user_info.cdc Sat Aug 9 19:09:30 1997 +++ ColdCore-3.0a9.02/src/user_info.cdc Tue Aug 19 12:15:19 1997 @@ -10,7 +10,7 @@ var $root inited = 1; var $root managed = [$user_info]; var $root manager = $user_info; -var $root owned = [$user_info]; +var $root trusted_by = [$smtp]; var $user_info info = 0; var $user_info info_defaults = #[["rl-name", 1], ["rl-email", 0], ["rl-address", 0], ["rl-affiliation", 0], ["rl-position", 0], ["rl-location", 0], ["rl-interests", 0], ["rl-plan", 0], ["rl-projects", 0], ["rl-home-page", 1]]; @@ -76,13 +76,11 @@ def = def ? 1 : 0; info_defaults = dict_add(info_defaults, name, def); - - // $#Edited: 26 Sep 96 10:45 $brandon }; public method .set_user_info() { arg name, definer, value, @args; - var tmp, bool, public, def; + var tmp, bool, public, def, valid; def = $user_info.info_defaults(); if (!(def.contains(name))) @@ -100,6 +98,21 @@ } else { public = def[name]; } + + // restrictions + if ((!value) && (name == "rl-email")) + throw(~setting, "You must specify an email address"); + if (name == "rl-email") { + if ($sys.validate_email_addresses()) { + .tell("Verifying Email Address.."); + tmp = (> $smtp.verify_email_address(value) <); + .tell("SMTP Response: " + (tmp.join(" "))); + } else { + (> $smtp.parse_email_address(value) <); + } + } + + // set it if (!info) info = #[]; info = info.add(name, [public, value]); diff -rwu src-3.0a7/user_interfaces.cdc ColdCore-3.0a9.02/src/user_interfaces.cdc --- src-3.0a7/user_interfaces.cdc Sat Aug 9 19:09:29 1997 +++ ColdCore-3.0a9.02/src/user_interfaces.cdc Tue Aug 19 12:15:18 1997 @@ -2,14 +2,12 @@ new object $user_interfaces: $command_cache; var $has_commands shortcuts = #[]; *var $root child_index = '-' user_interfaces.cdc var $root created_on = 796268969; var $root fertile = 1; var $root flags = ['methods, 'code, 'fertile, 'variables, 'core]; var $root inited = 1; var $root managed = [$user_interfaces]; var $root manager = $user_interfaces; -var $root owned = [$user_interfaces]; var $user_interfaces links = 0; public method .interface_link() { @@ -17,8 +15,6 @@ links++; if ((!(.local_cache())) || (!(.remote_cache()))) .rehash_caches(); - - // $#Edited: 03 Dec 96 13:07 $brandon }; public method .interface_unlink() { @@ -28,8 +24,6 @@ .purge_caches(); (| clear_var('links) |); } - - // $#Edited: 03 Dec 96 13:07 $brandon }; diff -rwu src-3.0a7/user_parsers.cdc ColdCore-3.0a9.02/src/user_parsers.cdc --- src-3.0a7/user_parsers.cdc Sat Aug 9 19:09:46 1997 +++ ColdCore-3.0a9.02/src/user_parsers.cdc Tue Aug 19 12:15:36 1997 @@ -1,14 +1,12 @@ new object $user_parsers: $misc; *var $root child_index = '-' user_parsers.cdc var $root created_on = 796268969; var $root fertile = 1; var $root flags = ['methods, 'code, 'fertile, 'core, 'variables]; var $root inited = 1; var $root managed = [$user_parsers]; var $root manager = $user_parsers; -var $root owned = [$user_parsers]; var $root trusted = []; var $user_parsers priority = 0; diff -rwu src-3.0a7/utilities.cdc ColdCore-3.0a9.02/src/utilities.cdc --- src-3.0a7/utilities.cdc Sat Aug 9 19:09:47 1997 +++ ColdCore-3.0a9.02/src/utilities.cdc Tue Aug 19 12:15:17 1997 @@ -1,12 +1,10 @@ new object $utilities: $core; *var $root child_index = '-' utilities.cdc var $root created_on = 796268969; var $root flags = ['methods, 'code, 'core, 'variables]; var $root inited = 1; var $root managed = [$utilities]; var $root manager = $utilities; -var $root owned = [$utilities]; diff -rwu src-3.0a7/void.cdc ColdCore-3.0a9.02/src/void.cdc --- src-3.0a7/void.cdc Sat Aug 9 19:09:31 1997 +++ ColdCore-3.0a9.02/src/void.cdc Tue Aug 19 12:15:20 1997 @@ -2,8 +2,9 @@ new object $void: $place; var $described prose = ["A place existing for the soul purpose of doing so, when it wishes be."]; +var $event_handler hooks = #[]; var $has_name name = ['uniq, "Void", "the Void"]; *var $location contents = ' ' void.cdc var $place entrances = []; var $place exits = []; var $place realm = $realm_of_creation; @@ -12,7 +13,6 @@ var $root inited = 1; var $root managed = [$void]; var $root manager = $void; -var $root owned = [$void]; -var $root settings = #[["propagate", 1]]; +var $root settings = #[["propagate", 0], ["map-position", 0]]; diff -rwu src-3.0a7/wearable_frob.cdc ColdCore-3.0a9.02/src/wearable_frob.cdc --- src-3.0a7/wearable_frob.cdc Sat Aug 9 19:09:32 1997 +++ ColdCore-3.0a9.02/src/wearable_frob.cdc Tue Aug 19 12:15:20 1997 @@ -5,14 +5,12 @@ var $has_commands remote = #[]; var $has_name name = ['normal, "Generic Wearable Frob", "a Generic Wearable Frob"]; var $located location = $lost_and_found; *var $root child_index = '-' wearable_frob.cdc var $root created_on = 796268969; var $root fertile = 1; var $root flags = ['methods, 'code, 'fertile, 'variables, 'core]; var $root inited = 1; var $root managed = [$wearable_frob]; var $root manager = $wearable_frob; -var $root owned = [$wearable_frob]; var $thing gender = 0; protected method .change_data() { @@ -33,17 +31,10 @@ else if (valid(this['location])) (this['location]).add_frob_to_contents((<this(), this>)); return (<this(), this>); - - // $#Edited: 13 Dec 96 19:58 $user_vang - // $#Edited: 16 Dec 96 20:11 $user_vang }; public method .new() { return .to_frob((pass().value()).add('worn, 0)); - - // $#Edited: 13 Dec 96 16:36 $brandon - // $#Edited: 13 Dec 96 19:58 $user_vang - // $#Edited: 16 Dec 96 20:11 $user_vang }; frob method .shed() { @@ -54,9 +45,6 @@ if ((this['worn]) != sender()) throw(~perm, ((("Remove " + (.name(this))) + " from ") + sender()) + "!?"); return .change_data(this, 'worn, 0); - - // $#Edited: 13 Dec 96 19:58 $user_vang - // $#Edited: 16 Dec 96 20:11 $user_vang }; frob method .wear() { @@ -65,9 +53,6 @@ if ((this['location]) != sender()) throw(~perm, ("You are not holding " + (.name(this))) + "."); return .change_data(this, 'worn, sender()); - - // $#Edited: 13 Dec 96 19:58 $user_vang - // $#Edited: 16 Dec 96 20:11 $user_vang }; diff -rwu src-3.0a7/weather.cdc ColdCore-3.0a9.02/src/weather.cdc --- src-3.0a7/weather.cdc Sat Aug 9 19:09:47 1997 +++ ColdCore-3.0a9.02/src/weather.cdc Tue Aug 19 12:15:20 1997 @@ -24,8 +23,6 @@ attr = $weather_attributes.alist_dict(a); extra = hash i in ($weather_attributes.extra_attributes()) to ([i[1], (i[2])[(> .(tosym(i[1]))(a) <)]]); return attr.union(extra); - - // $#Edited: 15 Feb 97 19:22 $miro }; public method .attributes() { diff -rwu src-3.0a7/weather_attributes.cdc ColdCore-3.0a9.02/src/weather_attributes.cdc --- src-3.0a7/weather_attributes.cdc Sat Aug 9 19:09:47 1997 +++ ColdCore-3.0a9.02/src/weather_attributes.cdc Tue Aug 19 12:15:20 1997 @@ -20,8 +20,6 @@ vals = (vals.explode(";")).mmap('trim); attributes = (attributes || #[]).add(name, vals); return ("Defined attributes: " + ((attributes.keys()).to_english())) + "."; - - // $#Edited: 07 Feb 97 04:03 $miro }; public method .add_extra_cmd() { @@ -31,8 +29,6 @@ vals = (vals.explode(";")).mmap('trim); extra_attributes = (extra_attributes || #[]).add(name, vals); return ("Defined extra attributes: " + ((extra_attributes.keys()).to_english())) + "."; - - // $#Edited: 07 Feb 97 04:03 $miro }; public method .alist_dict() { @@ -42,8 +38,6 @@ k = attributes.keys(); v = attributes.values(); return hash i in [1 .. attrlist.length()] to ([k[i], (v[i])[attrlist[i]]]); - - // $#Edited: 08 Feb 97 17:42 $miro }; public method .del_attrib_cmd() { @@ -59,14 +53,10 @@ } else { return name + " not found."; } - - // $#Edited: 07 Feb 97 04:03 $miro }; public method .extra_attributes() { return extra_attributes; - - // $#Edited: 15 Feb 97 18:45 $miro }; public method .list_attribs_cmd() { @@ -76,8 +66,6 @@ a1 = attributes ? map i in (attributes) to ("@awa %l values %l to %l".format(i[1], (i[2]).join(";"), definer())) : []; a2 = extra_attributes ? map i in (extra_attributes) to ("@aea %l values %l to %l".format(i[1], (i[2]).join(";"), definer())) : []; return ["Weather attributes:", @a1, @a2, "---"]; - - // $#Edited: 07 Feb 97 04:03 $miro }; public method .parse_attribute_list() { @@ -105,8 +93,6 @@ if (!(((out.keys()).length()) == (akeys.length()))) throw(~parse, "Missing attributes."); return map i in (akeys) to (out[i]); - - // $#Edited: 08 Feb 97 17:42 $miro }; diff -rwu src-3.0a7/word.cdc ColdCore-3.0a9.02/src/word.cdc --- src-3.0a7/word.cdc Sat Aug 9 19:09:48 1997 +++ ColdCore-3.0a9.02/src/word.cdc Tue Aug 19 12:15:17 1997 @@ -1,9 +1,8 @@ new object $word: $utilities; *var $root child_index = '-' word.cdc var $root created_on = 856377068; -var $root flags = ['variables, 'methods, 'code, 'core]; +var $root flags = ['variables, 'methods, 'code, 'core, 'fertile]; var $root help_node = $help_sys_word; var $root inited = 1; var $root managed = [$word]; @@ -99,8 +98,6 @@ } set_var(what, out); return get_var(what); - - // $#Edited: 19 Feb 97 11:53 $brandon }; public method .submit_chances() { diff -rwu src-3.0a7/world.cdc ColdCore-3.0a9.02/src/world.cdc --- src-3.0a7/world.cdc Sat Aug 9 19:09:48 1997 +++ ColdCore-3.0a9.02/src/world.cdc Tue Aug 19 12:15:17 1997 @@ -2,35 +2,66 @@ new object $world: $utilities, $event_handler; var $event_handler events = 0; -var $event_handler hooked = #[[$daemon, ['realm_announce]]]; -var $event_handler hooks = #[['realm_announce, [#-12397, $daemon]]]; +var $event_handler hooked = #[]; +var $event_handler hooks = #[]; var $root created_on = 850845715; +var $root defined_settings = #[["managed", #[['parse, ['is_type, 'list, 'objnum]]]], ["starting-place", #[['parse, ['is_type, 'objnum]]]], ["heartbeat-rate", #[['parse, ['is_type, 'integer]]]], ["weather-rate", #[['parse, ['is_type, 'integer]]]]]; var $root flags = ['variables, 'methods, 'code, 'core]; var $root inited = 1; var $root managed = [$world]; var $root manager = $world; +var $root settings = #[["managed", []], ["starting-place", $the_pit], ["heartbeat-rate", 600], ["weather-rate", 1500]]; var $root trusted = [$realm]; -var $world starting_place = $the_pit; +var $world last_weather_change = 872012808; + +root method .core_world() { + .set_setting("managed", $world, "[]"); + .set_setting("starting-place", $world, $the_pit); +}; + +public method .pulse() { + var i, d, weather_ticked, t; + + (> .perms(sender(), $heart) <); + t = time(); + weather_ticked = 0; + if (t >= (last_weather_change + (.get_setting("weather-rate", $world)))) { + weather_ticked = 1; + last_weather_change = t; + } + for i in (.get_setting("managed", $world)) { + pause(); + catch any { + i.advance_weather(weather_ticked); + } with { + (| (i.manager()).tell_traceback(traceback()) |); + (| (i.manager()).tell(("Weather change failed for " + i) + ".") |); + } + } +}; public method .send_event() { arg @args; (> .perms(caller(), 'trusts) <); pass(@args); - - // $#Edited: 07 Mar 97 16:32 $miro }; public method .shutdown() { - // $#Edited: 16 Feb 97 10:46 $user_vang + (> .perms(sender(), 'manager) <); + $heart.del_heartbeat(); }; public method .starting_place() { - return starting_place || $body_cave; - - // $#Edited: 17 Dec 96 11:04 $brandon + return (| .get_setting("starting-place", $world) |) || $body_cave; }; -public method .startup(); +public method .startup() { + arg @args; + + (> .perms(sender(), 'manager) <); + $heart.add_heartbeat(.get_setting("heartbeat-rate", $world)); + last_weather_change = 0; +}; diff -rwu src-3.0a7/world_time.cdc ColdCore-3.0a9.02/src/world_time.cdc --- src-3.0a7/world_time.cdc Sat Aug 9 19:09:47 1997 +++ ColdCore-3.0a9.02/src/world_time.cdc Tue Aug 19 12:15:36 1997 @@ -1,5 +1,5 @@ -new object $world_time: $libraries; +new object $world_time: $foundation; var $root created_on = 848446570; var $root flags = ['variables, 'methods, 'code, 'core]; @@ -11,6 +11,14 @@ var $world_time time_units = [[31536000, "year", "years", "yr", "yrs"], [2592000, "month", "months", "mo", "mos"], [604800, "week", "weeks", "wk", "wks"], [86400, "day", "days", "dy", "dys"], [3600, "hour", "hours", "hr", "hrs"], [60, "minute", "minutes", "min", "mins"], [1, "second", "seconds", "sec", "secs"]]; var $world_time zone_offset = 0; +public method .current_season() { + var t; + + // This is not very flexible, but works well enough. Note that southern + // hemisphere needs another object, with opposite seasons. + return ["spring", "summer", "fall", "winter"][(((.local_time()) / 172800) % 4) + 1]; +}; + public method .daytime() { arg zone, dayscale; var t, t1, t2; @@ -38,8 +46,6 @@ case 23: return [t, 'night, 'night]; } - - // $#Edited: 22 Dec 96 15:49 $miro }; public method .from_english() { @@ -49,7 +55,11 @@ [(units ?= time_units)] = units; words = string.explode(); words = words.setremove_all(["and"]); - len = words.length(); + if (listlen(words) == 1) { + if (!(words = regexp(words[1], "^([0-9]+)(.*)$"))) + throw(~args, "Invalid time."); + } + len = listlen(words); if (len % 2) throw(~args, "Invalid time."); nsec = (n = 0); @@ -70,8 +80,6 @@ } } return nsec; - - // $#Edited: 06 Mar 97 08:27 $miro }; public method .from_unit_list() { @@ -86,14 +94,10 @@ time = time % ((time_units[i])[1]); } return s.to_english(); - - // $#Edited: 06 Mar 97 08:27 $miro }; public method .local_time() { return (time() - start_time) * speedup; - - // $#Edited: 19 Nov 96 18:40 $miro }; public method .parse_unit() { @@ -102,14 +106,10 @@ [(units ?= time_units)] = units; return find i in [1 .. units.length()] where (unit in ((units[i]).subrange(2))) || throw(~invarg, "Invalid time."); - - // $#Edited: 06 Mar 97 08:27 $miro }; public method .time_units() { return time_units; - - // $#Edited: 19 Nov 96 18:50 $brandon }; diff -rwu src-3.0a7/wrap_filter.cdc ColdCore-3.0a9.02/src/wrap_filter.cdc --- src-3.0a7/wrap_filter.cdc Sat Aug 9 19:09:47 1997 +++ ColdCore-3.0a9.02/src/wrap_filter.cdc Tue Aug 19 12:15:37 1997 @@ -6,7 +6,6 @@ var $root inited = 1; var $root managed = [$wrap_filter]; var $root manager = $wrap_filter; -var $root owned = [$wrap_filter]; public method .filter_text() { arg input; --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/adapter.cdc Tue Aug 19 12:15:37 1997 @@ -0,0 +1,33 @@ + +new object $adapter: $misc; + +var $dmi_data descriptions = #[]; +var $root created_on = 863769089; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$adapter]; +var $root manager = $adapter; + +public method .process_args() { + arg given_args, takes_args; + var final_args, converter, this_arg, this_arg_data, arg_list; + + final_args = #[]; + for this_arg in (takes_args.keys()) { + this_arg_data = takes_args[this_arg]; + if (!(given_args.contains(this_arg))) { + if ((this_arg_data[1]) != []) + final_args = final_args.add(this_arg, (this_arg_data[1])[1]); + else + throw(~missingarg, ("Argument " + this_arg) + " was not specified."); + } else if (((this_arg_data[2]).length()) == 3) { + converter = this_arg_data[2]; + final_args = final_args.add(this_arg, (> (converter[1]).(converter[2])(given_args[this_arg], @converter[3]) <)); + } else { + final_args = final_args.add(this_arg, given_args[this_arg]); + } + } + return final_args.add('arg_list, given_args.keys()); +}; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/ansi_format.cdc Tue Aug 19 12:15:17 1997 @@ -0,0 +1,141 @@ + +new object $ansi_format: $plain_format; + +var $ansi_format bcolors = #[["black", "40"], ["red", "41"], ["green", "42"], ["yellow", "43"], ["blue", "44"], ["magenta", "45"], ["cyan", "46"], ["white", "47"]]; +var $ansi_format colors = #[["black", "30"], ["red", "31"], ["green", "32"], ["yellow", "33"], ["blue", "34"], ["magenta", "35"], ["cyan", "36"], ["white", "37"]]; +var $dmi_data descriptions = #[]; +var $root created_on = 863402529; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$ansi_format]; +var $root manager = $ansi_format; + +public method .do_detail() { + arg vars, flags, args; + + return [("\A1;4m" + (flags.getkey("name"))) + "\A0m", vars]; +}; + +public method .do_font() { + arg vars, flags, args; + var color, bcolor, code, nested, current; + + // allow other .do_* methods to call this with a specific code + if (dict_contains(vars, 'ansi_code)) { + code = vars['ansi_code]; + vars = dict_del(vars, 'ansi_code); + } else { + color = (| flags.getkey("color") |); + bcolor = (| flags.getkey("bcolor") |); + code = (color ? (| ($cml_color.get_color(color))[2] |) : "") || ""; + code += (bcolor ? (code ? (| ";" + (($cml_color.get_color(bcolor))[3]) |) : (| ($cml_color.get_color(bcolor))[3] |)) : "") || ""; + } + if (code) { + code = ("\A" + code) + "m"; + + // handle existing nesting + if (dict_contains(vars, 'ansi_color)) { + current = vars['ansi_color]; + nested++; + } + vars = dict_add(vars, 'ansi_color, code); + } + [args, vars] = ._eval_ctext(args, vars); + if (code) { + if (nested) { + args = ((("\A0m" + code) + args) + "\A0m") + current; + vars = dict_add(vars, 'ansi_color, current); + } else { + args = (code + args) + "\A0m"; + vars = dict_del(vars, 'ansi_color); + } + } + return [args, vars]; +}; + +public method .do_link() { + arg vars, flags, args; + + vars = dict_add(vars, 'ansi_code, "1;4"); + return .do_font(vars, flags, args); +}; + +public method .explode_ansi() { + arg line; + var m, out; + + out = []; + while (line) { + if ((m = match_regexp(line, "\\\A[^a-z]+[a-z]"))) { + m = m[1]; + out += [substr(line, 1, (m[1]) - 1), substr(line, m[1], m[2])]; + line = substr(line, (m[1]) + (m[2])); + } else { + out += [line]; + break; + } + } + return out; +}; + +public method .format() { + arg data, vars; + var str, len, line, out; + + str = (> (._eval_ctext(data, vars))[1] <); + if ((strlen(str) < 2) || (substr(str, strlen(str) - 1) != "\n")) + str += "\n"; + + // ugly and inneficient--use a client people + out = str_to_buf(str); + out = out.bufsub(`[92, 65], `[27, 91]); + return out; +}; + +public method .hold_rewrap_lines() { + arg vars, str, prefix; + var s, p, n, firstline; + + s = []; + n = (vars['width]) + (prefix.length()); + for str in (str.explode("\n", 1)) + s += .wrap_lines(str, n, prefix, 1); + return s.join("\n"); +}; + +public method .hold_wrap_lines() { + arg str, len, @stuff; + var prefix, firstline, split_str, ansi_parts, output, plen, hide_len, x, tlen, cutoff, tstr; + + // takes string and wraps it by words, compared to length, returns a list. + [(prefix ?= ""), (firstline ?= 0)] = stuff; + split_str = .explode_ansi(str); + str = ""; + x = 1; + tlen = 1; + ansi_parts = []; + while (x < (split_str.length())) { + str += split_str[x]; + ansi_parts = ansi_parts.add([tlen, split_str[x + 1]]); + tlen += strlen(str); + x += 2; + } + if (firstline) + str = prefix + str; + output = []; + plen = strlen(prefix); + while (strlen(str) > len) { + cutoff = stridx(substr(str, 1, len), " ", -1); + if (cutoff <= plen) { + tstr = substr(str, 1, len); + str = prefix + substr(str, len + 1); + } else { + tstr = substr(str, 1, cutoff - 1); + str = prefix + substr(str, cutoff + 1); + } + output += tstr; + } + return output + [str]; +}; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/bug_handler.cdc Tue Aug 19 12:15:17 1997 @@ -0,0 +1,97 @@ + +new object $bug_handler: $misc, $has_name; + +var $bug_handler ticker = 0; +var $bug_handler ticket = 30; +var $bug_handler unclaimed_tally = 4; +var $dmi_data descriptions = #[]; +var $has_name name = ['uniq, "Bug Report Handler", "the Bug Report Handler"]; +var $root created_on = 866643320; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$bug_handler]; +var $root manager = $bug_handler; +var $root quota_exempt = 1; + +public method .add_bug() { + arg category, title, reporter, text; + var bug; + + // Spawn a new bug and fill it with information: + // Create a new bug object: + if (!(category.is($bug_report))) + throw(~stop, "Category must be a descendant of $bug_report."); + bug = category.spawn(); + if (!bug) + throw(~stop, "Unable to spawn new bug object!"); + + // Set the bug information: + bug.set_reporter(reporter); + bug.set_text(text); + bug.set_ticket_number(.ticket()); + .increase_ticket(); +}; + +public method .calculate_owned_by() { + arg who; + var category, bug, tally; + + // Return the number of bugs owned by 'who': + tally = 0; + for category in ($bug_handler.categories()) { + for bug in (category.children()) { + if ((!(bug.fixed())) && ((bug.owner()) == who)) + tally++; + refresh(); + } + } + return tally; +}; + +public method .categories() { + // Why? I don't know: + return $bug_report.children(); +}; + +public method .dismiss() { + arg what; + + what.chparents($dismissed_bugs); +}; + +public method .increase_ticket() { + ticket++; +}; + +public method .info() { + var cat, repnum; + + // Report information on the bug handler: + repnum = 0; + for cat in (.categories()) + repnum = repnum + ((cat.children()).length()); + return ["Next Ticket Number: " + tostr(ticket), "Total Categories: " + tostr((.categories()).length()), "Total Bug Reports: " + tostr(repnum)]; +}; + +public method .rehash_unclaimed_tally() { + var category, bug; + + unclaimed_tally = 0; + for category in ($bug_handler.categories()) { + for bug in (category.children()) { + if ((!(bug.fixed())) && (!(bug.owner()))) + unclaimed_tally++; + refresh(); + } + } +}; + +public method .ticket() { + return ticket; +}; + +public method .unclaimed_tally() { + return unclaimed_tally; +}; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/cml_color.cdc Tue Aug 19 12:15:17 1997 @@ -0,0 +1,26 @@ + +new object $cml_color: $utilities; + +var $cml_color colors = #[["black", ["000000", "30", "40"]], ["red", ["ff0000", "31", "41"]], ["green", ["00ff00", "32", "42"]], ["yellow", ["ffff00", "33", "43"]], ["blue", ["0000ff", "34", "44"]], ["magenta", ["ff00ff", "35", "45"]], ["cyan", ["00ffff", "36", "46"]], ["white", ["ffffff", "37", "47"]]]; +var $dmi_data descriptions = #[]; +var $root created_on = 863559837; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$cml_color]; +var $root manager = $cml_color; + +public method .fmt_colors() { + var c, out; + + out = ["COLOR RGB ANSI"]; + for c in (colors) + out += [strfmt("%12 #%6l %3l", c[1], @c[2])]; +}; + +public method .get_color() { + arg color; + + return colors[color]; +}; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/cml_lib.cdc Tue Aug 19 12:15:37 1997 @@ -0,0 +1,91 @@ + +new object $cml_lib: $libraries; + +var $cml_lib br = <$format, ["br", [], [], 'do_br]>; +var $cml_lib hr = <$format, ["hr", [], [], 'do_hr]>; +var $cml_lib p = <$format, ["p", [], [], 'do_p]>; +var $cml_lib sep = <$format, ["hr", [["sep", "3"]], [], 'do_hr]>; +var $dmi_data descriptions = #[]; +var $root created_on = 863748283; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$cml_lib]; +var $root manager = $cml_lib; + +public method .format_br_tag() { + return br; +}; + +public method .format_hr_tag() { + return hr; +}; + +public method .format_invoke_tag() { + arg object, method, name; + + return (<$format, ["invoke", [["object", object], ["method", method]], [name], 'do_invoke]>); +}; + +public method .format_obj_tag() { + arg context, object, name, @options; + + if (options) + return (<$format, ["obj", [["context", context], ["options", options[1]], ["name", name]], [object], 'do_obj]>); + else + return (<$format, ["obj", [["context", context], ["name", name]], [object], 'do_obj]>); +}; + +public method .format_p_tag() { + return p; +}; + +public method .format_pre_tag() { + arg args; + + return (<$format, ["pre", [], [args], 'do_pre]>); +}; + +public method .format_sep_tag() { + return sep; +}; + +public method .format_subj_tag() { + arg text, @level; + + [(level ?= 4)] = level; + return (<$format, ["subj", [["level", level]], [text], 'do_subj]>); +}; + +public method .format_table_tag() { + arg cols, @contents; + + return (<$format, ["table", [["cols", cols]], contents, 'do_table]>); +}; + +public method .format_td_tag() { + arg contents, @spanning; + var span; + + return (<$format, ["td", spanning, [contents], 'do_td]>); +}; + +public method .format_tr_tag() { + arg @contents; + + return (<$format, ["tr", [], contents, 'do_tr]>); +}; + +public method .generate_english_tag() { + arg list; + + return (<$generator, ["english", [], list, 'gen_english]>); +}; + +public method .generate_join_tag() { + arg list, @sep; + + [(sep ?= ", ")] = sep; + return (<$generator, ["join", [["separator", sep]], list, 'gen_join]>); +}; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/converters.cdc Tue Aug 19 12:15:37 1997 @@ -0,0 +1,72 @@ + +new object $converters: $libraries; + +var $dmi_data descriptions = #[]; +var $root created_on = 863769001; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$converters]; +var $root manager = $converters; + +public method .parse_ref() { + arg ref, object, flags; + var lookup_result; + + if ((ref[1]) != "$") + ref = "$" + ref; + lookup_result = (> $parse_lib.ref(ref, $user) <); + if ((lookup_result[1]) in flags) + return lookup_result; + else + throw(~type, "Reference was of the improper type"); +}; + +public method .parse_textarea() { + arg string; + + string = (string.replace($http.decode("%0d"), "")).explode($http.decode("%0a"), 1); + return string; +}; + +public method .to_boolean() { + arg string, @extra; + + return ((string[1]) == "y") ? 1 : 0; +}; + +public method .to_help_node() { + arg string; + var obj; + + catch ~objnf + obj = (> .to_object(string) <); + with + obj = (> .to_object("help_" + string) <); + if (obj.is($help_node)) + return obj; + else if (obj.help_node()) + return obj.help_node(); + else + throw(~invobj, string + " is not a help node and doesn't have an assigned help node."); +}; + +public method .to_num() { + arg number; + + return (> toint(number) <); +}; + +public method .to_object() { + arg string, @required_parent; + var object, parent; + + [(parent ?= $root)] = required_parent; + object = (| $object_lib.to_dbref(string) |); + if (!object) + throw(~objnf, ("Object " + string) + " not found."); + if (!(object.has_ancestor(parent))) + throw(~invobj, ((("Object " + string) + ", doesn't have the ancestor, ") + parent) + "."); + return object; +}; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/dir_desktop.cdc Tue Aug 19 12:15:37 1997 @@ -0,0 +1,14 @@ + +new object $dir_desktop: $directories; + +var $directories default_page = $page_desktop_login; +var $directories entries = #[["web_prefs", $page_web_prefs]]; +var $directories lock = [$security_lib, 'bounce_to_auth, ["/login"]]; +var $dmi_data descriptions = #[]; +var $root created_on = 864277943; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$dir_desktop]; +var $root manager = $dir_desktop; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/directories.cdc Tue Aug 19 12:15:37 1997 @@ -0,0 +1,142 @@ + +new object $directories: $core; + +var $directories default_page = $page_root_index; +var $directories entries = #[["home", $page_home_index], ["bin", $page_bin_index], ["~", $page_home_index], ["desktop", $dir_desktop], ["images", $page_file_index], ["login", $page_login]]; +var $directories lock = 0; +var $dmi_data descriptions = #[]; +var $root created_on = 863765302; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$directories]; +var $root manager = $directories; + +public method .build_footer() { + arg header, info, args; + + return ["<hr size=1 noshade><a href=\"/\">the Cold Dark</a></body>"]; +}; + +public method .build_header() { + arg header, info, args, @title; + var body; + + [(title ?= "the Cold Dark")] = title; + body = "<body bgcolor=\"#ffffff\" text=\"#000000\" link=\"#130191\" vlink=\"#100040\" alink=\"#4000bf\">"; + return ["<head>", ("<title>" + title) + "</title>", "</head>", body]; +}; + +root method .core_directories() { + var elem; + + for elem in (entries) { + if (!valid(elem[2])) + entries = entries.del(elem[1]); + } +}; + +public method .default_page() { + return default_page; +}; + +public method .entry() { + arg str; + + return (> entries[str] <); +}; + +public method .find_page() { + arg orig_url, interface; + var found, script_name, url, dir, page, lock, meth, obj; + + script_name = ""; + url = orig_url.explode("/"); + if ((| ((url[1])[1]) == "~" |)) + url = ["~", (url[1]).subrange(2), @url.subrange(2)]; + dir = $directories; + page = $directories; + if ((url.length()) == 2) { + if ((| (obj = $object_lib.to_dbref(url[1])) |)) { + page = obj; + script_name += "/" + (url[1]); + url = url.subrange(2); + if ((| (meth = tosym(url[1])) |)) { + if ((| page.find_method(meth) |)) { + interface.set_info('generate, meth); + script_name += "/" + (url[1]); + url = url.subrange(2); + found = 1; + if ((page.is($page)) && (page.get_lock())) + lock = page; + } else { + return 'pagenf; + } + } else { + return 'pagenf; + } + } + } + if (!found) { + if (dir.get_lock()) + lock = dir; + catch ~keynf { + while (url && (page.is($directories))) { + page = dir.entry(url[1]); + script_name += "/" + (url[1]); + url = url.subrange(2); + if (page.get_lock()) + lock = page; + if (page.is($directories)) + dir = page; + } + } + if (page.is($directories)) { + if ((!url) && ((orig_url.last()) != "/")) { + return ['redirect, orig_url + "/"]; + } else { + if (url) + return 'pagenf; + page = page.default_page(); + if (page.get_lock()) + lock = page; + } + } + if (url && (| (meth = tosym(url[1])) |)) { + if ((| page.find_method(meth) |)) { + interface.set_info('generate, meth); + script_name += "/" + (url[1]); + url = url.subrange(2); + } else { + interface.set_info('generate, 'generate); + } + } else { + interface.set_info('generate, 'generate); + } + } + interface.set_info('script_name, script_name); + interface.set_info('path_info, "/" + (url.join("/"))); + interface.set_info('directory_object, dir); + interface.set_info('lock_object, lock); + return page; +}; + +public method .get_lock() { + return lock; +}; + +public method .get_realm() { + return "the Cold Dark"; +}; + +root method .init_directories() { + entries = #[]; + default_page = $page_root_index; +}; + +root method .uninit_directories() { + lock = 0; + entries = 0; + default_page = 0; +}; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/dmi_data.cdc Tue Aug 19 12:15:16 1997 @@ -0,0 +1,73 @@ + +new object $dmi_data: $root; + +var $dmi_data descriptions = #[]; +var $root created_on = 860904004; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$dmi_data]; +var $root manager = $dmi_data; + +public method .add_data_to_method() { + arg method, identifier, @data; + var method_data, identifier_data; + + method_data = (| descriptions[method] |) || #[]; + if ((data.length()) == 1) { + method_data = method_data.add(identifier, @data); + } else if ((data.length()) == 2) { + identifier_data = (| method_data[identifier] |) || #[]; + identifier_data = identifier_data.add(data[1], data[2]); + method_data = method_data.add(identifier, identifier_data); + } + descriptions = descriptions.add(method, method_data); +}; + +public method .add_description_to_db() { + arg method, description; + + descriptions ?= #[]; + descriptions = (> descriptions.add(method, description) <); +}; + +public method .del_data_from_method() { + arg method, identifier, @data; + var method_data, identifier_data; + + method_data = (| descriptions[method] |) || #[]; + if ((data.length()) == 0) { + (| (method_data = method_data.del(identifier)) |); + } else if ((data.length()) == 1) { + identifier_data = (| method_data[identifier] |) || #[]; + (| (identifier_data = identifier_data.del(data[1])) |); + method_data = method_data.add(identifier, identifier_data); + } + descriptions = descriptions.add(method, method_data); +}; + +public method .del_description_from_db() { + arg method; + + descriptions = (| descriptions.del(method) |); +}; + +public method .describe_method() { + arg method; + + return (> descriptions[method] <); +}; + +root method .init_dmi_data() { + descriptions = #[]; +}; + +root method .uninit_dmi_data() { + var i; + + descriptions ?= #[]; + for i in (descriptions.keys()) + $interface_registry.del_description(this(), i); + descriptions = 0; +}; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/dmi_data_ui.cdc Tue Aug 19 12:15:19 1997 @@ -0,0 +1,210 @@ + +new object $dmi_data_ui: $user_interfaces; + +var $dmi_data descriptions = #[]; +var $has_commands local = \ + #[["@verbal-index", [["@verbal-index", "", "@verbal-index", 'verbal_index_cmd, #[]]]], ["@dmethod", [["@dmethod", "*", "@dmethod <objref>", 'describe_method_english_cmd, #[[1, ['objref, []]]]]]],\ + ["@add-arg",\ + [["@add-arg", "*", "@add-arg <objref: +converter +converter-args +default +name>", 'add_arg_cmd, #[[1, ['objref_opt, ["converter", "converter-args", "default", "name"]]]]]]],\ + ["@del-arg",\ + [["@del-arg", "*", "@del-arg <objref: +name>", 'del_arg_cmd, #[[1, ['objref_opt, ["name"]]]]]]]]; +var $has_commands remote = #[]; +var $has_commands shortcuts = #[]; +var $root created_on = 861514233; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$dmi_data_ui]; +var $root manager = $dmi_data_ui; + +public method ._get_opt() { + arg opt, type, opts, dict; + var i, value, m; + + if (!(i = opt in (opts.slice(1)))) + return dict; + value = (opts[i])[4]; + if (!value) + throw(~stop, ("No value for option \"" + opt) + "\"."); + catch any { + switch (type) { + case 'string: + value = [value]; + case 'objref: + value = (> $parse_lib.ref(value) <); + case 'symbol: + value = [(> value.to_symbol() <)]; + case 'data_list: + value = (> fromliteral(value) <); + if (type(value) != 'list) + value = [value]; + } + } with { + rethrow(~stop); + } + opt = opt.strip("?"); + if ((m = match_pattern(opt, "*-args"))) { + opt = tosym(m[1]); + if (!dict_contains(dict, opt)) + throw(~stop, ((("Arguments defined for " + opt) + " without defining ") + opt) + " method."); + value = [dict[opt], [@value]]; + return dict_add(dict, opt, value); + } else { + return dict_add(dict, tosym(opt), value); + } +}; + +public method .add_arg_cmd() { + arg cmd, cmstr, args; + var opts, argname, argdefault, argconverter, object, method, config, objref, argconverterargs; + + object = (args[1])[2]; + method = tosym((args[1])[4]); + opts = args[3]; + config = #[]; + config = (> ._get_opt("name", 'string, opts, config) <); + config = (> ._get_opt("default", 'data_list, opts, config) <); + config = (> ._get_opt("converter", 'objref, opts, config) <); + config = (> ._get_opt("converter-args", 'data_list, opts, config) <); + argname = (| config['name] |); + if (!argname) + return "Must specify the name of the argument to add"; + if (argname) + [argname] = argname; + argdefault = (| config['default] |) || []; + objref = (| config['converter] |) || []; + argconverterargs = []; + if (objref && (type(objref[1]) == 'list)) { + argconverterargs = objref[2]; + objref = objref[1]; + } + argconverter = [objref[2], tosym(objref[4]), argconverterargs]; + (> .dmi_add_arg(object, method, argname, argdefault, argconverter) <); + return .arg_description_to_english(argname, ((object.describe_method(method))['args])[argname]); + return ("Argument, " + argname) + ", successfully added. Mail Bruce to have this give the definition of the argument."; +}; + +public method .arg_description_to_english() { + arg arg_name, arg_description; + var str_list, converter, default_value, converter_arg; + + str_list = ["Arg: " + arg_name]; + default_value = arg_description[1]; + converter = arg_description[2]; + if (default_value != []) + str_list += [" Default: " + toliteral(default_value[1])]; + else + str_list += [" Default: None."]; + if ((converter.length()) == 3) + str_list += [(((((" Converter: " + tostr(converter[1])) + ".") + tostr(converter[2])) + "( <arg value>, ") + (map converter_arg in (converter[3]) to (toliteral(converter_arg)).join(", "))) + ")"]; + else + str_list += [" Converter: None."]; + return str_list; +}; + +public method .del_arg_cmd() { + arg cmd, cmstr, args; + var opts, argname, argdefault, argconverter, object, method, config, objref, argconverterargs; + + object = (args[1])[2]; + method = tosym((args[1])[4]); + opts = args[3]; + config = #[]; + config = (> ._get_opt("name", 'string, opts, config) <); + argname = (| config['name] |); + if (!argname) + return "Must specify the name of the argument to add"; + if (argname) + [argname] = argname; + (> .dmi_del_arg(object, method, argname) <); + return ("Argument, " + argname) + ", successfully deleted."; +}; + +public method .describe_method_english_cmd() { + arg cmdstr, cmd, args; + var i, pattern, ref, methods, s, def, method, opts, str, m, d, out, type; + + (> .perms(caller(), 'command) <); + ref = args; + if ((ref[1]) == 'variable) + return ((("The reference " + (ref[3])) + ",") + ((ref[4]) || "")) + " is not for a method."; + if ((ref[1]) == 'object) + return ("The reference " + (ref[3])) + " is not for a method."; + def = (| (ref[2]).find_method(tosym(ref[4])) |); + if (def) { + pattern = ref[4]; + methods = [tosym(ref[4])]; + } else { + if (ref[4]) + pattern = ref[4]; + else + pattern = .get_setting("match-default", $programmer); + def = ref[3]; + m = .get_setting("match-with", $programmer); + methods = []; + for method in (def.methods()) { + if (tostr(method).(m)(pattern)) + methods += [method]; + } + if (!methods) + return .tell((("No method found matching " + def) + ".") + pattern); + } + cmd = .get_setting("@program-options", $programmer); + out = []; + for method in (methods) + out += .method_description_to_english(def, method); + return out; +}; + +public method .dmi_add_arg() { + arg object, method, argument, default_value, converter; + var defining_object; + + catch ~matchnf { + defining_object = $interface_registry.where_is(object, method); + } with { + if (object.is($page)) + defining_object = object; + else + rethrow(error()); + } + (> defining_object.add_data_to_method(method, 'args, argument, [default_value, converter]) <); +}; + +public method .dmi_del_arg() { + arg object, method, argument; + var defining_object; + + defining_object = (> $interface_registry.where_is(object, method) <); + (> defining_object.del_data_from_method(method, 'args, argument) <); +}; + +public method .method_description_to_english() { + arg object, method; + var args, argument, argname, argorder, str_list, description; + + description = (> $interface_registry.describe(object, method) <); + args = description['args]; + argorder = (| description['arg_order] |) || (args.keys()); + str_list = [((("Method: " + tostr(object)) + ".") + tostr(method)) + "()"]; + str_list += ["Authentication: " + toliteral((| description['auth] |) || "unspecified")]; + for argument in (argorder) + str_list += .arg_description_to_english(argument, args[argument]); + str_list += ["---"]; + return str_list; +}; + +public method .set_auth() { + arg object, method, authorization_data; + var defining_object; + + defining_object = (> $interface_registry.where_is(object, method) <); + (> defining_object.add_data_to_method(method, 'auth, authorization_data) <); +}; + +public method .verbal_index_cmd() { + arg cmdstr, cmd; + + sender().tell($interface_registry.verbal_index()); +}; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/dns.cdc Tue Aug 19 12:15:36 1997 @@ -0,0 +1,218 @@ + +new object $dns: $network; + +var $dmi_data descriptions = #[]; +var $dns async = 0; +var $dns connection = 0; +var $dns dnshost = ["127.0.0.1", 1153]; +var $dns started = 0; +var $dns starting = 0; +var $dns valid_host_regexp = "^([-a-z0-9]+\.)+(gov|edu|com|org|int|mil|net|nato|arpa|[a-z][a-z])$"; +var $dns valid_ip_regexp = "([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)"; +var $root created_on = 867779129; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$dns]; +var $root manager = $dns; +var $root trusted_by = [$outbound_connection]; + +public method .connection_going_away() { + arg host, port; + + if (sender() != connection) + return; + started = 0; + if (!starting) + .restart(); +}; + +public method .connection_starting() { + arg host, port; + +}; + +public method .core_dns() { + async = 0; + connection = 0; + starting = 0; + started = 0; +}; + +public method .hostname() { + arg ip; + var c, line, result; + + if (!ip) + return pass(); + if (!match_regexp(ip, valid_ip_regexp)) + throw(~invip, "Invalid IP Address: " + ip); + if (!async) + return pass(ip); + if (!valid(connection)) { + if (!(.restart())) + return pass(ip); + } + connection = connection.write((task_id() + ":N:") + ip); + result = $scheduler.suspend(this()); + if ((type(result) != 'list) || (listlen(result) != 2)) + return ""; + switch (result[1]) { + case "N": + throw(~address, result[2]); + case "F": + throw(~failed, result[2]); + case "G": + return result[2]; + default: + $sys.log("DNS ERROR: Invalid result: " + (result.join(":"))); + } +}; + +public method .ip() { + arg hostname; + var c, line, result; + + if (!hostname) + return pass(); + if ((hostname != "localhost") && (!match_regexp(hostname, valid_host_regexp))) + throw(~address, ("Invalid Internet Address: \"" + hostname) + "\""); + if (!async) + return pass(hostname); + if (!valid(connection)) { + if (!(.restart())) + return pass(hostname); + } + connection = connection.write((task_id() + ":R:") + hostname); + result = $scheduler.suspend(this()); + if ((type(result) != 'list) || (listlen(result) != 2)) + return ""; + switch (result[1]) { + case "N": + throw(~address, result[2]); + case "F": + throw(~failed, result[2]); + case "G": + return result[2]; + default: + $sys.log("DNS ERROR: Invalid result: " + (result.join(":"))); + } +}; + +public method .parse_line() { + arg line; + var m, task, code, info; + + (> .perms(caller(), $connection) <); + if ((m = regexp(line, "^([0-9]+):([a-z]):(.*)$"))) { + [task, code, info] = m; + task = toint(task); + catch any { + $scheduler.resume(task, [code, info]); + } with { + $sys.log("DNS ERROR: "); + $sys.log($parse_lib.traceback(traceback())); + } + } else { + $sys.log("DNS ERROR: Invalid Result from server: " + line); + } +}; + +public method .restart() { + if (starting || (!started)) + return 0; + connection = 0; + catch any { + (> .startup_dns() <); + $sys.log("** Restarting async DNS lookups at " + (dnshost.join(":"))); + } with { + $sys.log("** Unable to restart async DNS lookups because:"); + $sys.log("** => " + ((traceback()[1])[2])); + } + return valid(connection); +}; + +public method .shutdown() { + arg @args; + var c; + + (sender() != this()) && (> .perms(caller(), 'system) <); + c = connection; + connection = 0; + (| c.close() |); + started = 0; +}; + +public method .startup(): forked { + arg @args; + + (> .perms(sender(), 'system) <); + .shutdown(); + if (!async) + return; + catch any { + (> .startup_dns() <); + $sys.log("** Starting async DNS lookups at " + (dnshost.join(":"))); + } with { + $sys.log("** Unable to startup async DNS lookups because:"); + $sys.log("** => " + ((traceback()[1])[2])); + } +}; + +protected method .startup_dns() { + var id, tmp, x; + + if (starting) + return; + started = 0; + starting = 1; + if (connection) + (| connection.close() |); + id = tosym("dns_connection"); + while ((| lookup(id) |)) + id = tosym("dns_connection_" + ++x); + connection = $outbound_connection.new_with(id); + if ((| connection.open_connection(@dnshost) |)) { + starting = 0; + started = 1; + return; + } + + // try to exec() it, then startup again + (| $sys.startup_dnsserv() |); + $scheduler.sleep(1); + catch any { + connection.open_connection(@dnshost); + starting = 0; + } with { + (| connection.close() |); + connection = 0; + starting = 0; + if (error() == ~refused) + throw(~refused, "Unable to open connection to " + (dnshost.join(":"))); + else + rethrow(error()); + } + started = 1; +}; + +public method .valid_host_regexp() { + return valid_host_regexp; +}; + +public method .valid_hostname() { + arg host; + + return match_regexp(host, valid_host_regexp) ? 1 : 0; +}; + +public method .valid_ip() { + arg ip; + + return match_regexp(ip, valid_ip_regexp) ? 1 : 0; +}; + +public method .valid_ip_regexp() { + return valid_ip_regexp; +}; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/filtered_frob.cdc Tue Aug 19 12:15:37 1997 @@ -0,0 +1,89 @@ + +new object $filtered_frob: $libraries; + +var $filtered_frob default_value = #[['sight, 10], ['hearing, 10]]; +var $root created_on = 860590309; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$filtered_frob]; +var $root manager = $filtered_frob; + +public method .default_value() { + return default_value; +}; + +public method .effects() { + arg what; + + return (what.contains('effects)) ? (what['effects]) : []; +}; + +public method .is_noticed() { + arg value, f; + var i; + + return find i in [1 .. listlen(value)] where ((value[i]) >= (f[i])); +}; + +public method .message() { + arg what; + + return what['message]; +}; + +public method .new_with() { + arg msg, sender; + + if (type(msg) != 'frob) + msg = (<$message_frob, msg>); + return (<this(), (((.default_value()).add('message, msg)).add('propagator, sender))>); +}; + +public method .new_with_message() { + arg msg, sender; + + return (<(.this()), (((.default_value()).add('message, msg)).add('propagator, sender))>); +}; + +public method .propagate() { + arg value, prop; + var i, out, dflt, l, eff, f, n; + + if ((type(value) == 'frob) && (class(value) == $message_frob)) + value = .new_with(value, sender()); + out = #[]; + eff = prop.effect(); + f = prop.senses(); + dflt = (f.contains('any)) ? (f['any]) : 1000000; + n = 0; + for i in (value) { + if ((i[1]) in ['message, 'propagator, 'effects]) { + out = out.add(@i); + } else { + if (f.contains(i[1])) + l = (i[2]) - (f[i[1]]); + else + l = (i[2]) - dflt; + if (l > 0) { + out = out.add(i[1], l); + n++; + } + } + } + if (!n) + return 0; + if (eff) + out = out.add('effects, ((| out.effects() |) || []) + [eff]); + return (<this(), out>); +}; + +public method .sensory() { + arg what; + + (| (what = what.del('message)) |); + (| (what = what.del('effects)) |); + (| (what = what.del('propagator)) |); + return what; +}; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/flat_format.cdc Tue Aug 19 12:15:17 1997 @@ -0,0 +1,54 @@ + +new object $flat_format: $wrapped_format; + +var $root created_on = 858615622; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$flat_format]; +var $root manager = $flat_format; + +public method .do_link() { + arg vars, flags, args; + + return ._eval_ctext(args[1], vars); +}; + +public method .do_th() { + arg vars, flags, args; + var tblinfo, rinfo, col, cols, rows, w, n, max; + + rows = (| toint(flags.getkey("rowspan")) |) || 1; + cols = (| toint(flags.getkey("colspan")) |) || 1; + rinfo = vars['rinfo]; + tblinfo = vars['table_info]; + col = (tblinfo[2]) + 1; + n = []; + max = listlen(tblinfo[1]); + while (rinfo[col]) { + col++; + n += [[0, (tblinfo[1])[col], []]]; + } + w = ((tblinfo[1]).subrange(col, cols)).sum(); + tblinfo = tblinfo.replace(2, (col + cols) - 1); + vars = (vars.add('table_info, tblinfo)).add('header, ""); + [args, vars] = .eval_indented(args, vars, 0, w); + return [(n + [[rows, w, args.explode("\n", 1)]]) + ($list.make(cols - 1, [rows, 0, []])), vars]; +}; + +public method .format() { + arg data, vars; + var str, len, line, out; + + str = (> (._eval_ctext(data, vars))[1] <); + if ((strlen(str) < 2) || (substr(str, strlen(str) - 1) != "\n")) + str += "\n"; + + // ugly and inneficient--use a client people + len = (vars['receiver]).linelen(); + out = ""; + for line in (explode(str, "\n", 1)) + out += (line.wrap_line(len, "")) + "\n"; + return str_to_buf(out); +}; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/has_reactions.cdc Tue Aug 19 12:15:18 1997 @@ -0,0 +1,149 @@ + +new object $has_reactions: $foundation; + +var $has_reactions active = 0; +var $has_reactions last_id = 0; +var $has_reactions reactions = 0; +var $root created_on = 809243338; +var $root flags = ['methods, 'code, 'variables, 'core]; +var $root inited = 1; +var $root managed = [$has_reactions]; +var $root manager = $has_reactions; + +public method .active() { + return active; +}; + +public method .add_reaction() { + arg @args; + var r, id; + + // make sure it doesn't already exist.. + for r in (reactions || #[]) { + if (((r[2])[2]) == (args[2])) { + if ((r[2]) == args) + return r[1]; + } + } + (> .check_reaction_args(@args) <); + reactions = dict_add(reactions || #[], ++last_id, args); +}; + +private method .check_reaction_args() { + arg method, template, type, chance, times, hook, min, max; + + if (type(method) != 'symbol) + throw(~type, "Match type (arg 1) is not a symbol."); + if (type(template) != 'string) + throw(~type, "Match template (arg 2) is not a string."); + if (type(type) != 'symbol) + throw(~type, "Reaction type (arg 3) is not a symbol."); + if (type(chance) != 'integer) + throw(~type, "Reaction chance (arg 4) is not a integer."); + if (type(times) != 'integer) + throw(~type, "Reaction times (arg 5) is not a integer."); + if (type(hook) != 'list) + throw(~type, "Reaction hook (arg 6) is not a list."); + if ((!hook) || (type(hook[1]) != 'symbol)) + throw(~type, "Reaction hook method (arg 6[1]) is not a symbol."); + if ((listlen(hook) == 1) || (type(hook[2]) != 'list)) + throw(~type, "Reaction hook arguments (arg 6[2]) is not a list."); + if (type(min) != 'integer) + throw(~type, "Reaction minimum delay (arg 7) is not a integer."); + if (type(max) != 'integer) + throw(~type, "Reaction maximum delay (arg 8) is not a integer."); +}; + +protected method .check_reactions() { + arg type, str, sender; + var rnum, t, id, chance, times, method, template, m; + + rnum = random(100); + for t in ([type, 'any]) { + if (!dict_contains(active, t)) + continue; + for id in (dict_keys(active[t])) { + [chance, times] = (active[t])[id]; + if (rnum > chance) + break; + [method, template] = reactions[id]; + if ((m = str.(method)(template))) { + if (times == 1) + .remove_active(t, id); + else if (times > 1) + .update_active(t, id, [chance, --times]); + if ((.do_reaction(str, m, id, sender)) != 'continue) + return; + } + } + } +}; + +public method .del_reaction() { + arg id; + + // cruft up later + reactions = reactions.del(id); +}; + +protected method .do_reaction(): forked { + arg str, match, id, sender; + var method, args, min, max, time; + + [[method, args], min, max] = sublist(reactions[id], 6); + time = random(max - min) + min; + $scheduler.sleep(time); + catch any + return (> .(method)(str, match, sender, @args) <); + with + .tell_traceback(traceback()); + return 'stop; +}; + +protected method .remove_active() { + arg key, id; + + active = dict_add(active, key, dict_del(active[key], id)); +}; + +public method .set_active() { + arg id; + var ra, key, e, inserted, chance, times; + + if ((!reactions) || (!dict_contains(reactions, id))) + throw(~noreaction, ("No reaction with id '" + id) + "'."); + if (!active) + active = #[]; + [key, chance, times] = sublist(reactions[id], 3, 3); + if (dict_contains(active, key)) { + ra = active[key]; + if (ra.contains(id)) + return .update_active(key, id, [chance, times]); + active = dict_del(active, key); + ra = map e in (ra) to (e); + } else { + ra = []; + } + for e in [1 .. listlen(ra)] { + if ((((ra[e])[2])[1]) < chance) { + ra = insert(ra, e, [id, [chance, times]]); + inserted++; + } + } + if (!inserted) + ra += [[id, [chance, times]]]; + active = dict_add(active, key, hash e in (ra) to (e)); +}; + +public method .tell_traceback() { + arg @args; + +}; + +protected method .update_active() { + arg key, id, value; + + active = dict_add(active, key, dict_add(active[key], id, value)); +}; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_admin.cdc Tue Aug 19 12:15:31 1997 @@ -0,0 +1,15 @@ + +new object $help_admin: $help_coldcore; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "Administration", "Administration"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "Unfortunately, this document is still in development. For now, see:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], [<$format, ["a", [["href", "http://www.cold.org/Software/ColdCore/newadmin.html"]], ["http://www.cold.org/Software/ColdCore/newadmin.html"], 'do_a]>], 'do_dfn]>], #[]]>; +var $help_node index = $help_index_core; +var $help_node links = #[]; +var $root created_on = 868128023; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_admin]; +var $root manager = $help_admin; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_add_parent.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,14 @@ + +new object $help_cmd_add_parent: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@add-parent", "@add-parent"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["PROGRAMMER COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@add-p?arent|@ap <parent> [to] <object>"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "@add-parent adds <parent> to the list of parents that the object has."], #[]]>; +var $help_node links = #[]; +var $root created_on = 869369522; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_add_parent]; +var $root manager = $help_cmd_add_parent; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_addparent.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_addparent: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@add-parent|@ap", "@add-parent|@ap"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["PROGRAMMER COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@add-p?arent|@ap <parent> to <objref>"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Adds an additional <parent> to <objref>. This command does not remove any existing parents from the <objref>. See also ", <$format, ["link", [["node", "$help_cmd_delparent"]], ["@del-p?arent"], 'do_link]>, "."], #[['links, #[["@del-p?arent", "$help_cmd_delparent"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["@del-p?arent", $help_cmd_delparent]]; +var $root created_on = 870589057; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_addparent]; +var $root manager = $help_cmd_addparent; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_addvariable.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_addvariable: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@add-v?ariable|@av", "@add-v?ariable|@av"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["PROGRAMMER COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax ", <$format, ["tt", [], ["@add-v?ariable|@av <objref>,<variable> [=<default>]"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "The purpose of @add-variable is to add variables to an <objref>, and optionally, set the variable's default value or type.", <$format, ["p", [], [], 'do_p]>, "See also: ", <$format, ["link", [["node", "$help_cmd_delvariable"]], ["@del-v?ariable"], 'do_link]>, " ", <$format, ["np", [], [], 'do_np]>, " ", <$format, ["b", [], ["Example:"], 'do_b]>, " ", <$format, ["dfn", [], [<$format, ["quote", [], [">@av $vampire,silly_names = [\"Brad\", \"Bruce\", \"Miro\", \"Brandon\"];\n"], 'do_quote]>], 'do_dfn]>], #[['links, #[["@del-v?ariable", "$help_cmd_delvariable"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["@del-v?ariable", $help_cmd_delvariable]]; +var $root created_on = 870589271; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_addvariable]; +var $root manager = $help_cmd_addvariable; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_age.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_age: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@age", "@age"]; +var $help_node body = <$ctext_frob, [[<$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@age <objref>"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Displays the date <objref> was created, and how long ago that was from the current time. When getting the @age of players, it will additionally display how much time that player has been connected to the server. ", <$format, ["np", [], [], 'do_np]>, " ", <$format, ["b", [], ["Example:"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], [<$format, ["quote", [], [">@age Vampire\nVampire was created on Monday January 13 1997\nHe is 6 months, 19 days, 2 hours and 47 minutes old.\nHe has logged 4 months, 17 days, 22 hours, 7 minutes and 33 seconds online.\n"], 'do_quote]>], 'do_dfn]>], #[]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[]; +var $root created_on = 870925660; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_age]; +var $root manager = $help_cmd_age; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_ancestors.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_ancestors: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@ancestors", "@ancestors"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["PROGRAMMER COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@ancestors <objref> [<levels>]"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This command shows an object's ancestors. If <level> is present, it will additionally recursively show the ancestors of each parent an object has, to the depth specified by <levels>.", <$format, ["p", [], [], 'do_p]>, "See also ", <$format, ["link", [["node", "$help_cmd_descendants"]], ["@descendants"], 'do_link]>, ". ", <$format, ["np", [], [], 'do_np]>, " ", <$format, ["b", [], ["Example:"], 'do_b]>, " ", <$format, ["dfn", [], [<$format, ["quote", [], [">@ancestor $vampire 2\nAncestors of $vampire:2 levels:\n$vampire [-----] (MI)\n $admin [*-mvcC]\n $programmer [*-mvcC] (MI)\n $antisocial [*fmvcC]\n $user_interfaces [*fmvc]\n"], 'do_quote]>], 'do_dfn]>], #[['links, #[["@descendants", "$help_cmd_descendants"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["@descendants", $help_cmd_descendants]]; +var $root created_on = 870646587; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_ancestors]; +var $root manager = $help_cmd_ancestors; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_attach.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_attach: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@attach", "@attach"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["BUILDER COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@attach <place1> to <place2>"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This command attaches an exit from <place1> to <place2>. It will prompt for the name of the exit, and a description for the exit.", <$format, ["p", [], [], 'do_p]>, "See also: ", <$format, ["link", [["node", "$help_cmd_build"]], ["@build"], 'do_link]>, ", ", <$format, ["link", [["node", "$help_places_exen"]], ["Exits and Entrances"], 'do_link]>], #[['links, #[["@build", "$help_cmd_build"], ["Exits and Entrances", "$help_places_exen"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["@build", $help_cmd_build], ["Exits and Entrances", $help_places_exen]]; +var $root created_on = 870659823; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_attach]; +var $root manager = $help_cmd_attach; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_audit.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_audit: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@audit", "@audit"]; +var $help_node body = <$ctext_frob, [[<$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@audit <objref> [+f?ull]"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Displays how much quota (in bytes) <objref> is using, how much it can use, and how much is remaining. With the +full option, @audit additionally displays the name, number of bytes, and location of each object that <objref> owns. ", <$format, ["np", [], [], 'do_np]>, " ", <$format, ["b", [], ["Example:"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], [<$format, ["quote", [], [">@audit Vampire\nObjects managed by Vampire ($vampire): bytes Location\n $vampire (Vampire) 6,701 [The Pit]\n $note_79 (UI_stuff) 492 [Vampire]\n $thing_265 (parser) 406 [Vampire]\n $help_cmd_addshortcut (@add-s?hortcut 414\nTotal usage: 27,885 bytes\nTotal quota: 75,000 bytes\nRemaining: 47,115 bytes\n"], 'do_quote]>], 'do_dfn]>], #[]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[]; +var $root created_on = 870925742; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_audit]; +var $root manager = $help_cmd_audit; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_boot.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_boot: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@boot", "@boot"]; +var $help_node body = <$ctext_frob, [[<$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@boot <objref> | <player>"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "@boot notifies the player or object specified that it is being returned to it's home, and does so if the player that invoked the command is allowed to do the action."], #[]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[]; +var $root created_on = 870563995; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_boot]; +var $root manager = $help_cmd_boot; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_bugs.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_bugs: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@bugs", "@bugs"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["BUILDER COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@bug?s"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This is a meta command which places you in a menu-based bug management system. From within this system you have the option to scan unclaimed open bugs reports, scan bugs you are currently working on, scan all open bug reports, review all repaired bugs, all non-archived/non-dismissed and report a new bug. ", <$format, ["np", [], [], 'do_np]>, "Bugs that enter this system usually enter in one of two ways, from the @bugs report new bug option, and from ", <$format, ["link", [["node", "$help_cmd_report"]], ["@report"], 'do_link]>, "."], #[['links, #[["@report", "$help_cmd_report"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["@report", $help_cmd_report]]; +var $root created_on = 870659838; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_bugs]; +var $root manager = $help_cmd_bugs; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_children.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_children: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@children|@kids", "@children|@kids"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["BUILDER COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@child?ren|@kids <objref>"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Displays the name, flags, size, and manager of <objref>'s children.", <$format, ["p", [], [], 'do_p]>, "See also: ", <$format, ["link", [["node", "$help_cmd_parents"]], ["@parents"], 'do_link]>, " ", <$format, ["np", [], [], 'do_np]>, " ", <$format, ["b", [], ["Example:"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], [<$format, ["quote", [], [">@children $admin\nChildren of $admin (Generic Admin):\n# Name Flags Size Manager\n2 $brian (Brian) --m-c 3749 $brian (Brian)\n3 $user_ken (Ken) ----- 2671 $user_ken (Ken)\n2 $miro (Miro) ----- 7799 $miro (Miro)\n3 $user_bruce (Bruce) ----- 4346 $user_bruce (Bruce)\n2 $vampire (Vampire) ----- 6581 $vampire (Vampire)\n1 $brandon (Brandon) --m-- 5550 $brandon (Brandon)\n"], 'do_quote]>], 'do_dfn]>], #[['links, #[["@parents", "$help_cmd_parents"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["@parents", $help_cmd_parents]]; +var $root created_on = 870660012; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_children]; +var $root manager = $help_cmd_children; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_chparent.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_chparent: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@chparents", "@chparents"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["PROGRAMMER COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@chpar?ents <obj> to <parent> [, <parent>,...] "], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Changes the parents for <obj>."], #[]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[]; +var $root created_on = 870586634; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_chparent]; +var $root manager = $help_cmd_chparent; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_commands.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_commands: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@commands", "@commands"]; +var $help_node body = <$ctext_frob, [[<$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@com?mands <objref> [options]"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Displays all the commands that <objref> has on it either directly, or from it's parents. ", <$format, ["np", [], [], 'do_np]>, " ", <$format, ["b", [], ["Example:"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], [<$format, ["quote", [], [">@commands Squeak +f\nRemote commands on Squeak the lemming:\n \"step on <this>\" .step_cmd()\n \"beat the <this>\" .beat_cmd()\n \"beat <this>\" .beat_cmd()\n \"beat up the <this>\" .beat_cmd()\n \"beat up <this>\" .beat_cmd()\n \"jump on the <this>\" .step_cmd()\n \"jump on <this>\" .step_cmd()\n \"pet <this>\" .pet_cmd()\n"], 'do_quote]>], 'do_dfn]>, " ", <$format, ["np", [], [], 'do_np]>, " Options can be: ", <$format, ["dfn", [["nobound", 1], [" ", 1], ["ind", "4"]], [<$format, ["table", [["cols", "30%,70%"]], [<$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["+f?ull"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Shows command followed by it's method."], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["+a?ll"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Shows all of <objref>'s commands, including those inherited from parents."], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["+l?ocal"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Shows any local commands that are defined on the object."], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["+r?emote"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Shows any remote commands that are defined on the object."], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["+s?hortcuts"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Shows any shortcuts that are defined on the object."], 'do_td]>], 'do_tr]>], 'do_table]>], 'do_dfn]>], #[]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[]; +var $root created_on = 870925794; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_commands]; +var $root manager = $help_cmd_commands; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_context.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_context: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@context", "@context"]; +var $help_node body = <$ctext_frob, [[<$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@context"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Displays your environmental contexts. The server records the last object you named, as well as all of the last objects you named (with a gender).", <$format, ["p", [], [], 'do_p]>, "See also: ", <$format, ["link", [["node", "$help_environment"]], ["Environment"], 'do_link]>, " ", <$format, ["np", [], [], 'do_np]>, " ", <$format, ["b", [], ["Example:"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], [<$format, ["quote", [], [">@context\nLast thing: Generic User Object\nLast it: Generic User Object\nLast her: Squeak the lemming\nLast him: Brad\n"], 'do_quote]>], 'do_dfn]>], #[['links, #[["Environment", "$help_environment"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["Environment", $help_environment]]; +var $root created_on = 870925820; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_context]; +var $root manager = $help_cmd_context; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_date.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_date: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@date|@time", "@date|@time"]; +var $help_node body = <$ctext_frob, [[<$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@date|@time"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Displays the server's local date and time. ", <$format, ["np", [], [], 'do_np]>, " ", <$format, ["b", [], ["Example:"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], [<$format, ["quote", [], [">@date\n10:52 PM Wednesday, August 06 1997 MDT\n"], 'do_quote]>], 'do_dfn]>], #[]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[]; +var $root created_on = 870925836; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_date]; +var $root manager = $help_cmd_date; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_delmethod.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_delmethod: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@del-method|@dm", "@del-method|@dm"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["PROGRAMMER COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax ", <$format, ["tt", [], ["@del-m?ethod|@delm?ethod|@dm <objref>.<method>"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This command will remove an unwanted <method> from the <objref>. Once the <method> has been removed, you can't get it back, so be sure you want the method removed, or that you have a backup of it. Also, if a command references this method, be sure that you remove the command with ", <$format, ["link", [["node", "$help_cmd_delcmd"]], ["@del-command"], 'do_link]>, ".", <$format, ["p", [], [], 'do_p]>, "See also: ", <$format, ["link", [["node", "$help_cmd_program"]], ["@program"], 'do_link]>], #[['links, #[["@del-command", "$help_cmd_delcmd"], ["@program", "$help_cmd_program"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["@del-command", $help_cmd_delcmd], ["@program", $help_cmd_program]]; +var $root created_on = 870646953; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_delmethod]; +var $root manager = $help_cmd_delmethod; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_delparent.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_delparent: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@del-parent|@dp", "@del-parent|@dp"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["PROGRAMMER COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax ", <$format, ["tt", [], ["@del-p?arent|@dp <parent> from <objref>"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Deletes a <parent> from <objref>. This command does not remove any other existing parents from the <objref>. See also ", <$format, ["link", [["node", "$help_cmd_addparent"]], ["@add-p?arent"], 'do_link]>, "."], #[['links, #[["@add-p?arent", "$help_cmd_addparent"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["@add-p?arent", $help_cmd_addparent]]; +var $root created_on = 870639383; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_delparent]; +var $root manager = $help_cmd_delparent; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_delvariable.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_delvariable: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@del-variable|@dv", "@del-variable|@dv"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["PROGRAMMER COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax ", <$format, ["tt", [], ["@del-v?ariable|@dv <objref>,<variable>"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "The purpose of @del-variable is to remove variables from an <objref>.", <$format, ["p", [], [], 'do_p]>, "See also: ", <$format, ["link", [["node", "$help_cmd_addvariable"]], ["@add-v?ariable"], 'do_link]>], #[['links, #[["@add-v?ariable", "$help_cmd_addvariable"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["@add-v?ariable", $help_cmd_addvariable]]; +var $root created_on = 870645893; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_delvariable]; +var $root manager = $help_cmd_delvariable; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_destroy.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_destroy: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@destroy", "@destroy"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["BUILDER COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@destroy <object>"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Destroys an <object> and removes it from the system. This command will not destroy ", <$format, ["link", [["node", "$help_coldc_types_frobs"]], ["Frobs"], 'do_link]>, ", use ", <$format, ["link", [["node", "$help_cmd_discard"]], ["discard"], 'do_link]>, " instead.", <$format, ["p", [], [], 'do_p]>, "See also: ", <$format, ["link", [["node", "$help_cmd_new"]], ["@new"], 'do_link]>], #[['links, #[["Frobs", "$help_coldc_types_frobs"], ["discard", "$help_cmd_discard"], ["@new", "$help_cmd_new"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["Frobs", $help_coldc_types_frobs], ["discard", $help_cmd_discard], ["@new", $help_cmd_new]]; +var $root created_on = 870660035; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_destroy]; +var $root manager = $help_cmd_destroy; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_discard.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_discard: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "discard", "discard"]; +var $help_node body = <$ctext_frob, [[<$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["discard <frob>"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Destroys a <frob> and removes it from the system. This command will not destroy normal objects, use ", <$format, ["link", [["node", "$help_cmd_destroy"]], ["@destroy"], 'do_link]>, " instead.", <$format, ["p", [], [], 'do_p]>, "See also: ", <$format, ["link", [["node", "$help_coldc_types_frobs"]], ["Frobs"], 'do_link]>, ", ", <$format, ["link", [["node", "$help_cmd_new"]], ["@new"], 'do_link]>], #[['links, #[["@destroy", "$help_cmd_destroy"], ["Frobs", "$help_coldc_types_frobs"], ["@new", "$help_cmd_new"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["@destroy", $help_cmd_destroy], ["Frobs", $help_coldc_types_frobs], ["@new", $help_cmd_new]]; +var $root created_on = 870757106; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_discard]; +var $root manager = $help_cmd_discard; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_dump.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_dump: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@dump", "@dump"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["PROGRAMMER COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax ", <$format, ["tt", [], ["@dump <objref> [options]"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Dumps the source code for a particular object, such that you can upload it to another server. When you @dump an object, all of the information about the object required to reproduce it is dumped to the screen. ", <$format, ["np", [], [], 'do_np]>, " Options can be: ", <$format, ["dfn", [["nobound", 1], [" ", 1], ["ind", "4"]], [<$format, ["table", [["cols", "20%,80%"]], [<$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["+t?extdump"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Lists the code in ", <$format, ["link", [["node", "$help_coldc_textdump"]], ["textdump"], 'do_link]>, " format rather than ", <$format, ["link", [["node", "$help_cmd_program"]], ["@program"], 'do_link]>, " format."], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["+m?ethods"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Lists methods."], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["+v?ariables"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Lists variables."], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["+h?eader"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Lists headers."], 'do_td]>], 'do_tr]>], 'do_table]>], 'do_dfn]>], #[['links, #[["textdump", "$help_coldc_textdump"], ["@program", "$help_cmd_program"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["textdump", $help_coldc_textdump], ["@program", $help_cmd_program]]; +var $root created_on = 870580692; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_dump]; +var $root manager = $help_cmd_dump; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_examine.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_examine: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@examine", "@examine"]; +var $help_node body = <$ctext_frob, [[<$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@ex?amine [+c?hop]"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Displays an overview of information about the object, such as the name, manager, parents, location, and description. ", <$format, ["np", [], [], 'do_np]>, " ", <$format, ["b", [], ["Example:"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], [<$format, ["quote", [], [">@examine Vampire\nObject (@rename): Vampire ($vampire)\nTemplates (@ant): none\nCreated: Mon Jan 13 18:19:17 1997\nQuota: 75,000 bytes\nSize: 6,710 bytes (on disk)\nPerms (@chmod):\nManager (@chmanage): Vampire ($vampire)\nWriters (@aw/@dw): (none)\nTrusted (@at/@dt): (none)\nParents (@ap/@dp): $admin and $antisocial\nLocation (@move): $the_pit (The Pit)\nDescription (@describe):\nAn insane, poorly spelling creature.\n"], 'do_quote]>], 'do_dfn]>, " ", <$format, ["dfn", [["nobound", 1], [" ", 1], ["ind", "4"]], [<$format, ["table", [["cols", "20%,80%"]], [<$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["+c?hop"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Chops lines longer than the players cols ", <$format, ["link", [["node", "$help_interface_settings"]], ["setting"], 'do_link]>, "."], 'do_td]>], 'do_tr]>], 'do_table]>], 'do_dfn]>], #[['links, #[["setting", "$help_interface_settings"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["setting", $help_interface_settings]]; +var $root created_on = 870926002; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_examine]; +var $root manager = $help_cmd_examine; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_finger.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_finger: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@finger|@ustat", "@finger|@ustat"]; +var $help_node body = <$ctext_frob, [[<$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@finger|@ustat <objref>"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Provides general information about the <objref> such as name, ", <$format, ["link", [["node", "$help_cmd_age"]], ["age"], 'do_link]>, ", ", <$format, ["link", [["node", "$help_cmd_audit"]], ["quota"], 'do_link]>, ", and for users, it additionally lists general user information, and information about any connections it is currently using. ", <$format, ["np", [], [], 'do_np]>, " ", <$format, ["b", [], ["Example:"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], [<$format, ["quote", [], [">@finger Vampire\nInformation on Vampire (use @set to change):\n Vampire was created on Monday January 13 1997\n He is 6 months, 19 days, 18 hours, 40 minutes and 4 seconds old.\n He has logged 4 months, 17 days, 22 hours, 7 minutes and 33 seconds online.\n Quota:\n Total: 75,000\n Used: 28,983\n Remaining: 46,017\n"], 'do_quote]>], 'do_dfn]>], #[['links, #[["age", "$help_cmd_age"], ["quota", "$help_cmd_audit"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["age", $help_cmd_age], ["quota", $help_cmd_audit]]; +var $root created_on = 870926022; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_finger]; +var $root manager = $help_cmd_finger; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_help.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_help: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@help", "@help"]; +var $help_node body = <$ctext_frob, [[<$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@help <topic>"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "See ", <$format, ["link", [["node", "$help_help"]], ["Help"], 'do_link]>, "."], #[['links, #[["Help", "$help_help"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["Help", $help_help]]; +var $root created_on = 870763088; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_help]; +var $root manager = $help_cmd_help; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_hlist.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_hlist: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@help-list|@hlist|@hl", "@help-list|@hlist|@hl"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["PROGRAMMER COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@help-list|@hl [<objref> | <help node>]"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "@help-list allows you to view the ", <$format, ["link", [["node", "$help_cml"]], ["CML"], 'do_link]>, " text of the last help entry you viewed, unless you selected an objref or help node when you entered the command."], #[['links, #[["CML", "$help_cml"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["CML", $help_cml]]; +var $root created_on = 869368081; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_hlist]; +var $root manager = $help_cmd_hlist; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_hwrite.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_hwrite: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@help-write|@hwrite|@hw", "@help-write|@hwrite|@hw"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["PROGRAMMER COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@help-write|@hw?rite [<help node>]"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "@help-write sets the ", <$format, ["link", [["node", "$help_cml"]], ["CML"], 'do_link]>, " text of a help node. Without any arguments, @hwrite will attempt to set the text on the last help node you viewed. With an argument of <help node>, the command will set the text for that help entry if possible."], #[['links, #[["CML", "$help_cml"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["CML", $help_cml]]; +var $root created_on = 869368839; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_hwrite]; +var $root manager = $help_cmd_hwrite; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_id.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_id: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@id", "@id"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["PROGRAMMER COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax ", <$format, ["tt", [], ["@id <objref>"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "The @id command provides summary information similar to the provided by ", <$format, ["link", [["node", "$help_cmd_display"]], ["@display"], 'do_link]>, ". However, there are no options to list variables, or methods. @id provides the following information as a one line summary: ", <$format, ["np", [], [], 'do_np]>, "$objref (objref name) [permissions] [parents] size ", <$format, ["np", [], [], 'do_np]>, " ", <$format, ["b", [], ["Example:"], 'do_b]>, " ", <$format, ["dfn", [], [<$format, ["quote", [], [">@id $vampire\n$vampire (Vampire) [-----] [$admin, $antisocial] 5924 bytes\n"], 'do_quote]>], 'do_dfn]>], #[['links, #[["@display", "$help_cmd_display"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["@display", $help_cmd_display]]; +var $root created_on = 870647065; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_id]; +var $root manager = $help_cmd_id; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_join.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_join: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@join", "@join"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["PROGRAMMER COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax ", <$format, ["tt", [], ["@join <user>"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This command ", <$format, ["link", [["node", "$help_cmd_teleport"]], ["teleports"], 'do_link]>, " you to the same location that <user> is located."], #[['links, #[["teleports", "$help_cmd_teleport"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["teleports", $help_cmd_teleport]]; +var $root created_on = 870647079; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_join]; +var $root manager = $help_cmd_join; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_list.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_list: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@list", "@list"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["PROGRAMMER COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax ", <$format, ["tt", [], ["@list <objref> [options]"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Lists the source code for a particular method. ", <$format, ["np", [], [], 'do_np]>, " Options can be: ", <$format, ["dfn", [["nobound", 1], [" ", 1], ["ind", "4"]], [<$format, ["table", [["cols", "20%,80%"]], [<$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["+n?umbers"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Displays line numbers next to each line of source."], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["+t?extdump"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Lists the code in ", <$format, ["link", [["node", "$help_coldc_textdump"]], ["textdump"], 'do_link]>, " format rather than ", <$format, ["link", [["node", "$help_cmd_program"]], ["@program"], 'do_link]>, " format."], 'do_td]>], 'do_tr]>], 'do_table]>], 'do_dfn]>], #[['links, #[["textdump", "$help_coldc_textdump"], ["@program", "$help_cmd_program"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["textdump", $help_coldc_textdump], ["@program", $help_cmd_program]]; +var $root created_on = 865217221; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_list]; +var $root manager = $help_cmd_list; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_move.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_move: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@move|@mv|@copy|@cp", "@move|@mv|@copy|@cp"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["BUILDER COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@move|@mv <objref> to <location>"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["PROGRAMMER COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [["nobound", 1]], ["Syntax: ", <$format, ["tt", [], ["@move|@mv <objref>.<method1> to <objref>.<method2> [options]"], 'do_tt]>], 'do_dfn]>, " ", <$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@copy|@cp <objref>.<method1> to <objref>.<method2> [options]"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "If you are a builder, @move will transport <objref> to <location>, assuming you pass all the permission checks. You can not, however, move a user into an object, although you can move an object into a user. ", <$format, ["np", [], [], 'do_np]>, "For programmers, @move moves <method1> to <method2> removing <method1> from it's original location. @copy copies <method1> to <method2> without removing <method1> from it's original location. ", <$format, ["np", [], [], 'do_np]>, <$format, ["b", [], ["Example:"], 'do_b]>, " ", <$format, ["dfn", [], [<$format, ["quote", [], ["\n>@move Help TODO to $courtyard\nHelp TODO suddenly disappears.\nYou move Help TODO from The Pit to the Courtyard.\n\n>@move $vampire.pulse to $vampire.old_pulse\nYou move $vampire.pulse() to $vampire.old_pulse().\n\n>@copy $vampire.smurf_cmd to $vampire.tmp_smurf_cmd\nYou copy $vampire.smurf_cmd() to $vampire.tmp_smurf_cmd().\n\n"], 'do_quote]>], 'do_dfn]>, " Options can be: ", <$format, ["dfn", [["nobound", 1], [" ", 1], ["ind", "4"]], [<$format, ["table", [["cols", "20%,80%"]], [<$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["+c?omment"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Sets the comment for the copy or move."], 'do_td]>], 'do_tr]>], 'do_table]>], 'do_dfn]>], #[]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[]; +var $root created_on = 870580758; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_move]; +var $root manager = $help_cmd_move; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_news.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_news: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@news", "@news"]; +var $help_node body = <$ctext_frob, [[<$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@news"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This command lists recent postings to the *news mail list. ", <$format, ["np", [], [], 'do_np]>, " ", <$format, ["b", [], ["Example:"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], [<$format, ["quote", [], [">@news\nthe Cold Dark news:\n\n 23) oif\n 24) RC5 Challenge and the Cold Project Team\n 25) @help $help_node\n 26) Building the Castle\n\n"], 'do_quote]>], 'do_dfn]>, "Use ", <$format, ["link", [["node", "$help_mail_read"]], ["@read"], 'do_link]>, " #, where # is the news item number, such as \"@read 1\". All news items can be found on mail list *news."], #[['links, #[["@read", "$help_mail_read"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["@read", $help_mail_read]]; +var $root created_on = 870926179; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_news]; +var $root manager = $help_cmd_news; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_parents.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_parents: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@parents", "@parents"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["BUILDER COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@par?ents <objref>"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Displays the name, flags, size, and manager of <objref>'s parents.", <$format, ["p", [], [], 'do_p]>, "See also: ", <$format, ["link", [["node", "$help_cmd_children"]], ["@children"], 'do_link]>, " ", <$format, ["np", [], [], 'do_np]>, " ", <$format, ["b", [], ["Example:"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], [<$format, ["quote", [], [">@parents $vampire\nParents of Vampire ($vampire):\n# Name Flags Size Manager\n12 $admin (Generic Admin) *-mvcC 40389 $admin (Generic Admin)\n16 $antisocial *fmvcC 9756 $antisocial\n"], 'do_quote]>], 'do_dfn]>], #[['links, #[["@children", "$help_cmd_children"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["@children", $help_cmd_children]]; +var $root created_on = 870660071; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_parents]; +var $root manager = $help_cmd_parents; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_password.cdc Tue Aug 19 12:15:34 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_password: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@password|@passwd", "@password|@passwd"]; +var $help_node body = <$ctext_frob, [[<$format, ["dfn", [["nobound", 1]], ["Syntax: ", <$format, ["tt", [], ["@password|@passwd"], 'do_tt]>], 'do_dfn]>, " ", <$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@password|@passwd <old password> <new password>"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This command allows a user to change it's password. In the first form, it will prompt you for your current password, and then you will be asked to enter your new password. In the second form, you can enter both your <old password> and <new password>, as a one line command. ", <$format, ["np", [], [], 'do_np]>, " ", <$format, ["b", [], ["Example:"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], [<$format, ["quote", [], [">@password foobar barfoo\n"], 'do_quote]>], 'do_dfn]>, " ", <$format, ["dfn", [], [<$format, ["quote", [], [">@password\nCurrent Password (@abort to abort):\n <non-echoed current password>\nNew Password (@abort to abort):\n <non-echoed new password>\nRetype New Password (@abort to abort):\n <non-echoed new password>\n"], 'do_quote]>], 'do_dfn]>], #[]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[]; +var $root created_on = 870926204; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_password]; +var $root manager = $help_cmd_password; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_quit.cdc Tue Aug 19 12:15:34 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_quit: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@quit", "@quit"]; +var $help_node body = <$ctext_frob, [[<$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@quit"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This command logs your current connection off the server. Any other connections you have to the server remain unaffected."], #[]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[]; +var $root created_on = 870926235; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_quit]; +var $root manager = $help_cmd_quit; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_realms.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_realms: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@realms", "@realms"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["BUILDER COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@realm?s"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This command displays all the names of the known realms on the server.", <$format, ["p", [], [], 'do_p]>, "See also: ", <$format, ["link", [["node", "$help_places_realms"]], ["Realms"], 'do_link]>], #[['links, #[["Realms", "$help_places_realms"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["Realms", $help_places_realms]]; +var $root created_on = 870660092; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_realms]; +var $root manager = $help_cmd_realms; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_rehash.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_rehash: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@rehash", "@rehash"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["PROGRAMMER COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax: @rehash"], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "Commands are cached for fast lookup. Because of this, if a command is added to an object other than your object (such as $user), your user's cache needs to be updated. This command will clear your user's cache and update it as needed. See also ", <$format, ["link", [["node", "$help_cmd_rehashall"]], ["@rehash-all"], 'do_link]>, "."], #[['links, #[["@rehash-all", "$help_cmd_rehashall"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["@rehash-all", $help_cmd_rehashall]]; +var $root created_on = 870565149; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_rehash]; +var $root manager = $help_cmd_rehash; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_report.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_report: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@report", "@report"]; +var $help_node body = <$ctext_frob, [[<$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@report"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This command is used to report bugs within the system, @report will prompt the user for a description of the bug found.", <$format, ["p", [], [], 'do_p]>, "See also: ", <$format, ["link", [["node", "$help_cmd_bugs"]], ["@bug"], 'do_link]>], #[['links, #[["@bug", "$help_cmd_bugs"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["@bug", $help_cmd_bugs]]; +var $root created_on = 870663118; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_report]; +var $root manager = $help_cmd_report; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_show.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,16 @@ + +new object $help_cmd_show: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@show", "@show"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["PROGRAMMER COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@show <objref> [options]"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "@show displays an object's methods and variables, as long as you are either the owner, are trusted by the object, or the object is set visible. To see the contents of the methods, you will need to use ", <$format, ["link", [["node", "$help_cmd_list"]], ["@list"], 'do_link]>, " You can optionally have @show list all the public methods you have defined on an object, or all the variables, and which object defines them as below. ", <$format, ["np", [], [], 'do_np]>, <$format, ["b", [], ["Example:"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], [<$format, ["quote", [], [">@show me.\nObject: $vampire [6,146 bytes]\nParents: $admin, $antisocial\nPublic methods matching \"*\":\n .pulse()\n .startup()\n"], 'do_quote]>], 'do_dfn]>, " ", <$format, ["dfn", [], [<$format, ["quote", [], [">@show me,\nObject: $vampire [6,146 bytes]\nParents: $admin, $antisocial\n$root variables matching \"*\":\n manager: $vampire\n managed: [$vampire]\n inited: 1\n writes: []\n$user variables matching \"*\":\n task_connections: #[[54965, $login_connection_23564]]\n"], 'do_quote]>], 'do_dfn]>, " ", <$format, ["np", [], [], 'do_np]>, "Options can be: ", <$format, ["dfn", [["nobound", 1], [" ", 1], ["ind", "4"]], [<$format, ["table", [["cols", "20%,80%"]], [<$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["+c?hop"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["Chops lines longer than the players cols ", <$format, ["link", [["node", "$help_interface_settings"]], ["setting"], 'do_link]>, "."], 'do_td]>], 'do_tr]>], 'do_table]>], 'do_dfn]>], #[['links, #[["@list", "$help_cmd_list"], ["setting", "$help_interface_settings"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["@list", $help_cmd_list], ["setting", $help_interface_settings]]; +var $help_node nolist = 0; +var $root created_on = 869285903; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_show]; +var $root manager = $help_cmd_show; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_teleport.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_teleport: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@teleport|@go", "@teleport|@go"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["BUILDER COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@teleport|@go <location>"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This command transports your user character to <location>, if it can pass through any locks and permission checks that are in place on the <location>.", <$format, ["p", [], [], 'do_p]>, "See also: ", <$format, ["link", [["node", "$help_cmd_join"]], ["@join"], 'do_link]>], #[['links, #[["@join", "$help_cmd_join"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["@join", $help_cmd_join]]; +var $root created_on = 870650078; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_teleport]; +var $root manager = $help_cmd_teleport; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cmd_which.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_cmd_which: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@which", "@which"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, <$format, ["b", [], ["PROGRAMMER COMMAND"], 'do_b]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["Syntax: ", <$format, ["tt", [], ["@which <text>"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "@which searches for any command in your caches which has <text> in the command name. The full template and method is printed for each match found. ", <$format, ["np", [], [], 'do_np]>, "Example:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], [<$format, ["quote", [], ["> @which help\nCommands matching the template \"help\":\n @hl?ist|@help-list <any> $programmer.help_list_cmd()\n @hw?rite|@help-write <any> $programmer.help_write_cmd()\n @nh?n|@new-help-node <any:+n? $programmer.new_help_node_cmd()\n help <any> $bad_commands.old_command_cmd()\n @help <any> $help_ui.help_cmd()\n"], 'do_quote]>], 'do_dfn]>], #[]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[]; +var $root created_on = 870565854; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cmd_which]; +var $root manager = $help_cmd_which; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_cml_colors.cdc Tue Aug 19 12:15:34 1997 @@ -0,0 +1,16 @@ + +new object $help_cml_colors: $help_obj; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "Colors", "Colors"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "CML Color provides services to enable color on user clients supporting HTML or ANSI.", <$format, ["p", [], [], 'do_p]>, <$format, ["subj", [["level", "2"]], [<$format, ["font", [["color", "cyan"]], ["Usage"], 'do_font]>], 'do_subj]>, " ", <$format, ["font", [["color", "green"]], [<$format, ["dfn", [], ["{font color=<color> bcolor=<color>:Text to display in color.}"], 'do_dfn]>], 'do_font]>, <$format, ["dl", [], [<$format, ["dt", [], [<$format, ["font", [["color", "blue"]], [<$format, ["quote", [], ["color:"], 'do_quote]>], 'do_font]>], 'do_dt]>, <$format, ["dd", [], [<$format, ["font", [["color", "yellow"]], ["Defines the forground color of the text. It must be of a valid type listed in $cml_color,colors."], 'do_font]>], 'do_dd]>, <$format, ["dt", [], [<$format, ["font", [["color", "blue"]], [<$format, ["quote", [], ["bcolor:"], 'do_quote]>], 'do_font]>], 'do_dt]>, <$format, ["dd", [], [<$format, ["font", [["color", "yellow"]], ["Defines the background color, and is not supported in html."], 'do_font]>], 'do_dd]>], 'do_dl]>, <$format, ["p", [], [], 'do_p]>, <$format, ["font", [["color", "green"]], ["color and bcolor are optional, though using neither will have no affect on your text. The following examples are all valid."], 'do_font]>, " ", <$format, ["subj", [["level", "3"]], [<$format, ["font", [["color", "cyan"]], ["Examples:"], 'do_font]>], 'do_subj]>, <$format, ["dl", [], [<$format, ["dt", [], ["{font color=red bcolor=blue:Hello world!}"], 'do_dt]>, <$format, ["dd", [], [<$format, ["font", [["color", "red"], ["bcolor", "blue"]], ["Hello world!"], 'do_font]>], 'do_dd]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dt", [], ["{font color=red:Hello world!}"], 'do_dt]>, <$format, ["dd", [], [<$format, ["font", [["color", "red"]], ["Hello world!"], 'do_font]>], 'do_dd]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dt", [], ["{font bcolor=blue:Hello world!}"], 'do_dt]>, <$format, ["dd", [], [<$format, ["font", [["bcolor", "blue"]], ["Hello world!"], 'do_font]>], 'do_dd]>], 'do_dl]>], #[]]>; +var $help_node group = 1; +var $help_node index = $help_index_objects; +var $help_node links = #[]; +var $root created_on = 864416453; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_cml_colors]; +var $root manager = $help_cml_colors; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_formatting_commands.cdc Tue Aug 19 12:15:34 1997 @@ -0,0 +1,14 @@ + +new object $help_formatting_commands: $help_node_formatting; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "Commands", "Commands"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "Each command node has the following general look:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [["nobound", 1]], [<$format, ["quote", [], ["TYPE COMMAND\n\n Syntax: cmd args\n\nExplanation\n\nExamples"], 'do_quote]>], 'do_dfn]>, " ", <$format, ["subj", [["level", "2"]], ["Command Type"], 'do_subj]>, <$format, ["p", [], [], 'do_p]>, "TYPE is one of: ADMIN, PROGRAMMER, BUILDER, or the appropriate name for the object the command is defined on. In the case of $user no command is type is defined. ", <$format, ["tt", [], ["$player"], 'do_tt]>, " and similar objects may (in the future) also define their own type. Feature objects will as well (although they will list as SOCIAL FEATURE COMMAND for the $social feature). ", <$format, ["np", [], [], 'do_np]>, "Type has a CML format of:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [["nobound", 1]], ["{p}{b:ADMIN COMMAND}"], 'do_dfn]>, " ", <$format, ["subj", [["level", "2"]], ["Command Syntax"], 'do_subj]>, <$format, ["p", [], [], 'do_p]>, "Syntax is a standard command syntax definition, using <token> to represent an argument, brackets to enclose optional arguments, and an elipse to represent any number of arguments beyond that point. ", <$format, ["np", [], [], 'do_np]>, "Command syntax has a CML format of:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [["nobound", 1]], ["{dfn:Syntax: {tt:@cmd \[-option\] <arg> \[<arg2> ...\]}}"], 'do_dfn]>, " ", <$format, ["subj", [["level", "2"]], ["Explanation"], 'do_subj]>, <$format, ["p", [], [], 'do_p]>, "The explanation is one or more paragraphs explaning the command. Always correctly use {p} vs {np} to guarantee one blank line between paragraphs. ", <$format, ["subj", [["level", "2"]], ["Examples"], 'do_subj]>, <$format, ["p", [], [], 'do_p]>, "Examples should use the general example format. Make sure to correctly use {p} or {np} as appropriate in order to guarantee one blank line between the example and any paragraphs."], #[]]>; +var $help_node links = #[]; +var $root created_on = 870561246; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_formatting_commands]; +var $root manager = $help_formatting_commands; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_formatting_general.cdc Tue Aug 19 12:15:34 1997 @@ -0,0 +1,14 @@ + +new object $help_formatting_general: $help_node_formatting; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "General", "General"]; +var $help_node body = <$ctext_frob, [[<$format, ["np", [], [], 'do_np]>, "Some general formatting conventions: ", <$format, ["subj", [["level", "2"]], ["White Space"], 'do_subj]>, <$format, ["p", [], [], 'do_p]>, "White Space in CML is generally managed ok. However, in some cases it is not--when formatting plaintext. This is due primarily to the problems which arise with multiple output formats. Therefore, you should pay close attention when writing help information that your Whitespace formatting is correct. Are your paragraphs spaced with one blank line them? Do your paragraphs begin at the start of the line, or is there a space first? ", <$format, ["subj", [["level", "2"]], ["Action Examples"], 'do_subj]>, <$format, ["p", [], [], 'do_p]>, "When giving an example of an action the user may take, always format it as:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["{dfn:example}"], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "In the case of one or more lines, use {br}, such as:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["{dfn:example line 1{br}example line 2}"], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "When showing an action and result, use '=>' to represent the result. Do not prefix the action with a prompt, unless it is a command."], #[]]>; +var $help_node links = #[]; +var $root created_on = 870560749; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_formatting_general]; +var $root manager = $help_formatting_general; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_formatting_objects.cdc Tue Aug 19 12:15:34 1997 @@ -0,0 +1,14 @@ + +new object $help_formatting_objects: $help_node_formatting; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "Objects", "Objects"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "The format used in an object node will depend upon the complexity and type of object. Look at other existing object nodes for general formatting not outlined below. Don't forget to set the objects's help-node setting, ala:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [["nobound", 1]], ["@set obj:help-node=$help_obj_foof"], 'do_dfn]>, " ", <$format, ["subj", [["level", "2"]], ["Method Listings"], 'do_subj]>, <$format, ["p", [], [], 'do_p]>, "When listing methods, always use a definition list (dl) with an indent of eight characters (ind=8). Specify the method reference in the definition title ({dt}), using the {method} tag. Use {var} around any arguments. The method explanation goes in the definition description ({dd}). Example:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [["nobound", 1]], [<$format, ["quote", [], ["{dl ind=8:\n {dt: .{method list.length:length}({var:list})} \n {dd: Length of the {var:list}.} \n ...}"], 'do_quote]>], 'do_dfn]>, " ", <$format, ["subj", [["level", "2"]], ["Method Groups"], 'do_subj]>, <$format, ["p", [], [], 'do_p]>, "If possible, group methods by behaviour or subsystem, to reduce the overall method list size."], #[]]>; +var $help_node links = #[]; +var $root created_on = 870561303; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_formatting_objects]; +var $root manager = $help_formatting_objects; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_func_frob_handler.cdc Tue Aug 19 12:15:29 1997 @@ -0,0 +1,15 @@ + +new object $help_func_frob_handler: $help_funcs_data; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "frob_handler()", "frob_handler()"]; +var $help_node body = <$ctext_frob, [[<$format, ["dfn", [], [<$format, ["tt", [], [<$format, ["i", [], ["SYMBOL"], 'do_i]>, " frob_handler(", <$format, ["i", [], ["FROB frob"], 'do_i]>, ")"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This function returns the handler of a frob. See ", <$format, ["link", [["node", "$help_coldc_types_frobs"]], ["Frobs"], 'do_link]>, " for more details on Frobs."], #[['links, #[["Frobs", "$help_coldc_types_frobs"]]]]]>; +var $help_node index = $help_index_function; +var $help_node links = #[["Frobs", $help_coldc_types_frobs]]; +var $root created_on = 864934999; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_func_frob_handler]; +var $root manager = $help_func_frob_handler; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_func_frob_value.cdc Tue Aug 19 12:15:29 1997 @@ -0,0 +1,15 @@ + +new object $help_func_frob_value: $help_funcs_data; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "frob_value()", "frob_value()"]; +var $help_node body = <$ctext_frob, [[<$format, ["dfn", [], [<$format, ["tt", [], [<$format, ["i", [], ["DATA"], 'do_i]>, " frob_value(", <$format, ["i", [], ["FROB frob"], 'do_i]>, ")"], 'do_tt]>], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This function returns the value of a frob. See ", <$format, ["link", [["node", "$help_coldc_types_frobs"]], ["Frobs"], 'do_link]>, " for more details on Frobs."], #[['links, #[["Frobs", "$help_coldc_types_frobs"]]]]]>; +var $help_node index = $help_index_function; +var $help_node links = #[["Frobs", $help_coldc_types_frobs]]; +var $root created_on = 864934991; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_func_frob_value]; +var $root manager = $help_func_frob_value; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_mail.cdc Tue Aug 19 12:15:32 1997 @@ -0,0 +1,16 @@ + +new object $help_mail: $help_cmds; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "Mail System", "Mail System"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "The mail system built into ColdCore is a fairly basic one which allows each user to have their own mailbox and for there to exist various mailing lists which can be publicly accessible or have those who are able to send to the list or those able to read the list limited. ", <$format, ["np", [], [], 'do_np]>, "The commands to the ColdCore mail system are defined on object $mail_ui. ", <$format, ["np", [], [], 'do_np]>, "The following commands are available:", <$format, ["table", [["cols", "50%,50%"]], [<$format, ["tr", [], [<$format, ["td", [], [<$format, ["ul", [], [<$format, ["li", [], [<$format, ["link", [["node", "$help_mail_mail"]], ["@mail"], 'do_link]>, " <any>"], 'do_li]>, <$format, ["li", [], [<$format, ["link", [["node", "$help_mail_next_new"]], ["@nn|@next-new"], 'do_link]>, " <any>"], 'do_li]>, <$format, ["li", [], [<$format, ["link", [["node", "$help_mail_rmmail"]], ["@remove-m?ail|@rmm?ail"], 'do_link]>, " <any>"], 'do_li]>, <$format, ["li", [], [<$format, ["link", [["node", "$help_mail_subscribe"]], ["@sub?scribed"], 'do_link]>, " <any>"], 'do_li]>, <$format, ["li", [], [<$format, ["link", [["node", "$help_mail_reply"]], ["@reply"], 'do_link]>, " <any>"], 'do_li]>], 'do_ul]>], 'do_td]>, <$format, ["td", [], [<$format, ["ul", [], [<$format, ["li", [], [<$format, ["link", [["node", "$help_mail_mail_lists"]], ["@mail-list?s"], 'do_link]>], 'do_li]>, <$format, ["li", [], [<$format, ["link", [["node", "$help_mail_read"]], ["@read"], 'do_link]>, " <any>"], 'do_li]>, <$format, ["li", [], [<$format, ["link", [["node", "$help_mail_send"]], ["@send"], 'do_link]>, " <any>"], 'do_li]>, <$format, ["li", [], [<$format, ["link", [["node", "$help_mail_unsubscribe"]], ["@unsub?scribed"], 'do_link]>, " <any>"], 'do_li]>], 'do_ul]>], 'do_td]>], 'do_tr]>], 'do_table]>], #[['links, #[["@mail", "$help_mail_mail"], ["@nn|@next-new", "$help_mail_next_new"], ["@remove-m?ail|@rmm?ail", "$help_mail_rmmail"], ["@sub?scribed", "$help_mail_subscribe"], ["@reply", "$help_mail_reply"], ["@mail-list?s", "$help_mail_mail_lists"], ["@read", "$help_mail_read"], ["@send", "$help_mail_send"], ["@unsub?scribed", "$help_mail_unsubscribe"]]]]]>; +var $help_node holder = 1; +var $help_node index = $help_index_cmds; +var $help_node links = #[["@mail", $help_mail_mail], ["@nn|@next-new", $help_mail_next_new], ["@remove-m?ail|@rmm?ail", $help_mail_rmmail], ["@sub?scribed", $help_mail_subscribe], ["@reply", $help_mail_reply], ["@mail-list?s", $help_mail_mail_lists], ["@read", $help_mail_read], ["@send", $help_mail_send], ["@unsub?scribed", $help_mail_unsubscribe]]; +var $root created_on = 863993835; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_mail]; +var $root manager = $help_mail; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_mail_mail.cdc Tue Aug 19 12:15:32 1997 @@ -0,0 +1,15 @@ + +new object $help_mail_mail: $help_mail; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@mail", "@mail"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "To determine what mail is on a mail list, the ", <$format, ["tt", [], ["@mail"], 'do_tt]>, " command has been provided.", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["@mail <range> on <*list-name> "], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This command form will return the list of mail messages on the mail list from the beginning to the end of the specified ", <$format, ["tt", [], [<$format, ["link", [["node", "$help_ranges"]], ["range"], 'do_link]>], 'do_tt]>, ". If the ", <$format, ["tt", [], [<$format, ["link", [["node", "$help_ranges"]], ["range"], 'do_link]>], 'do_tt]>, " is not specified, it defaults to a value based on the number of rows you have told Cold (via ", <$format, ["link", [["node", "$help_interface_settings"]], ["@set"], 'do_link]>, " cols) exist on your screen.", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["@mail <*list-name> "], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This command form will return the same list of messages as the form above, but assumes the default ", <$format, ["tt", [], [<$format, ["link", [["node", "$help_ranges"]], ["range"], 'do_link]>], 'do_tt]>, "."], #[['links, #[["range", "$help_ranges"], ["@set", "$help_interface_settings"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["range", $help_ranges], ["@set", $help_interface_settings]]; +var $root created_on = 865084822; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_mail_mail]; +var $root manager = $help_mail_mail; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_mail_mail_lists.cdc Tue Aug 19 12:15:32 1997 @@ -0,0 +1,15 @@ + +new object $help_mail_mail_lists: $help_mail; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@mail-lists", "@mail-lists"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "A mail list's name will always begin with the character '*' to differentiate it from other names. To get a list of mail lists on the system you are using, use:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["@mail-lists "], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This will print out each mail list and inform you of whether or not you may send to the list or read the mail on the list. It lists mail lists which you can not send to, as you may still read them and they are often used for dispersal of important information. An example of a list like this would be *news. It also lists the mail-lists that you can send to, but may not read from. An example of a list like this would be *admins, which exists for discussion between the admins, but a normal user might want to send mail to there to attract their attention to a particular issue."], #[]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[]; +var $root created_on = 865085218; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_mail_mail_lists]; +var $root manager = $help_mail_mail_lists; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_mail_next_new.cdc Tue Aug 19 12:15:32 1997 @@ -0,0 +1,15 @@ + +new object $help_mail_next_new: $help_mail; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@nn", "@nn"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "To provide an easier way to cycle through a larger quantity of unread mail, the ", <$format, ["tt", [], ["@nn"], 'do_tt]>, " command was written.", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["@nn <*list-name> "], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This command form displays the next new message from the specified mail list. By leaving off the mail list identifier, it will cycle through each list you are subscribed to, displaying the unread mail."], #[]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[]; +var $root created_on = 865089561; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_mail_next_new]; +var $root manager = $help_mail_next_new; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_mail_read.cdc Tue Aug 19 12:15:32 1997 @@ -0,0 +1,15 @@ + +new object $help_mail_read: $help_mail; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@read", "@read"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "The @read command allows you to read your mail messages.", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["@read <range> on <*list-name> "], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This command form will display each message in ", <$format, ["tt", [], [<$format, ["link", [["node", "$help_ranges"]], ["range"], 'do_link]>], 'do_tt]>, " from the specified mail list.", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["@read <range> "], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This command form will display each message in ", <$format, ["tt", [], [<$format, ["link", [["node", "$help_ranges"]], ["range"], 'do_link]>], 'do_tt]>, " from the current mail list (the last one accessed with a mail command).", <$format, ["p", [], [], 'do_p]>, <$format, ["np", [], [], 'do_np]>, "Note: In either case, the ", <$format, ["tt", [], [<$format, ["link", [["node", "$help_ranges"]], ["range"], 'do_link]>], 'do_tt]>, " may be given as '", <$format, ["tt", [], ["next"], 'do_tt]>, "' or '", <$format, ["tt", [], ["prev"], 'do_tt]>, "' which will correspondingly read the next or previous message on the list."], #[['links, #[["range", "$help_ranges"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["range", $help_ranges]]; +var $root created_on = 865084621; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_mail_read]; +var $root manager = $help_mail_read; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_mail_reply.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_mail_reply: $help_mail; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@reply", "@reply"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "To reply to a message, you use the ", <$format, ["tt", [], ["@reply"], 'do_tt]>, " command.", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["@reply to <number> "], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This command form will reply to the mail message ", <$format, ["tt", [], ["number"], 'do_tt]>, " on the current mail list.", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["@reply <number> on <list> "], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This command form will reply to the mail message ", <$format, ["tt", [], ["number"], 'do_tt]>, " on the specified mail list.", <$format, ["p", [], [], 'do_p]>, <$format, ["np", [], [], 'do_np]>, "Either form of the ", <$format, ["tt", [], ["@reply"], 'do_tt]>, " command will drop you into the ", <$format, ["link", [["node", "$help_sys_editor"]], ["editor"], 'do_link]>, " to compose your reply. When you have finished your reply, just type '", <$format, ["link", [["node", "$help_node_editor_commands"]], ["send"], 'do_link]>, "' and the message will be sent, and the ", <$format, ["link", [["node", "$help_sys_editor"]], ["editor"], 'do_link]>, " will exit."], #[['links, #[["editor", "$help_sys_editor"], ["send", "$help_node_editor_commands"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["editor", $help_sys_editor], ["send", $help_node_editor_commands]]; +var $root created_on = 865092817; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_mail_reply]; +var $root manager = $help_mail_reply; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_mail_rmmail.cdc Tue Aug 19 12:15:33 1997 @@ -0,0 +1,15 @@ + +new object $help_mail_rmmail: $help_mail; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@rmmail", "@rmmail"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "Deleting your mail is easily accomplished with the ", <$format, ["tt", [], ["@rmmail"], 'do_tt]>, " command.", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["@rmmail <range> from <$list-name or me> "], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This command form will delete the messages in the ", <$format, ["tt", [], [<$format, ["link", [["node", "$help_ranges"]], ["range"], 'do_link]>], 'do_tt]>, " from the specified mail list if you have the proper permissions, or from your own mailbox if you specify ", <$format, ["tt", [], ["me"], 'do_tt]>, "."], #[['links, #[["range", "$help_ranges"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["range", $help_ranges]]; +var $root created_on = 865091839; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_mail_rmmail]; +var $root manager = $help_mail_rmmail; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_mail_send.cdc Tue Aug 19 12:15:32 1997 @@ -0,0 +1,15 @@ + +new object $help_mail_send: $help_mail; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@send", "@send"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "To send mail to another user or to a mail list, you use the ", <$format, ["tt", [], ["@send"], 'do_tt]>, " command.", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["@send <*list-name or user> "], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This command form will prompt you for the text of the message and the subject and then send the mail message to the specified mail list or user.", <$format, ["p", [], [], 'do_p]>, <$format, ["np", [], [], 'do_np]>, "Note: In the near future, this command will gain a few options to allow it to drop you into an editor and to support ", <$format, ["link", [["node", "$help_cml"]], ["CML"], 'do_link]>, " based mail messages.", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["@send <note> to <*list-name or user> "], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This command form will allow you to send the text of the ", <$format, ["tt", [], ["note"], 'do_tt]>, " to the specified mail list or user."], #[['links, #[["CML", "$help_cml"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["CML", $help_cml]]; +var $root created_on = 865088462; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_mail_send]; +var $root manager = $help_mail_send; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_mail_subscribe.cdc Tue Aug 19 12:15:32 1997 @@ -0,0 +1,15 @@ + +new object $help_mail_subscribe: $help_mail; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@subscribe", "@subscribe"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "Once you know about the mailing lists available, you may wish to subscribe to some of them. For this you use the ", <$format, ["tt", [], ["@subscribe"], 'do_tt]>, " command.", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["@subscribe <*list-name> "], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This checks that you may read the list, and will then subscribe you. This command has a couple of other useful forms also however:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["@subscribe +new "], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This is the command form used to determine on what lists you have new mail.", <$format, ["p", [], [], 'do_p]>, <$format, ["np", [], [], 'do_np]>, "And finally:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["@subscribe "], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "This merely prints out the list of mail lists you are currently subscribed to."], #[]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[]; +var $root created_on = 865085006; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_mail_subscribe]; +var $root manager = $help_mail_subscribe; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_mail_unsubscribe.cdc Tue Aug 19 12:15:32 1997 @@ -0,0 +1,15 @@ + +new object $help_mail_unsubscribe: $help_mail; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "@unsubscribe", "@unsubscribe"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "To remove yourself from a mail list, you use the ", <$format, ["tt", [], ["@unsubscribe"], 'do_tt]>, " command.", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["@unsubscribe <*list-name> "], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "That command form will unsubscribe you from the mail list assuming that you were already subscribed. Only typing:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["@unsubscribe "], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "will return the same output as ", <$format, ["link", [["node", "$help_mail_mail_lists"]], ["@mail-lists"], 'do_link]>, "."], #[['links, #[["@mail-lists", "$help_mail_mail_lists"]]]]]>; +var $help_node index = $help_index_cmds; +var $help_node links = #[["@mail-lists", $help_mail_mail_lists]]; +var $root created_on = 865085169; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_mail_unsubscribe]; +var $root manager = $help_mail_unsubscribe; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_msg_prop.cdc Tue Aug 19 12:15:35 1997 @@ -0,0 +1,15 @@ + +new object $help_msg_prop: $help_sys_message; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "Message Propagation", "Message Propagation"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "Messages can be propagated - i.e. transmitted through objects that partially garble or mute parts of the message. Each message has 'senses' associated with it - audibility, visibility, smell, and so on. A rule of the thumb would be that 0 is imperceptible, 10 is average, 20 corresponds to atomic blast, in every way. Propagating the message lowers the sense values, and can modify the text of the message. Once all the message's sense values are lowered below zero, it will stop propagating. ", <$format, ["np", [], [], 'do_np]>, "The general syntax of the message propagators is as follows: ", <$format, ["dfn", [], [<$format, ["quote", [], ["\n\nsense=value; sense=value; ... [/prefix or effect]"], 'do_quote]>], 'do_dfn]>, " ", <$format, ["np", [], [], 'do_np]>, "In the above, each sense will be decreased by given value after the propagation. Senses that aren't mentioned in the propagator specification are not propagated (use any=value to override this). Prefix, if specified, will be prepended to the message. Alternatively, specifying it as ", <$format, ["quote", [], ["/.method_name"], 'do_quote]>, " will call a method from $propagator_effects, allowing more thorough modification of the text. ", <$format, ["np", [], [], 'do_np]>, "Within message, {sense:name} will return the value of the sense, as perceived by the player. Combined with {switch}, this can be used for gradual garbling of the information the player receives."], #[]]>; +var $help_node index = $help_index_subsystem; +var $help_node links = #[]; +var $root created_on = 863604499; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_msg_prop]; +var $root manager = $help_msg_prop; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_node_commands.cdc Tue Aug 19 12:15:34 1997 @@ -0,0 +1,14 @@ + +new object $help_node_commands: $help_obj_help_node; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "Commands", "Commands"]; +var $help_node body = <$ctext_frob, [["This node isn't written yet"], #[]]>; +var $help_node links = #[]; +var $root created_on = 870636767; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_node_commands]; +var $root manager = $help_node_commands; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_node_creation.cdc Tue Aug 19 12:15:34 1997 @@ -0,0 +1,14 @@ + +new object $help_node_creation: $help_obj_help_node; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "Creation", "Creation"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "When creating a help node, be sure to keep the following conventions in mind: ", <$format, ["np", [], [], 'do_np]>, "Command nodes always descend from ", <$format, ["tt", [], ["$help_cmds"], 'do_tt]>, ", but have the prefix 'help_cmd_' (non-plural). Command nodes always go in the Command help index (", <$format, ["tt", [], ["$help_index_cmds"], 'do_tt]>, "). ", <$format, ["np", [], [], 'do_np]>, "ColdCore help descends from ", <$format, ["tt", [], ["$help_coldcore"], 'do_tt]>, " ", <$format, ["np", [], [], 'do_np]>, "Subsystems descend from ", <$format, ["tt", [], ["$help_sys"], 'do_tt]>, " ", <$format, ["np", [], [], 'do_np]>, "Object help descends from ", <$format, ["tt", [], ["$help_obj"], 'do_tt]>, " (generally libraries) ", <$format, ["np", [], [], 'do_np]>, "When naming an object, include its parentage where appropriate. However, dont include all levels of descending in the name. Use what is necessary to make it unique without being overbearing. For instance, ", <$format, ["tt", [], ["$help_coldc_func"], 'do_tt]>, " is perfectly fine, where ", <$format, ["tt", [], ["$help_coldcore_prog_coldc_func"], 'do_tt]>, " would be the ''full'' name (use the former, not the latter). All help nodes should begin with the 'help_' prefix, but not 'help_node_'. ", <$format, ["np", [], [], 'do_np]>, "only specify an index for a help node, when the help node is a unique concept (specifically in the name). For instance, the node 'Events' exists, and has several children nodes including the node 'Registering'. In this situation 'Events' is indexed but 'Registering' is not. ", <$format, ["np", [], [], 'do_np]>, "make sure the node settings are correct. These can be confusing, so try to navigate the tree from various directions and make sure everything is functioning and displaying properly. (see Help Node Settings for more information)}"], #[]]>; +var $help_node links = #[]; +var $root created_on = 870560232; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_node_creation]; +var $root manager = $help_node_creation; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_node_formatting.cdc Tue Aug 19 12:15:34 1997 @@ -0,0 +1,14 @@ + +new object $help_node_formatting: $help_obj_help_node; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "Format Conventions", "Format Conventions"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "Close attention should be given to how a help node is formatted, so that it looks the same as other help nodes. Everything from spacing to which tags to use in which situation should be the same from help node to help node of similar type (such as commands). ", <$format, ["np", [], [], 'do_np]>, "Formatting Conventions:", <$format, ["p", [], [], 'do_p]>, <$format, ["ul", [], [<$format, ["li", [], [<$format, ["link", [["node", "$help_formatting_general"]], ["General"], 'do_link]>], 'do_li]>, <$format, ["li", [], [<$format, ["link", [["node", "$help_formatting_commands"]], ["Commands"], 'do_link]>], 'do_li]>, <$format, ["li", [], [<$format, ["link", [["node", "$help_formatting_objects"]], ["Objects"], 'do_link]>], 'do_li]>], 'do_ul]>], #[['links, #[["General", "$help_formatting_general"], ["Commands", "$help_formatting_commands"], ["Objects", "$help_formatting_objects"]]]]]>; +var $help_node links = #[["General", $help_formatting_general], ["Commands", $help_formatting_commands], ["Objects", $help_formatting_objects]]; +var $root created_on = 870560380; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_node_formatting]; +var $root manager = $help_node_formatting; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_node_names.cdc Tue Aug 19 12:15:34 1997 @@ -0,0 +1,14 @@ + +new object $help_node_names: $help_obj_help_node; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "Names", "Names"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "Help nodes do not use ", <$format, ["link", [["node", "$help_app_names"]], ["name templates"], 'do_link]>, ", due to indexing and referencing concerns. Instead to have a help node be indexed with more than one name, include all the names in the node name, seperating them with a pipe character ('", <$format, ["tt", [], ["|"], 'do_tt]>, "'), such as:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["\"@help-list|@hlist|@hl\""], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "When this is done, each part will be indexed seperately, and only the first name in the group will be displayed on the Help Node Page."], #[['links, #[["name templates", "$help_app_names"]]]]]>; +var $help_node links = #[["name templates", $help_app_names]]; +var $root created_on = 870559844; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_node_names]; +var $root manager = $help_node_names; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_node_settings.cdc Tue Aug 19 12:15:34 1997 @@ -0,0 +1,14 @@ + +new object $help_node_settings: $help_obj_help_node; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "Settings", "Settings"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "Settings on a help node:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["group = yes", <$format, ["br", [], [], 'do_br]>, "holder = no", <$format, ["br", [], [], 'do_br]>, "index =", <$format, ["br", [], [], 'do_br]>, "nolist = yes"], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, "The group setting is used to control if a node lists the group (i.e. its siblings) at the bottom of the page. If group is enabled, they will be listed. Otherwise, they will not be listed. Note: If the help node is a child of ", <$format, ["tt", [], ["$help_obj"], 'do_tt]>, ", ", <$format, ["tt", [], ["$help_sys"], 'do_tt]>, ", ", <$format, ["tt", [], ["$help_cmds"], 'do_tt]>, " or a similar 'place-holder' object, its group should be set to no. ", <$format, ["np", [], [], 'do_np]>, "The holder setting is enabled when a help node exists purely for heirarchial reasons. This changes how the object is listed when a title is generated with all heirarchial information. If holder is enabled, no links will be made to the object. ", <$format, ["np", [], [], 'do_np]>, "The index setting is used to set the help index (children of $help_index). Only specify an index for a help node when the help node is a unique concept (specifically in the name). For instance, the node 'Events' exists, and has several children nodes including the node 'Registering'. In this situation 'Events' is indexed but 'Registering' is not. ", <$format, ["np", [], [], 'do_np]>, "The nolist setting is used to make an object 'invisible', so that it does not showup in groups or heirarchial information."], #[]]>; +var $help_node links = #[]; +var $root created_on = 870559923; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_node_settings]; +var $root manager = $help_node_settings; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_obj.cdc Tue Aug 19 12:15:34 1997 @@ -0,0 +1,17 @@ + +new object $help_obj: $help_core; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "Objects", "Objects"]; +var $help_node body = <$ctext_frob, [["This node isn't written yet"], #[]]>; +var $help_node group = 1; +var $help_node holder = 1; +var $help_node links = #[]; +var $help_node nolist = 0; +var $root created_on = 864416191; +var $root flags = ['variables, 'methods, 'code, 'fertile, 'core]; +var $root inited = 1; +var $root managed = [$help_obj]; +var $root manager = $help_obj; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_obj_code_lib.cdc Tue Aug 19 12:15:34 1997 @@ -0,0 +1,15 @@ + +new object $help_obj_code_lib: $help_obj; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "Code Lib", "Code Lib"]; +var $help_node body = <$ctext_frob, [[<$format, ["dl", [], [<$format, ["dt", [], [".", <$format, ["method", [["code_lib.quotes", 1]], ["quotes"], 'do_method]>, "()"], 'do_dt]>, <$format, ["dd", [], ["Returns as the entire 'library' of quotes."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["code_lib.add_random_quote", 1]], ["add_random_quote"], 'do_method]>, "(", <$format, ["var", [], ["quote"], 'do_var]>, "[, ", <$format, ["var", [], ["from"], 'do_var]>, "])"], 'do_dt]>, <$format, ["dd", [], ["Accepts a ", <$format, ["var", [], ["quote"], 'do_var]>, " and an optional attribution ", <$format, ["var", [], ["from"], 'do_var]>, " and adds it to the library of quotes."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["code_lib.random_quote", 1]], ["random_quote"], 'do_method]>, "()"], 'do_dt]>, <$format, ["dd", [], ["Returns as a list of strings, a randomly selected quote."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["code_lib.generate_listing", 1]], ["generate_listing"], 'do_method]>, "(", <$format, ["var", [], ["who"], 'do_var]>, "[, ", <$format, ["var", [], ["args"], 'do_var]>, "])"], 'do_dt]>, <$format, ["dd", [], ["Helper method for the @who commands for gathering the information for the table."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["code_lib.parse_name", 1]], ["parse_name"], 'do_method]>, "(", <$format, ["var", [], ["name"], 'do_var]>, "[, ", <$format, ["var", [], ["def"], 'do_var]>, "])"], 'do_dt]>, <$format, ["dd", [], [], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["code_lib.random_word", 1]], ["random_word"], 'do_method]>, "([", <$format, ["var", [], ["args"], 'do_var]>, "])"], 'do_dt]>, <$format, ["dd", [], ["Creates a random word. It can accept up to 3 args. First is the minimum length of the generated word, which defaults to 3 characters. Second is the maximum length of the generated word, defaulting to 10 characters. The third and final optional argument is a dictionary which can be used to specify additional consonants, vowels, and rare letters."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["code_lib.random_password", 1]], ["random_password"], 'do_method]>, "()"], 'do_dt]>, <$format, ["dd", [], ["Creates a random word suitable for use as a password."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["code_lib.punctuation_type", 1]], ["punctuation_type"], 'do_method]>, "(", <$format, ["var", [], ["str"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Given a string, ", <$format, ["var", [], ["str"], 'do_var]>, ", determines a verb to use when 'saying' that string based on the punctuation at the end of the string."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["code_lib.verify_code", 1]], ["verify_code"], 'do_method]>, "(", <$format, ["var", [], ["code"], 'do_var]>, ", ", <$format, ["var", [], ["method"], 'do_var]>, ", ", <$format, ["var", [], ["warn"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Checks over code, looking for particular common errors."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["code_lib.generate_object_listing", 1]], ["generate_object_listing"], 'do_method]>, "(", <$format, ["var", [], ["objs"], 'do_var]>, ", ", <$format, ["var", [], ["multi"], 'do_var]>, "[, ", <$format, ["var", [], ["args"], 'do_var]>, "])"], 'do_dt]>, <$format, ["dd", [], [], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["code_lib.point_to_line", 1]], ["point_to_line"], 'do_method]>, "(", <$format, ["var", [], ["err"], 'do_var]>, ", ", <$format, ["var", [], ["left"], 'do_var]>, ", ", <$format, ["var", [], ["right"], 'do_var]>, ", ", <$format, ["var", [], ["lineno"], 'do_var]>, ", ", <$format, ["var", [], ["line"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], [], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["code_lib._debug_listing", 1]], ["_debug_listing"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], [], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["code_lib.generate_debug_listing", 1]], ["generate_debug_listing"], 'do_method]>, "(", <$format, ["var", [], ["info"], 'do_var]>, ", ", <$format, ["var", [], ["mode"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], [], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["code_lib._trace_listing", 1]], ["_trace_listing"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], [], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["code_lib._trace_profile", 1]], ["_trace_profile"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], [], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["code_lib._profile_listing", 1]], ["_profile_listing"], 'do_method]>, "(", <$format, ["var", [], ["list"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], [], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["code_lib._show_ref", 1]], ["_show_ref"], 'do_method]>, "(", <$format, ["var", [], ["i"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], [], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["code_lib.valid_message_id", 1]], ["valid_message_id"], 'do_method]>, "(", <$format, ["var", [], ["str"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Verifies whether or not the given string, ", <$format, ["var", [], ["str"], 'do_var]>, ", is a valid id for a message."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["code_lib.valid_setting_id", 1]], ["valid_setting_id"], 'do_method]>, "(", <$format, ["var", [], ["str"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Verifies whether or not the given string, ", <$format, ["var", [], ["str"], 'do_var]>, ", is a valid id for a setting."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["code_lib.code_to_html", 1]], ["code_to_html"], 'do_method]>, "(", <$format, ["var", [], ["code"], 'do_var]>, "[, ", <$format, ["var", [], ["object"], 'do_var]>, "])"], 'do_dt]>, <$format, ["dd", [], ["Converts a code listing to HTML."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["code_lib._do_method_href", 1]], ["_do_method_href"], 'do_method]>, "(", <$format, ["var", [], ["method"], 'do_var]>, "[, ", <$format, ["var", [], ["object"], 'do_var]>, "])"], 'do_dt]>, <$format, ["dd", [], ["Helper method for .", <$format, ["method", [["code_lib.code_to_html", 1]], ["code_to_html"], 'do_method]>, "() for generating the HTML."], 'do_dd]>], 'do_dl]>], #[]]>; +var $help_node index = $help_index_objects; +var $help_node links = #[]; +var $root created_on = 870639275; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_obj_code_lib]; +var $root manager = $help_obj_code_lib; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_obj_data_lib.cdc Tue Aug 19 12:15:34 1997 @@ -0,0 +1,15 @@ + +new object $help_obj_data_lib: $help_obj; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "Data Lib", "Data Lib"]; +var $help_node body = <$ctext_frob, [[<$format, ["dl", [], [<$format, ["dt", [], [".", <$format, ["method", [["data_lib.unparse_indent", 1]], ["unparse_indent"], 'do_method]>, "(", <$format, ["var", [], ["value"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Accepts a ", <$format, ["link", [["node", "$help_coldc_types"]], ["valid ColdC data"], 'do_link]>, " item as an argument, and returns a textual representation similar to the result of a ", <$format, ["link", [["node", "$help_func_toliteral"]], ["toliteral"], 'do_link]>, "() call, except in a more driver-friendly manner."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["data_lib.data_map", 1]], ["data_map"], 'do_method]>, "(", <$format, ["var", [], ["val"], 'do_var]>, ", ", <$format, ["var", [], ["method"], 'do_var]>, ", ", <$format, ["var", [], ["options"], 'do_var]>, "[, ", <$format, ["var", [], ["@args"], 'do_var]>, "])"], 'do_dt]>, <$format, ["dd", [], ["Maps a method over elements of any data structure. You can use it to map a function inside a list on a frob, for instance. Options decide which data types and frob classes will be affected and which will be left alone. Okay, options is a dict of [key, value] pairs.", <$format, ["dl", [["columned", 1]], [<$format, ["dt", [], ["['object, something]"], 'do_dt]>, <$format, ["dd", [], ["If its an object, it calls the method from that object, otherwise it calls it from data value."], 'do_dd]>, <$format, ["dt", [], ["['list,1]"], 'do_dt]>, <$format, ["dd", [], ["map into lists."], 'do_dd]>, <$format, ["dt", [], ["['dictionary,1]"], 'do_dt]>, <$format, ["dd", [], ["map into dicts."], 'do_dd]>, <$format, ["dt", [], ["['frob,1]"], 'do_dt]>, <$format, ["dd", [], ["map into frobs, you have to use the option 'class to tell it the class to affect."], 'do_dd]>, <$format, ["dt", [], ["['all,1]"], 'do_dt]>, <$format, ["dd", [], ["affect all types."], 'do_dd]>, <$format, ["dt", [], ["[type, 1]"], 'do_dt]>, <$format, ["dd", [], ["affect the types not mentioned above."], 'do_dd]>], 'do_dl]>], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["data_lib.is_valid_type", 1]], ["is_valid_type"], 'do_method]>, "(", <$format, ["var", [], ["type"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Given a ", <$format, ["link", [["node", "$help_coldc_types_symbols"]], ["symbol"], 'do_link]>, ", returns true if it is a ", <$format, ["link", [["node", "$help_coldc_types"]], ["valid ColdC type"], 'do_link]>, ", false if not."], 'do_dd]>], 'do_dl]>], #[['links, #[["valid ColdC data", "$help_coldc_types"], ["toliteral", "$help_func_toliteral"], ["symbol", "$help_coldc_types_symbols"], ["valid ColdC type", "$help_coldc_types"]]]]]>; +var $help_node index = $help_index_objects; +var $help_node links = #[["valid ColdC data", $help_coldc_types], ["toliteral", $help_func_toliteral], ["symbol", $help_coldc_types_symbols], ["valid ColdC type", $help_coldc_types]]; +var $root created_on = 870208061; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_obj_data_lib]; +var $root manager = $help_obj_data_lib; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_obj_has_text.cdc Tue Aug 19 12:15:34 1997 @@ -0,0 +1,16 @@ + +new object $help_obj_has_text: $help_obj; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "has_text", "has_text"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "$has_text provides general services for handling text and is largely used in $note and $mail_message.", <$format, ["p", [], [], 'do_p]>, <$format, ["subj", [["level", "3"]], ["Settings"], 'do_subj]>, <$format, ["dl", [], [<$format, ["dt", [], [<$format, ["quote", [], ["plaintext"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Is either yes or no. Yes indicates that the text is plaintext and no processing need be done. No indicates that the text is CML and needs to be handled as such."], 'do_dd]>], 'do_dl]>, <$format, ["subj", [["level", "3"]], [<$format, ["link", [["node", "$help_obj_has_text_methods"]], ["Methods"], 'do_link]>], 'do_subj]>, " ", <$format, ["subj", [["level", "3"]], ["Variables"], 'do_subj]>, <$format, ["dl", [], [<$format, ["dt", [], [<$format, ["quote", [], ["text"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Stores the text in either plaintext or the internal representation of CML depending on the setting \"plaintext\"."], 'do_dd]>], 'do_dl]>], #[['links, #[["Methods", "$help_obj_has_text_methods"]]]]]>; +var $help_node group = 1; +var $help_node index = $help_index_objects; +var $help_node links = #[["Methods", $help_obj_has_text_methods]]; +var $root created_on = 864411446; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_obj_has_text]; +var $root manager = $help_obj_has_text; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_obj_has_text_methods.cdc Tue Aug 19 12:15:34 1997 @@ -0,0 +1,14 @@ + +new object $help_obj_has_text_methods: $help_obj_has_text; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "Methods", "Methods"]; +var $help_node body = <$ctext_frob, [[<$format, ["subj", [["level", "3"]], ["Methods"], 'do_subj]>, " ", <$format, ["subj", [["level", "4"]], ["Accessors"], 'do_subj]>, <$format, ["dl", [], [<$format, ["dt", [], [<$format, ["quote", [], [".text()"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Returns the text in the format it is stored in, either plaintext or the frob representation of CML."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], [".get_raw_text()"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Returns the raw text to be edited. For plaintext, this is the text, while for CML, this will be the decompiled CML in it's raw form."], 'do_dd]>, <$format, ["dt", [], [<$format, ["quote", [], [".lines()"], 'do_quote]>], 'do_dt]>, <$format, ["dd", [], ["Returns a number identifying how many lines of text there are. Note that with CML, this is not accurate for the formatted output but rather for the uncompiled CML text."], 'do_dd]>], 'do_dl]>, <$format, ["subj", [["level", "4"]], ["Mutators"], 'do_subj]>, " ", <$format, ["dt", [], [<$format, ["quote", [], [".set_text(txt)"], 'do_quote]>], 'do_dt]>, " ", <$format, ["dd", [], ["Accepts either a single line of text or a list of lines as input. If the text is set to not be plaintext, it will compile the text with the CML compiler."], 'do_dd]>, " ", <$format, ["dt", [], [<$format, ["quote", [], [".ins_line(txt, [loc])"], 'do_quote]>], 'do_dt]>, " ", <$format, ["dd", [], ["Accepts a line of text and an optional location (given by line number) for where to put it. If the location is not specified, it defaults to adding the line of text at the end."], 'do_dd]>, " ", <$format, ["dt", [], [<$format, ["quote", [], [".del_text()"], 'do_quote]>], 'do_dt]>, " ", <$format, ["dd", [], ["Clears the text."], 'do_dd]>, " ", <$format, ["dt", [], [<$format, ["quote", [], [".del_line(linestr)"], 'do_quote]>], 'do_dt]>, " ", <$format, ["dd", [], ["Removes the first instance of the string (must be a complete line) given as the argument from the text."], 'do_dd]>, " ", <$format, ["dt", [], [<$format, ["quote", [], [".del_nline(nline)"], 'do_quote]>], 'do_dt]>, " ", <$format, ["dd", [], ["Removes the line specified by the line number given as the argument from the text."], 'do_dd]>, " ", <$format, ["dt", [], [<$format, ["quote", [], [".ins_lines(lines, loc)"], 'do_quote]>], 'do_dt]>, " ", <$format, ["dd", [], ["Inserts the list of strings at the specified location."], 'do_dd]>, "}"], #[]]>; +var $help_node links = #[]; +var $root created_on = 864416982; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_obj_has_text_methods]; +var $root manager = $help_obj_has_text_methods; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_obj_help_node.cdc Tue Aug 19 12:15:34 1997 @@ -0,0 +1,16 @@ + +new object $help_obj_help_node: $help_obj; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "Help Node", "Help Node"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "These pages explain how to create a help system (or just a single help node), and the conventions and standards that should be followed.", <$format, ["p", [], [], 'do_p]>, <$format, ["dl", [["columned", 1]], [<$format, ["dt", [], [<$format, ["link", [["node", "$help_node_commands"]], ["Commands"], 'do_link]>], 'do_dt]>, <$format, ["dd", [], ["Commands to use in manipulating help nodes"], 'do_dd]>, <$format, ["dt", [], [<$format, ["link", [["node", "$help_node_names"]], ["Names"], 'do_link]>], 'do_dt]>, <$format, ["dd", [], ["Information about naming help nodes"], 'do_dd]>, <$format, ["dt", [], [<$format, ["link", [["node", "$help_node_settings"]], ["Setting"], 'do_link]>], 'do_dt]>, <$format, ["dd", [], ["Information about help node settings"], 'do_dd]>, <$format, ["dt", [], [<$format, ["link", [["node", "$help_node_creation"]], ["Creation"], 'do_link]>], 'do_dt]>, <$format, ["dd", [], ["Conventions used in creating a help node"], 'do_dd]>, <$format, ["dt", [], [<$format, ["link", [["node", "$help_node_formatting"]], ["Formatting"], 'do_link]>], 'do_dt]>, <$format, ["dd", [], ["Common Help Node formatting Conventions"], 'do_dd]>], 'do_dl]>], #[['links, #[["Commands", "$help_node_commands"], ["Names", "$help_node_names"], ["Setting", "$help_node_settings"], ["Creation", "$help_node_creation"], ["Formatting", "$help_node_formatting"]]]]]>; +var $help_node group = 1; +var $help_node index = $help_index_objects; +var $help_node links = #[["Commands", $help_node_commands], ["Names", $help_node_names], ["Setting", $help_node_settings], ["Creation", $help_node_creation], ["Formatting", $help_node_formatting]]; +var $root created_on = 870559421; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_obj_help_node]; +var $root manager = $help_obj_help_node; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_obj_integer.cdc Tue Aug 19 12:15:34 1997 @@ -0,0 +1,15 @@ + +new object $help_obj_integer: $help_obj; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "Integer", "Integer"]; +var $help_node body = <$ctext_frob, [[<$format, ["dl", [["ind", "8"]], [<$format, ["dt", [], [".", <$format, ["method", [["integer.n_to_nth", 1]], ["n_to_nth"], 'do_method]>, "(", <$format, ["var", [], ["number"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Given an integer, returns the numerical ordinal form. For example, given the integer '1', the method would return the string \"1st\"."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["integer.parse_range", 1]], ["parse_range"], 'do_method]>, "(", <$format, ["var", [], ["range"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Given a string representing a range, returns a list of two elements representing the range in a parsed form."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["integer.to_english", 1]], ["to_english"], 'do_method]>, "(", <$format, ["var", [], ["number"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Given a number, returns a string representation of that number that has had commas inserted according to the US standard."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["integer.parse_range", 1]], ["parse_range"], 'do_method]>, "(", <$format, ["var", [], ["x"], 'do_var]>, ", ", <$format, ["var", [], ["y"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Given a lower and upper bound, returns a list of all numbers between them, including the bounds."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["integer.to_string", 1]], ["to_string"], 'do_method]>, "(", <$format, ["var", [], ["number"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Given an integer, converts it to a string with no transformations performed upon it."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["integer._range_type", 1]], ["_range_type"], 'do_method]>, "(", <$format, ["var", [], ["type"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Helper method for .", <$format, ["method", [["integer.range", 1]], ["range"], 'do_method]>, "()."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["integer.and", 1]], ["and"], 'do_method]>, "(", <$format, ["var", [], ["x"], 'do_var]>, ", ", <$format, ["var", [], ["y"], 'do_var]>, ") ", <$format, ["i", [], ["native"], 'do_i]>], 'do_dt]>, <$format, ["dd", [], ["Performs a bitwise ", <$format, ["i", [], ["and"], 'do_i]>, " operation upon ", <$format, ["i", [], ["x"], 'do_i]>, " and ", <$format, ["i", [], ["y"], 'do_i]>, "."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["integer.or", 1]], ["or"], 'do_method]>, "(", <$format, ["var", [], ["x"], 'do_var]>, ", ", <$format, ["var", [], ["y"], 'do_var]>, ") ", <$format, ["i", [], ["native"], 'do_i]>], 'do_dt]>, <$format, ["dd", [], ["Performs a bitwise ", <$format, ["i", [], ["or"], 'do_i]>, " operation upon ", <$format, ["i", [], ["x"], 'do_i]>, " and ", <$format, ["i", [], ["y"], 'do_i]>, "."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["integer.xor", 1]], ["xor"], 'do_method]>, "(", <$format, ["var", [], ["x"], 'do_var]>, ", ", <$format, ["var", [], ["y"], 'do_var]>, ") ", <$format, ["i", [], ["native"], 'do_i]>], 'do_dt]>, <$format, ["dd", [], ["Performs a bitwise ", <$format, ["i", [], ["xor"], 'do_i]>, " operation upon ", <$format, ["i", [], ["x"], 'do_i]>, " and ", <$format, ["i", [], ["y"], 'do_i]>, "."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["integer.shleft", 1]], ["shleft"], 'do_method]>, "(", <$format, ["var", [], ["x"], 'do_var]>, ", ", <$format, ["var", [], ["y"], 'do_var]>, ") ", <$format, ["i", [], ["native"], 'do_i]>], 'do_dt]>, <$format, ["dd", [], ["Performs a ", <$format, ["i", [], ["left shift"], 'do_i]>, " operation upon ", <$format, ["i", [], ["x"], 'do_i]>, " and ", <$format, ["i", [], ["y"], 'do_i]>, "."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["integer.shright", 1]], ["shright"], 'do_method]>, "(", <$format, ["var", [], ["x"], 'do_var]>, ", ", <$format, ["var", [], ["y"], 'do_var]>, ") ", <$format, ["i", [], ["native"], 'do_i]>], 'do_dt]>, <$format, ["dd", [], ["Performs a ", <$format, ["i", [], ["right shift"], 'do_i]>, " operation upon ", <$format, ["i", [], ["x"], 'do_i]>, " and ", <$format, ["i", [], ["y"], 'do_i]>, "."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["integer.not", 1]], ["not"], 'do_method]>, "(", <$format, ["var", [], ["number"], 'do_var]>, ") ", <$format, ["i", [], ["native"], 'do_i]>], 'do_dt]>, <$format, ["dd", [], ["Performs a bitwise ", <$format, ["i", [], ["not"], 'do_i]>, " operation upon ", <$format, ["i", [], ["number"], 'do_i]>, "."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["integer.to_english_text", 1]], ["to_english_text"], 'do_method]>, "(", <$format, ["var", [], ["number"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Given an integer, converts it to englist text form, spelling out all numbers."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["integer.to_bytes", 1]], ["to_bytes"], 'do_method]>, "(", <$format, ["var", [], ["number"], 'do_var]>, "[, ", <$format, ["var", [], ["long"], 'do_var]>, "])"], 'do_dt]>, <$format, ["dd", [], ["Given an integer, converts it to the number of bytes. If the optional argument ", <$format, ["i", [], ["long"], 'do_i]>, " is given, then the long form of the unit name (kilobyte vs. kb) will be used."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["integer.to_roman_numeral", 1]], ["to_roman_numeral"], 'do_method]>, "(", <$format, ["var", [], ["number"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Given an integer, converts it to the roman numeral representation."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["integer.roman_numeral_scheme", 1]], ["roman_numeral_scheme"], 'do_method]>, "(", <$format, ["var", [], ["val"], 'do_var]>, ", ", <$format, ["var", [], ["x"], 'do_var]>, ", ", <$format, ["var", [], ["y"], 'do_var]>, ", ", <$format, ["var", [], ["z"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Helper method for .", <$format, ["method", [["integer.to_roman_numeral", 1]], ["to_roman_numeral"], 'do_method]>, "()."], 'do_dd]>], 'do_dl]>], #[]]>; +var $help_node index = $help_index_objects; +var $help_node links = #[]; +var $root created_on = 870205331; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_obj_integer]; +var $root manager = $help_obj_integer; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_obj_math.cdc Tue Aug 19 12:15:34 1997 @@ -0,0 +1,16 @@ + +new object $help_obj_math: $help_obj; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "Math Library", "Math Library"]; +var $help_node body = <$ctext_frob, [[<$format, ["subj", [["level", "3"]], ["Vector operations"], 'do_subj]>, <$format, ["dl", [], [<$format, ["dt", [], [".", <$format, ["method", [["math.add", 1]], ["add"], 'do_method]>, "(", <$format, ["var", [], ["v1"], 'do_var]>, ",", <$format, ["var", [], ["v2"], 'do_var]>, ") native"], 'do_dt]>, <$format, ["dd", [], ["Vector addition. It adds two floating-point lists, element-by-element."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["math.sub", 1]], ["sub"], 'do_method]>, "(", <$format, ["var", [], ["v1"], 'do_var]>, ",", <$format, ["var", [], ["v2"], 'do_var]>, ") native"], 'do_dt]>, <$format, ["dd", [], ["Vector substraction."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["math.dot", 1]], ["dot"], 'do_method]>, "(", <$format, ["var", [], ["v1"], 'do_var]>, ",", <$format, ["var", [], ["v2"], 'do_var]>, ") native"], 'do_dt]>, <$format, ["dd", [], ["Dot product of two vectors."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["math.cross", 1]], ["cross"], 'do_method]>, "(", <$format, ["var", [], ["v1"], 'do_var]>, ",", <$format, ["var", [], ["v2"], 'do_var]>, ") native"], 'do_dt]>, <$format, ["dd", [], ["Cross product of 3-dimensional vectors."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["math.distance", 1]], ["distance"], 'do_method]>, "(", <$format, ["var", [], ["v1"], 'do_var]>, ",", <$format, ["var", [], ["v2"], 'do_var]>, ") native"], 'do_dt]>, <$format, ["dd", [], ["Euclidean distance between the two vectors."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["math.scale", 1]], ["scale"], 'do_method]>, "(", <$format, ["var", [], ["x"], 'do_var]>, ",", <$format, ["var", [], ["v"], 'do_var]>, ") native"], 'do_dt]>, <$format, ["dd", [], ["Scales the vector ", <$format, ["var", [], ["v"], 'do_var]>, " by scalar ", <$format, ["var", [], ["x"], 'do_var]>, "."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["math.minor", 1]], ["minor"], 'do_method]>, "(", <$format, ["var", [], ["v1"], 'do_var]>, ",", <$format, ["var", [], ["v2"], 'do_var]>, ") native"], 'do_dt]>, <$format, ["dd", [], ["Calculates element-by-element minimum of the two lists. Used for boxes."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["math.major", 1]], ["major"], 'do_method]>, "(", <$format, ["var", [], ["v1"], 'do_var]>, ",", <$format, ["var", [], ["v2"], 'do_var]>, ") native"], 'do_dt]>, <$format, ["dd", [], ["Calculates element-by-element maximum."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["math.is_lower", 1]], ["is_lower"], 'do_method]>, "(", <$format, ["var", [], ["v1"], 'do_var]>, ",", <$format, ["var", [], ["v2"], 'do_var]>, ") native"], 'do_dt]>, <$format, ["dd", [], ["Returns true if every element of ", <$format, ["var", [], ["v1"], 'do_var]>, " is lesser or equal than corresponding element of ", <$format, ["var", [], ["v2"], 'do_var]>, "."], 'do_dd]>], 'do_dl]>, <$format, ["subj", [["level", "3"]], ["Coordinate operations"], 'do_subj]>, <$format, ["dl", [], [<$format, ["dt", [], [".", <$format, ["method", [["math.pi", 1]], ["pi"], 'do_method]>, "()"], 'do_dt]>, <$format, ["dd", [], ["Returns pi."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["math.pi2", 1]], ["pi2"], 'do_method]>, "()"], 'do_dt]>, <$format, ["dd", [], ["Returns 2*pi."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["math.deg_rad", 1]], ["deg_rad"], 'do_method]>, "(", <$format, ["var", [], ["angle"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Converts the ", <$format, ["var", [], ["angle"], 'do_var]>, " from degrees to radians."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["math.rad_deg", 1]], ["rad_deg"], 'do_method]>, "(", <$format, ["var", [], ["angle"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Converts the ", <$format, ["var", [], ["angle"], 'do_var]>, " from radians to degrees."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["math.polar_rectangular", 1]], ["polar_rectangular"], 'do_method]>, "(", <$format, ["var", [], ["coords"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Transforms pair [distance, angle] into [x,y]."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["math.rectangular_polar", 1]], ["rectangular_polar"], 'do_method]>, "(", <$format, ["var", [], ["coords"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Inverse of the above."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["math.cylindrical_rectangular", 1]], ["cylindrical_rectangular"], 'do_method]>, "(", <$format, ["var", [], ["coords"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Transforms [r, angle, z] into [x,y,z]."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["math.rectangular_cylindrical", 1]], ["rectangular_cylindrical"], 'do_method]>, "(", <$format, ["var", [], ["coords"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Inverse of the above."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["math.spherical_rectangular", 1]], ["spherical_rectangular"], 'do_method]>, "(", <$format, ["var", [], ["coords"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Transform [r, phi, theta] into [x,y,z]."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["math.rectangular_spherical", 1]], ["rectangular_spherical"], 'do_method]>, "(", <$format, ["var", [], ["coords"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Inverse of the above."], 'do_dd]>], 'do_dl]>, <$format, ["subj", [["level", "3"]], ["Matrix operations"], 'do_subj]>, <$format, ["dl", [], [<$format, ["dt", [], [".", <$format, ["method", [["math.matrix_add", 1]], ["matrix_add"], 'do_method]>, "(", <$format, ["var", [], ["m1"], 'do_var]>, ",", <$format, ["var", [], ["m2"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Add two matrices."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["math.matrix_sub", 1]], ["matrix_sub"], 'do_method]>, "(", <$format, ["var", [], ["m1"], 'do_var]>, ",", <$format, ["var", [], ["m2"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Substract ", <$format, ["var", [], ["m2"], 'do_var]>, " from ", <$format, ["var", [], ["m1"], 'do_var]>], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["math.matrix_mul", 1]], ["matrix_mul"], 'do_method]>, "(", <$format, ["var", [], ["m1"], 'do_var]>, ",", <$format, ["var", [], ["m2"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Multiply the two matrices (their dimensions must be compatible for multiplication, of course)"], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["math.matrix_scale", 1]], ["matrix_scale"], 'do_method]>, "(", <$format, ["var", [], ["s"], 'do_var]>, ",", <$format, ["var", [], ["m"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Scale the matrix ", <$format, ["var", [], ["m"], 'do_var]>, " by scalar ", <$format, ["var", [], ["s"], 'do_var]>, "."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["math.transpose", 1]], ["transpose"], 'do_method]>, "(", <$format, ["var", [], ["m"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Transpose the matrix. This will actually work regardless of the element type, so the operation is useful on lists, as well."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["math.ident_mat", 1]], ["ident_mat"], 'do_method]>, "(", <$format, ["var", [], ["n"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Returns ", <$format, ["var", [], ["n"], 'do_var]>, "-dimensional identity matrix."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["math.translation_mat", 1]], ["translation_mat"], 'do_method]>, "(", <$format, ["var", [], ["v"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Constructs the matrix for translation by vector ", <$format, ["var", [], ["v"], 'do_var]>, ". It works for 2d or 3d case."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["math.tensor", 1]], ["tensor"], 'do_method]>, "(", <$format, ["var", [], ["m1"], 'do_var]>, ",", <$format, ["var", [], ["m2"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Tensor product of the two vectors. This is the matrix ", <$format, ["var", [], ["A"], 'do_var]>, " with the property that Ax=<x,v1>v2."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["math.skew", 1]], ["skew"], 'do_method]>, "(", <$format, ["var", [], ["v"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Construct a skew operator for the vector ", <$format, ["var", [], ["v"], 'do_var]>, ". That's matrix ", <$format, ["var", [], ["A"], 'do_var]>, " that turns any vector into its cross product with ", <$format, ["var", [], ["v"], 'do_var]>, ". This is used by rotation_mat_3d."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["math.rotation_mat_2d", 1]], ["rotation_mat_2d"], 'do_method]>, "(", <$format, ["var", [], ["angle"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Construct 2d rotation matrix for the given ", <$format, ["var", [], ["angle"], 'do_var]>, "."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["math.rotation_mat_3d", 1]], ["rotation_mat_3d"], 'do_method]>, "(", <$format, ["var", [], ["axis"], 'do_var]>, ",", <$format, ["var", [], ["angle"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["This is 3d rotation. Valid values for ", <$format, ["var", [], ["axis"], 'do_var]>, " are 'x, 'y, 'z, or a 3d vector. The result is a homogenous matrix."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["math.scale_mat", 1]], ["scale_mat"], 'do_method]>, "(", <$format, ["var", [], ["scale"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Returns a scaling matrix (nonuniform). Scale is assumed to be 2d or 3d vector."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["math.transform_vect", 1]], ["transform_vect"], 'do_method]>, "(", <$format, ["var", [], ["m"], 'do_var]>, ",", <$format, ["var", [], ["v"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Transform the vector by matrix. This will work for both normal and homogenous matrices (determined by comparing the dimensions of the matrix and vector)."], 'do_dd]>], 'do_dl]>, <$format, ["subj", [["level", "3"]], ["Miscellanous"], 'do_subj]>, <$format, ["dl", [], [<$format, ["dt", [], [".", <$format, ["method", [["math.runge", 1]], ["runge"], 'do_method]>, "(", <$format, ["var", [], ["x"], 'do_var]>, ",", <$format, ["var", [], ["y"], 'do_var]>, ",", <$format, ["var", [], ["h"], 'do_var]>, ",", <$format, ["var", [], ["f"], 'do_var]>, ",", <$format, ["var", [], ["data"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["This is one step in Runge-Kutta method for ordinary differential equations. Scalar ", <$format, ["var", [], ["x"], 'do_var]>, " and vector ", <$format, ["var", [], ["y"], 'do_var]>, " are the current values of independant and dependant variables, ", <$format, ["var", [], ["h"], 'do_var]>, " is the timestep, ", <$format, ["var", [], ["f"], 'do_var]>, " is the method on the sender that accepts ", <$format, ["var", [], ["x"], 'do_var]>, ", ", <$format, ["var", [], ["y"], 'do_var]>, ", and ", <$format, ["var", [], ["data"], 'do_var]>, ", and returns the right-hand-side of the equation."], 'do_dd]>], 'do_dl]>], #[]]>; +var $help_node group = 1; +var $help_node index = $help_index_objects; +var $help_node links = #[]; +var $root created_on = 869046674; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_obj_math]; +var $root manager = $help_obj_math; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_obj_object_lib.cdc Tue Aug 19 12:15:34 1997 @@ -0,0 +1,15 @@ + +new object $help_obj_object_lib: $help_obj; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "Object Lib", "Object Lib"]; +var $help_node body = <$ctext_frob, [[<$format, ["dl", [["ind", "8"]], [<$format, ["dt", [], [".", <$format, ["method", [["object_lib.to_dbref", 1]], ["to_dbref"], 'do_method]>, "(", <$format, ["var", [], ["obj"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Accepts strings or objnums and returns a valid objnum."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["object_lib.get_name", 1]], ["get_name"], 'do_method]>, "(", <$format, ["var", [], ["obj"], 'do_var]>, "[, ", <$format, ["var", [], ["@args"], 'do_var]>, "])"], 'do_dt]>, <$format, ["dd", [], [], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["object_lib.see_perms", 1]], ["see_perms"], 'do_method]>, "(", <$format, ["var", [], ["obj"], 'do_var]>, "[, ", <$format, ["var", [], ["@args"], 'do_var]>, "])"], 'do_dt]>, <$format, ["dd", [], [], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["object_lib.str_to_objlist", 1]], ["str_to_objlist"], 'do_method]>, "(", <$format, ["var", [], ["args"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], [], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["object_lib.list_to_objlist", 1]], ["list_to_objlist"], 'do_method]>, "(", <$format, ["var", [], ["args"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], [], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["object_lib.parse_method_flags", 1]], ["parse_method_flags"], 'do_method]>, "(", <$format, ["var", [], ["flags"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], [], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["object_lib.format_object", 1]], ["format_object"], 'do_method]>, "(", <$format, ["var", [], ["obj"], 'do_var]>, ", ", <$format, ["var", [], ["chop"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], [], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["object_lib.format_method_header", 1]], ["format_method_header"], 'do_method]>, "(", <$format, ["var", [], ["obj"], 'do_var]>, ", ", <$format, ["var", [], ["method"], 'do_var]>, ", ", <$format, ["var", [], ["opt"], 'do_var]>, ", ", <$format, ["var", [], ["flags"], 'do_var]>, ", ", <$format, ["var", [], ["access"], 'do_var]>, ")"], 'do_dt]>, <$format, ["dd", [], [], 'do_dd]>], 'do_dl]>], #[]]>; +var $help_node index = $help_index_objects; +var $help_node links = #[]; +var $root created_on = 870210595; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_obj_object_lib]; +var $root manager = $help_obj_object_lib; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_ranges.cdc Tue Aug 19 12:15:35 1997 @@ -0,0 +1,16 @@ + +new object $help_ranges: $help_sys; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "Ranges", "Ranges"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "Ranges are used to specify a set of numbers to identify which part of a set is the target of the operation. ", <$format, ["np", [], [], 'do_np]>, "They are relatively simple, with a few special identifiers with significant meaning.", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], ["<begin>-<end>"], 'do_dfn]>, <$format, ["p", [], [], 'do_p]>, <$format, ["tt", [], ["<begin>"], 'do_tt]>, " specifies where the range should begin and will be either a number or one of the special identifiers. ", <$format, ["tt", [], ["<end>"], 'do_tt]>, " specifies the end of the range and again, will be either a number of one of the special identifiers.", <$format, ["p", [], [], 'do_p]>, <$format, ["p", [], [], 'do_p]>, <$format, ["dl", [["columned", 1]], ["Special Identifiers: ", <$format, ["dt", [], [<$format, ["tt", [], ["'^'"], 'do_tt]>], 'do_dt]>, <$format, ["dd", [], ["First item"], 'do_dd]>, <$format, ["dt", [], [<$format, ["tt", [], ["'.'"], 'do_tt]>], 'do_dt]>, <$format, ["dd", [], ["Current position"], 'do_dd]>, <$format, ["dt", [], [<$format, ["tt", [], ["'$'"], 'do_tt]>], 'do_dt]>, <$format, ["dd", [], ["Last item"], 'do_dd]>], 'do_dl]>], #[]]>; +var $help_node group = 1; +var $help_node index = $help_index_subsystem; +var $help_node links = #[]; +var $root created_on = 865132499; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_ranges]; +var $root manager = $help_ranges; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_sys.cdc Tue Aug 19 12:15:34 1997 @@ -0,0 +1,16 @@ + +new object $help_sys: $help_core; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "SubSystems", "SubSystems"]; +var $help_node body = <$ctext_frob, [["This node isn't written yet"], #[]]>; +var $help_node group = 1; +var $help_node links = #[]; +var $help_node nolist = 1; +var $root created_on = 870556878; +var $root flags = ['variables, 'methods, 'code, 'core, 'fertile]; +var $root inited = 1; +var $root managed = [$help_sys]; +var $root manager = $help_sys; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_sys_bad_commands.cdc Tue Aug 19 12:15:35 1997 @@ -0,0 +1,15 @@ + +new object $help_sys_bad_commands: $help_sys; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "Bad Commands", "Bad Commands"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "A number of other systems commonly use commands which do not fit into the command layout that ColdCore uses, therefore, these commands are handled by a special method that informs the player that these commands have changed. The current commands that have been listed as bad commands are: ", <$format, ["dfn", [["nobound", 1], [" ", 1], ["ind", "4"]], [<$format, ["table", [["cols", "30%,70%"]], [<$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["Bad Command"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["New Command"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["+com"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["<", <$format, ["link", [["node", "$help_sys_channels"]], ["channel"], 'do_link]>, " alias> on|off|who|<message>"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["@alias"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["@add-name-alias|@add-command-alias"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["@check|@paranoid"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["@monitor"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["@create"], 'do_tt]>], 'do_td]>, <$format, ["td", [], [<$format, ["link", [["node", "$help_cmd_new"]], ["@new"], 'do_link]>, "|", <$format, ["link", [["node", "$help_cmd_spawn"]], ["@spawn"], 'do_link]>], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["@gender"], 'do_tt]>], 'do_td]>, <$format, ["td", [], [<$format, ["link", [["node", "$help_cmd_set"]], ["@set"], 'do_link]>, " gender = male|female|neuter"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["@lock"], 'do_tt]>], 'do_td]>, <$format, ["td", [], [<$format, ["link", [["node", "$help_cmd_set"]], ["@set"], 'do_link]>, " <objref>:lock = <lock>"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["@unlock"], 'do_tt]>], 'do_td]>, <$format, ["td", [], [<$format, ["link", [["node", "$help_cmd_set"]], ["@set"], 'do_link]>, " <objref>:lock = "], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["@version"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["@status"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["help"], 'do_tt]>], 'do_td]>, <$format, ["td", [], [<$format, ["link", [["node", "$help_cmd_help"]], ["@help"], 'do_link]>], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["news"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["@news"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["page"], 'do_tt]>], 'do_td]>, <$format, ["td", [], [<$format, ["link", [["node", "$help_cmd_page"]], ["@page"], 'do_link]>, " <player> with <message>"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["quit"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["@quit"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["uptime"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["@status"], 'do_td]>], 'do_tr]>, <$format, ["tr", [], [<$format, ["td", [], [<$format, ["tt", [], ["who"], 'do_tt]>], 'do_td]>, <$format, ["td", [], ["@who"], 'do_td]>], 'do_tr]>], 'do_table]>], 'do_dfn]>], #[['links, #[["channel", "$help_sys_channels"], ["@new", "$help_cmd_new"], ["@spawn", "$help_cmd_spawn"], ["@set", "$help_cmd_set"], ["@help", "$help_cmd_help"], ["@page", "$help_cmd_page"]]]]]>; +var $help_node index = $help_index_subsystem; +var $help_node links = #[["channel", $help_sys_channels], ["@new", $help_cmd_new], ["@spawn", $help_cmd_spawn], ["@set", $help_cmd_set], ["@help", $help_cmd_help], ["@page", $help_cmd_page]]; +var $root created_on = 870917437; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_sys_bad_commands]; +var $root manager = $help_sys_bad_commands; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_sys_event_hook.cdc Tue Aug 19 12:15:34 1997 @@ -0,0 +1,14 @@ + +new object $help_sys_event_hook: $help_sys_events; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "Hooks", "Hooks"]; +var $help_node body = <$ctext_frob, [["This node isn't written yet"], #[]]>; +var $help_node links = #[]; +var $root created_on = 864944385; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_sys_event_hook]; +var $root manager = $help_sys_event_hook; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_sys_event_recv.cdc Tue Aug 19 12:15:34 1997 @@ -0,0 +1,14 @@ + +new object $help_sys_event_recv: $help_sys_events; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "Receiving", "Receiving"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "Events are received through the following method:", <$format, ["p", [], [], 'do_p]>, <$format, ["dl", [], [<$format, ["dt", [], [".event_notify(event, obj, @args)"], 'do_dt]>, <$format, ["dd", [], ["Receive an event caused by 'obj'."], 'do_dd]>], 'do_dl]>, <$format, ["p", [], [], 'do_p]>, "The ", <$format, ["tt", [], ["event"], 'do_tt]>, " argument is the name of the event. The ", <$format, ["tt", [], ["obj"], 'do_tt]>, " argument is the object which caused the event, any subsequent arguments are those sent to ", <$format, ["tt", [], [".send_event()"], 'do_tt]>, ", which is explained in the section ", <$format, ["link", [["node", "help_sys_event_send"]], ["Sending Events"], 'do_link]>, "."], #[['links, #[["Sending Events", "help_sys_event_send"]]]]]>; +var $help_node links = #[["Sending Events", $help_sys_event_send]]; +var $root created_on = 864944385; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_sys_event_recv]; +var $root manager = $help_sys_event_recv; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_sys_event_register.cdc Tue Aug 19 12:15:34 1997 @@ -0,0 +1,14 @@ + +new object $help_sys_event_register: $help_sys_events; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "Registering", "Registering"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "The Registering subsystem allows an object to register an event hook along with when it should be turned on/off and when it should be updated (such as when the object is moved). Events are registered with the Event to Hook, when to Hook it and where to Hook it at (relay). ", <$format, ["np", [], [], 'do_np]>, "The event to hook can be any symbol that represents an event. An event type is created by simply sending it, so there is no registration or initialization involved in creating a new event (see ", <$format, ["link", [["node", "$help_sys_event_send"]], ["Sending Events"], 'do_link]>, " for more information) ", <$format, ["np", [], [], 'do_np]>, "When to hook the event can currently be either at startup, or when the object is moved. The symbols ", <$format, ["tt", [], ["'startup"], 'do_tt]>, " or ", <$format, ["tt", [], ["'move"], 'do_tt]>, " are sent to specify this. ", <$format, ["np", [], [], 'do_np]>, "The relay for the event, or where you hook into it at (see ", <$format, ["link", [["node", "$help_sys_event_send"]], ["Sending Events"], 'do_link]>, " for more information on event relay's) must be one of: ", <$format, ["tt", [], ["'location"], 'do_tt]>, ", ", <$format, ["tt", [], ["'this"], 'do_tt]>, " or an object which is a descendant of ", <$format, ["tt", [], ["$event_handler"], 'do_tt]>, ". If ", <$format, ["tt", [], ["'location"], 'do_tt]>, " is set as the source, the object's current location is used for the event relay. If ", <$format, ["tt", [], ["'this"], 'do_tt]>, " is used as the source, the object itself is used for the relay. ", <$format, ["np", [], [], 'do_np]>, "The methods used for Registering are:", <$format, ["p", [], [], 'do_p]>, <$format, ["dl", [], [<$format, ["dt", [], [".", <$format, ["method", [["event_handler.register_event", 1]], ["register_event"], 'do_method]>, "(", <$format, ["i", [], ["event"], 'do_i]>, ", ", <$format, ["i", [], ["when"], 'do_i]>, ", ", <$format, ["i", [], ["relay"], 'do_i]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Used to register an event hook. You should only need to call this method once in the life of an object, unless it is unregistered later."], 'do_dd]>, <$format, ["dt", [], [".", <$format, ["method", [["event_handler.deregister_event", 1]], ["deregister_event"], 'do_method]>, "(", <$format, ["i", [], ["event"], 'do_i]>, ", ", <$format, ["i", [], ["when"], 'do_i]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Used to de-register an event hook."], 'do_dd]>], 'do_dl]>], #[['links, #[["Sending Events", "$help_sys_event_send"]]]]]>; +var $help_node links = #[["Sending Events", $help_sys_event_send]]; +var $root created_on = 864944385; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_sys_event_register]; +var $root manager = $help_sys_event_register; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/help_sys_event_send.cdc Tue Aug 19 12:15:34 1997 @@ -0,0 +1,14 @@ + +new object $help_sys_event_send: $help_sys_events; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "Sending", "Sending"]; +var $help_node body = <$ctext_frob, [[<$format, ["p", [], [], 'do_p]>, "Sending events is quite simple, from a programming point of view. There is no registration or initialization involved in creating an event--they exist as they are sent. ", <$format, ["np", [], [], 'do_np]>, "The method used to Send and Event is:", <$format, ["p", [], [], 'do_p]>, <$format, ["dl", [], [<$format, ["dt", [], ["relay.", <$format, ["method", [["event_handler.send_event", 1]], ["send_event"], 'do_method]>, "(", <$format, ["i", [], ["event"], 'do_i]>, ", ", <$format, ["i", [], ["@args"], 'do_i]>, ")"], 'do_dt]>, <$format, ["dd", [], ["Used to send an event. The object ", <$format, ["tt", [], ["relay"], 'do_tt]>, " is the broadcaster of the event (usually the current object's location). Any arguments beyond the event name are sent to the receiving event handler."], 'do_dd]>], 'do_dl]>, <$format, ["p", [], [], 'do_p]>, "An example sending the event ", <$format, ["tt", [], ["'combat"], 'do_tt]>, " to the current object's location:", <$format, ["p", [], [], 'do_p]>, <$format, ["dfn", [], [".location().send_event('combat, target_obj, with_weapon)"], 'do_dfn]>], #[]]>; +var $help_node links = #[]; +var $root created_on = 864944385; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$help_sys_event_send]; +var $root manager = $help_sys_event_send; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/http_lib.cdc Tue Aug 19 12:15:37 1997 @@ -0,0 +1,51 @@ + +new object $http_lib: $libraries; + +var $dmi_data descriptions = #[]; +var $http_lib codes = #[[200, "Ok"], [201, "Created"], [202, "Accepted"], [203, "Provisional Information"], [204, "No Content"], [300, "Multiple Choices"], [301, "Moved Permanently"], [302, "Moved Temporarily"], [303, "See Other"], [304, "Not Modified"], [400, "Bad Request"], [401, "Unauthorized"], [402, "Payment Required"], [403, "Forbidden"], [404, "Not Found"], [405, "Method Not Allowed"], [406, "None Acceptable"], [407, "Proxy Authentication Required"], [408, "Request Timeout"], [409, "Conflict"], [410, "Gone"], [500, "Internal Server Error"], [501, "Not Implemented"], [502, "Bad Gateway"], [503, "Service Unavailable"], [504, "Gateway Timeout"]]; +var $http_lib errors = #[[400, ["<head><title>400 Bad Request</title></head>", "<body>", "<center><h1>400 Bad Request</h1></center>", "%s", "</body>"]], [403, ["<head><title>403 Permission Denied</title></head>", "<body>", "<center><h1>403 Permission Denied</h1></center>", "%s", "</body>"]], [404, ["<head><title>404 Not Found</title></head>", "<center><h1>404 Not Found</h1></center>", "%s", "</body>"]]]; +var $http_lib html_version = "text/html"; +var $root created_on = 863767420; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$http_lib]; +var $root manager = $http_lib; + +public method .explode_http_encoding() { + arg args; + var fields, field, values; + + fields = #[]; + for field in (args.explode("&")) { + field = field.explode("="); + fields = fields.add($http.decode(field[1]), (listlen(field) == 1) ? "" : ($http.decode(field[2]))); + } + return fields; +}; + +public method .explode_url() { + arg line; + var args, i; + + i = "?" in line; + if (i) { + args = substr(line, i + 1); + line = substr(line, 1, i - 1); + } + if (args) + return [#[['path, line]], .explode_http_encoding(args)]; + else + return [#[['path, line]], #[]]; +}; + +public method .get_code() { + arg c; + + return (> codes[c] <); +}; + +public method .html_version() { + return html_version; +}; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/ident_connection.cdc Tue Aug 19 12:15:36 1997 @@ -0,0 +1,50 @@ + +new object $ident_connection: $outbound_connection; + +var $connection buffer = `[]; +var $connection line_buffer = []; +var $connection local_addr = ""; +var $connection remote_addr = ""; +var $connection tid = -1; +var $connection timeout = 300; +var $ident_connection task = 0; +var $root created_on = 859834690; +var $root flags = ['core, 'methods, 'code, 'variables]; +var $root inited = 1; +var $root managed = [$ident_connection]; +var $root manager = $ident_connection; +var $root quota_exempt = 1; + +public method .get() { + arg @args; + var conn; + + (caller() != $connection) && (> .perms(sender()) <); + conn = .spawn(); + conn.add_writer(sender()); + return conn.get_ident(@args); +}; + +public method .get_ident() { + arg host, remote_port, local_port; + var out; + + (> .perms(caller(), definer()) <); + task = task_id(); + catch any + .open_connection(host, 113); + with + return []; + .write(((remote_port + ", ") + local_port) + "\n"); + out = $scheduler.suspend(this()); + .close(); + return out.explode(":"); +}; + +protected method .parse_line() { + arg line; + + return $scheduler.resume(task, line); +}; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/inbound_connection.cdc Tue Aug 19 12:15:36 1997 @@ -0,0 +1,17 @@ + +new object $inbound_connection: $connection; + +var $connection buffer = `[]; +var $connection line_buffer = []; +var $connection local_addr = ""; +var $connection remote_addr = ""; +var $connection tid = -1; +var $connection timeout = 300; +var $dmi_data descriptions = #[]; +var $root created_on = 868487559; +var $root flags = ['core, 'methods, 'code, 'variables]; +var $root inited = 1; +var $root managed = [$inbound_connection]; +var $root manager = $inbound_connection; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/interface_registry.cdc Tue Aug 19 12:15:21 1997 @@ -0,0 +1,117 @@ + +new object $interface_registry: $db; + +var $db database = #[['object, [$page_bin_index]], ['help, [$page_bin_index]], ['display, [$page_bin_index]], ['describe, [$page_bin_index]], ['who, [$page_bin_index]], ['read, [$note]], ['method, [$page_bin_index]], ['generate, [$page_login]], ['submit_new, [$page_web_prefs]]]; +var $dmi_data descriptions = #[]; +var $root created_on = 858198912; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$interface_registry]; +var $root manager = $interface_registry; + +private method ._add_method_to_index() { + arg object, method; + var old_method_index, new_method_index; + + old_method_index = (| .exact_match(method) |) || []; + new_method_index = ($graph.topological_sort(old_method_index.setadd(object), 'has_ancestor)).reverse(); + .insert(method, new_method_index); +}; + +private method ._del_method_from_index() { + arg object, method; + var old_method_index, new_method_index; + + old_method_index = (| .exact_match(method) |) || []; + new_method_index = ($graph.topological_sort(old_method_index.setremove(object), 'has_ancestor)).reverse(); + if (new_method_index) + .insert(method, new_method_index); + else + .remove(method); +}; + +private method ._find_object_in_index() { + arg object, method, @second_time; + var iter, objectlist; + + [(second_time ?= 0)] = second_time; + if (second_time) + ._sort_method_index(method); + objectlist = (| .exact_match(method) |) || throw(~matchnf, "That method is not listed in the Interface Registry."); + if (object in objectlist) { + return valid(object) ? object : (> ._find_object_in_index(object, method, 1) <); + } else { + for iter in (objectlist) { + if (object.has_ancestor(iter)) + return valid(iter) ? iter : (> ._find_object_in_index(object, method, 1) <); + } + } + throw(~matchnf, "Object doesn't define that method in the Interface Registry"); +}; + +public method ._sort_method_index() { + arg method; + var old_method_index, new_method_index, item; + + old_method_index = (| .exact_match(method) |) || []; + new_method_index = filter item in (old_method_index) where (valid(item)); + new_method_index = ($graph.topological_sort(new_method_index, 'has_ancestor)).reverse(); + .insert(method, new_method_index); +}; + +public method .add_description() { + arg object, method, description; + + if (!(object.has_ancestor($dmi_data))) + throw(~invrequest, object + " must be a child of $dmi_data."); + (> ._add_method_to_index(object, method) <); + (> object.add_description_to_db(method, description) <); +}; + +root method .core_interface_registry() { + var method; + + for method in ((.database()).keys()) + ._sort_method_index(method); +}; + +public method .del_description() { + arg object, method; + + (> ._del_method_from_index(object, method) <); + (> object.del_description_from_db(method) <); +}; + +public method .describe() { + arg object, method; + var defining_object; + + defining_object = (> ._find_object_in_index(object, method) <); + return (> defining_object.describe_method(method) <); +}; + +public method .index() { + return .database(); +}; + +public method .verbal_index() { + var index, method, objects, object, item, lines; + + index = .index(); + lines = ["Interface registry is tracking:{br}{br}"]; + lines += ["{table cols=50%,50%:"]; + for item in (index) { + [method, objects] = item; + lines += [((("{tr:{td:" + method) + "}{td:") + (objects.to_english())) + "}}"]; + } + lines += ["}"]; + return $compiler.compile_cml(lines); +}; + +public method .where_is() { + arg object, method; + + return (> ._find_object_in_index(object, method) <); +}; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/mail_admin.cdc Tue Aug 19 12:15:20 1997 @@ -0,0 +1,17 @@ + +new object $mail_admin: $mail_list; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "admin", "admin"]; +var $mail_list last_received_on = 0; +var $mail_list mail = []; +var $mail_list notify = []; +var $mail_list readers = 0; +var $mail_list senders = 1; +var $root created_on = 869072525; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$mail_admin]; +var $root manager = $mail_admin; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/mail_postmaster.cdc Tue Aug 19 12:15:20 1997 @@ -0,0 +1,16 @@ + +new object $mail_postmaster: $mail_list; + +var $dmi_data descriptions = #[]; +var $has_name name = ['prop, "postmaster", "postmaster"]; +var $mail_list mail = []; +var $mail_list notify = []; +var $mail_list readers = 0; +var $mail_list senders = 1; +var $root created_on = 869072520; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$mail_postmaster]; +var $root manager = $mail_postmaster; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/menu.cdc Tue Aug 19 12:15:19 1997 @@ -0,0 +1,351 @@ + +new object $menu: $user_interfaces; + +var $dmi_data descriptions = #[]; +var $has_commands local = #[]; +var $has_commands remote = #[]; +var $has_commands shortcuts = #[]; +var $menu menu = 0; +var $menu menu_choice = 0; +var $root created_on = 866642150; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$menu]; +var $root manager = $menu; + +public method .bar() { + arg @text; + var l, str; + + if (!text) { + return "=============================================================================="; + } else { + str = ("=[" + (text[1])) + "]"; + for l in [1 .. 75 - ((text[1]).length())] + str = str + "="; + return str; + } +}; + +public method .do_menu() { + arg @menu; + var l, str, options, title, prompt, temp, instr, helptext, accept_any, accept_skip, accept_exit, accept_numeric, accept_return, myline, mylist, reloop; + + if ((menu.length()) < 3) + throw(~menu, "Menu must consist of title, prompt text, and at least one option."); + + // Obtain the title and prompt text: + title = menu[1]; + menu = menu.delete(1); + prompt = menu[1]; + menu = menu.delete(1); + options = []; + .tell(""); + pause(); + .menubar(title); + for l in [1 .. menu.length()] { + switch (type((menu[l]) || 'blank)) { + case 'symbol: + switch ((menu[l]) || 'blank) { + case 'accept_any: + // Accept any input + accept_any = 1; + case 'accept_numeric: + // Accept numeric input + accept_numeric = 1; + case 'back: + // .tell(" [-] Back Up"); + options = [@options, "-"]; + case 'blank: + // Probably not needed. + .tell(""); + case 'exit: + // .tell(" [X] Exit"); + options = [@options, "X"]; + accept_exit = 1; + case 'help: + // .tell(" [?] Help"); + options = [@options, "?"]; + case 'nothing: + // Nothing; not even a blank line. + case 'return: + accept_return = 1; + case 'skip: + // .tell(" [+] Skip Set"); + options = [@options, "+"]; + accept_skip = 1; + } + case 'list: + // One of the elements is a list. Split this + // up as we do with normal strings, columnize + // it, store the options, then columnize it. + mylist = []; + for myline in (menu[l]) { + myline.replace("=> ", "=>"); + temp = myline.explode("=>"); + if ((temp.length()) == 1) { + // It's just a string. Print it. + // .tell(" "+temp[1]); + mylist = mylist.add((temp[1]) + " "); + } else { + // It's a menu choice and txt. + mylist = mylist.add(((("[" + ((temp[1]).uppercase())) + "] ") + (temp[2])) + " "); + + // .tell(" ["+temp[1].uppercase()+"] "+temp[2]); + options = [@options, ((temp[1])[1]).uppercase()]; + } + } + mylist = mylist.lcolumnize(); + for myline in (mylist) + .tell(" " + myline); + case 'string: + // Break things up into choice, text: + (menu[l]).replace("=> ", "=>"); + temp = (menu[l]).explode("=>"); + if ((temp.length()) == 1) { + // It's just a string. Print it. + .tell(" " + (temp[1])); + } else { + // It's a menu choice and txt. + switch (temp[1]) { + case "?": + // .tell(" ["+temp[1].uppercase()+"] Help"); + // helptext=temp[2]; + // options=[@options,temp[1][1].uppercase()]; + default: + // Print the choice and text: + .tell(((" [" + ((temp[1]).uppercase())) + "] ") + (temp[2])); + options = [@options, ((temp[1])[1]).uppercase()]; + } + } + } + } + .menubar(); + pause(); + + // .tell(""); + reloop = 1; + while (reloop == 1) { + reloop = 0; + .tell(""); + .non_terminated_tell(prompt); + instr = tostr(.prompt(" ")); + if (((instr.length()) > 1) && ((instr[1]) == "~")) { + // .prompt_off(); + .tell(""); + .menuline("Command Line: " + ((instr.subrange(2)).chop(40))); + reloop = 1; + ((.connections())[1]).parse_line(instr.subrange(2)); + .tell(""); + .menuline(); + + // .prompt_on(); + } + if (instr == "abort") { + .tell("Aborted! Exiting menu."); + throw(~abort, "Aborted! Exiting menu.", 'notraceback); + } + } + if (helptext && (instr == "?")) { + .atell("[help!]"); + .atell(helptext); + .prompt("Press Return> "); + } + + // Yell at the user if a valid option is not selected: + if ((!(accept_return && (instr == ""))) && ((!(accept_numeric && (instr.is_numeric()))) && ((!accept_any) && ((instr in options) == 0)))) { + .tell(""); + .tell(("Valid options are " + ([@options, "Abort"].to_english())) + "."); + menu_choice = 'invalid; + } + + // 'skip, 'exit and such can be specified in the menu call. If these + // are included, accept_skip, accept_exit, etc. will be set to 1. If + // the user then selects the approprate character, 'skip, 'exit, etc. + // will be returned instead of the character. Why? I don't know. + if (accept_skip && (instr == "+")) + instr = 'skip; + if (accept_exit && (instr == "X")) + instr = 'exit; + if (accept_return && (instr == "")) + instr = 'return; + menu_choice = instr; + return instr; +}; + +public method .do_menu_nice() { + arg @args; + var choicelist, menu, selections, title, prompt, x, choice, obj, meth, arguments, unassigned, letter; + + // Generate a nice menu from a list of choices; run the menu + // and call all appropriate methods + // Initialize lots of things + choicelist = "abcdefghijklmnopqrstuvwyz0123456789"; + menu = []; + selections = #[]; + unassigned = []; + if ((filter x in (args) where (type(x) == 'list).length()) > (choicelist.length())) + return .do_menu_split(@args); + + // Get the menu's title and prompt + title = args[1]; + prompt = args[2]; + args = args.subrange(3); + + // Now parse the menu choices + for x in (args) { + switch (type(x)) { + case 'string: + // If it's a string, just copy it to the menu + menu = menu + [x]; + case 'list: + // If it's not a string, we need to parse it + // First, we get the choice + choice = x[1]; + + // Now we get the method to be called if this + // option is selected + if (type(x[2]) == 'objnum) { + obj = x[2]; + x = x.subrange(3); + } else { + obj = sender(); + x = x.subrange(2); + } + meth = x[1]; + arguments = x.subrange(2); + choice = ((choice.replace("$", "")).replace("'", "")).replace("_", " "); + letter = (choice.replace(" ", ""))[1]; + + // Find the first letter of the choice. If it's already + // in use, add this choice to an 'unassigned' list. + // Otherwise, use that letter for this choice + if (letter in choicelist) { + choice = (letter + "=>") + choice; + menu = menu + [choice]; + choicelist = choicelist.replace(letter, ""); + selections = selections.add(letter, [obj, meth, arguments]); + } else { + unassigned = unassigned + [[choice, obj, meth, arguments]]; + } + default: + throw(~menu, "Bad menu parameter."); + } + } + + // Now go through the unassigned list and assign letters to all + // remaining choices if possible + for choice in (unassigned) { + letter = choicelist[1]; + menu = menu + [(letter + "=>") + (choice[1])]; + selections = selections.add(letter, [choice[2], choice[3], choice[4]]); + choicelist = choicelist.subrange(2); + } + + // Ok, do the menu + while (choice != 'exit) { + choice = .do_menu(title, prompt, @menu, 'exit); + if (choice && (choice != 'exit)) { + meth = selections[choice]; + (meth[1]).(meth[2])(@meth[3]); + } + } +}; + +public method .do_menu_split() { + arg @args; + var x, choicelist, numgroups, pergroup, extra, title, prompt, len, arglen, menu, groups, choice; + + choicelist = "abcdefghijklmnopqrstuvwyz0123456789"; + title = args[1]; + prompt = args[2]; + menu = []; + groups = []; + args = args.subrange(3); + len = choicelist.length(); + arglen = args.length(); + numgroups = arglen / len; + if ((arglen % len) != 0) + numgroups++; + pergroup = arglen / numgroups; + extra = arglen % numgroups; + for x in [1 .. numgroups] { + menu = menu + [((tostr(x) + "=>") + (x.n_to_nth())) + " list of choices"]; + if (extra) { + groups = groups + [args.subrange(1, pergroup + 1)]; + args = args.subrange(pergroup + 2); + extra--; + } else { + groups = groups + [args.subrange(1, pergroup)]; + args = args.subrange(pergroup + 1); + } + } + while (choice != 'exit) { + choice = .do_menu(title, prompt, @menu, 'exit); + if (choice != 'exit) + .do_menu_nice(title, prompt, @groups[toint(choice)]); + } +}; + +public method .menu() { + return menu; + + // Returns the current (sub)-menu. +}; + +public method .menu_choice() { + return menu_choice; +}; + +public method .menubar() { + arg @text; + var l, str; + + if (!text) { + .tell("=============================================================================="); + } else { + str = ("=[" + (text[1])) + "]"; + for l in [1 .. 75 - ((text[1]).length())] + str = str + "="; + .tell(str); + } +}; + +public method .menuchoice() { + arg choice, text; + + .tell(((" [" + choice) + "] ") + text); +}; + +public method .menuline() { + arg @text; + var l, str; + + if (!text) { + .tell("------------------------------------------------------------------------------"); + } else { + str = ("=[`[34m" + (text[1])) + "`[37m]"; + for l in [1 .. 75 - ((text[1]).length())] + str = str + "-"; + .tell(str); + } +}; + +public method .menutext() { + arg text; + + if (!text) + .tell(""); + else + .tell(" " + text); +}; + +public method .set_menu() { + arg val; + + menu = val; + + // Set the current (sub)-menu +}; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/page.cdc Tue Aug 19 12:15:18 1997 @@ -0,0 +1,38 @@ + +new object $page: $core; + +var $dmi_data descriptions = #[]; +var $page lock = 0; +var $root created_on = 863765169; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$page]; +var $root manager = $page; + +public method .build_footer() { + arg headers, info, args; + + return (> (info['directory_object]).build_footer(headers, info, args) <); +}; + +public method .build_header() { + arg headers, info, args, @rest; + + return (> (info['directory_object]).build_header(headers, info, args, @rest) <); +}; + +public method .generate() { + arg headers, info, args; + + return [["<html><head><title>Error</title></head><body>Error</body></html>"]]; +}; + +public method .get_lock() { + return lock; +}; + +public method .get_realm() { + return (> (info['directory_object]).get_realm() <); +}; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/page_bin_index.cdc Tue Aug 19 12:15:18 1997 @@ -0,0 +1,342 @@ + +new object $page_bin_index: $page; + +var $dmi_data descriptions = #[['help, #[['args, #[["node", [[$help_coldcore], [$converters, 'to_help_node, []]]]]]]], ['describe, #[['args, #[["detail", [[""], []]], ["target", [[$the_pit], [$converters, 'to_object, []]]]]]]], ['who, #[['args, #[]]]], ['display, #[['args, #[["target", [[$root], [$converters, 'to_object, []]]], ["methods", [[0], []]], ["vars", [[0], []]], ["description", [[0], []]]]]]], ['object, #[['args, #[["target", [[$root], [$converters, 'to_object, []]]]]]]], ['method, #[['args, #[["target", [[['method, $user, $user, "say_cmd", 0]], [$converters, 'parse_ref, [$foundation, ['method]]]]], ["linenumbers", [[0], [$converters, 'to_boolean, []]]]]]]]]; +var $page_bin_index gateways = ["describe", "who", "display", "help", "object", "method"]; +var $root created_on = 863765399; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$page_bin_index]; +var $root manager = $page_bin_index; + +public method ._list_gateways() { + var out, line, gate; + + out = ["<ul>"]; + for gate in (gateways) { + line = ((("<li><b><a href=\"/bin/" + gate) + "\">") + gate) + "</a></b>"; + out += [line]; + } + return out + ["</ul>"]; +}; + +public method ._make_display_href() { + arg obj, @args; + + args = args ? (args.join("")) : ""; + return (((("<a href=\"/bin/display?target=" + (obj.objname())) + args) + "\">") + (obj.namef('xref))) + "</a>"; +}; + +public method ._make_method_href() { + arg m; + + return ((((((("<a href=\"/bin/method?target=%%24" + ((m[1]).objname())) + ".") + (m[2])) + "()\">.") + (m[2])) + "(") + (m[3])) + ")</a>"; +}; + +public method ._make_object_href() { + arg obj; + + return ((("<a href=\"/bin/object?target=" + (obj.objname())) + "\">") + (obj.namef('xref))) + "</a>"; +}; + +public method ._make_string_to_display_href() { + arg obj, @args; + + args = args ? (args.join("")) : ""; + return (((("<a href=\"/bin/display?target=" + obj) + args) + "\">") + obj) + "</a>"; +}; + +public method ._show_header_objs() { + arg objs, what; + var o, line; + + if ((objs.length()) > 1) { + line = (("<tr><td><b>" + what) + "s</b>:</td><td>") + (._make_object_href(objs[1])); + for o in (objs.subrange(2)) + line += ", " + (._make_object_href(o)); + line += "</td></tr>"; + } else if ((objs.length()) == 1) { + line = ((("<tr><td><b>" + what) + "</b>:</td><td>") + (._make_object_href(objs[1]))) + "</td></tr>"; + } else { + line = ("<tr><td><b>" + what) + "</b>:</td><td>(none)</td></tr>"; + } + return line; +}; + +public method ._show_methods() { + arg obj; + var methods, types, m, t, out; + + types = #[]; + for m in (obj.methods()) + types = types.add_elem(obj.method_access(m), [m] + (obj.method_info(m))); + + // hard-listing the types guarantee's their order + out = []; + for t in (['root, 'driver, 'frob, 'public, 'protected, 'private]) { + if (!(types.contains(t))) + continue; + out += [(tostr(t).capitalize()) + " methods:"]; + for m in (types[t]) + out += [strfmt("%5l %4r " + (._make_method_href([obj, m[1], m[2]])), $object_lib.parse_method_flags(m[7]), m[5])]; + } + return out; +}; + +public method ._show_object() { + arg obj, what; + var out, desc; + + out = [("<h1>" + (._make_object_href(obj))) + "</h1>"]; + out += ["<table>", ("<tr><td><b>Perms</b>:</td><td>" + (((.flags()).prefix("+")).join())) + "</td></tr>", ("<tr><td><b>Size</b>:</td><td>" + ((obj.size()).to_english())) + " bytes (on disk)</td></tr>", ("<tr><td><b>Manager</b>:</td><td>" + (._make_object_href(obj.manager()))) + "</td></tr>", ._show_header_objs(obj.writers('literal), "Writer"), ._show_header_objs(obj.parents(), "Parent")]; + if (obj.has_ancestor($located)) + out += [("<tr><td><b>Location</b>:</td><td>" + (._make_object_href(obj.location()))) + "</td></tr>"]; + if (obj.help_node()) + out += [((("<tr><td><b>Associated Help</b>:</td><td><a href=\"/bin/help?node=" + (obj.help_node())) + "\">") + (obj.help_node())) + "</a></td></tr>"]; + if (obj.has_ancestor($described)) { + out += ["<tr><td valign=top><b>Description</b>:</td><td>"]; + if ('description in what) { + desc = obj.prose(); + out += ["<pre>"]; + switch (type(desc)) { + case 'frob: + out += desc.uncompile(); + case 'list: + out += desc; + case 'string: + out += [desc]; + } + out += ["</pre>"]; + } else { + out += [((("<a href=\"/bin/display?target=" + obj) + "&") + ((['description] + what).join("=yes&"))) + "=yes\">Display description</a>"]; + } + out += ["</td></tr>"]; + } + out += ["</table>"]; + out += ["<p><pre>"]; + if ('methods in what) { + if (!(obj.has_flag('methods, this()))) + out += [" ** No permission to list methods **"]; + else + out += ._show_methods(obj); + } else { + out += [(((((" <h3><a href=\"/bin/display?target=" + obj) + "&") + ((['methods] + what).join("=yes&"))) + "=yes\">Display Methods on ") + obj) + "</a></h3>"]; + } + if ('variables in what) { + if (!(obj.has_flag('variables, this()))) + out += [" ** No permission to show variables **"]; + else + out += ._show_variables(obj); + } else { + out += [(((((" <h3><a href=\"/bin/display?target=" + obj) + "&") + ((what + ['vars]).join("=yes&"))) + "=yes\">Display Variables on ") + obj) + "</a></h3>"]; + } + return out + ["</pre>"]; +}; + +public method ._show_variables() { + arg obj; + var parent, out, v; + + out = []; + for parent in (obj.data()) { + if (valid(parent[1])) { + out += [(parent[1]) + " variables:"]; + if ((parent[1]).has_flag('variables, this())) { + for v in (parent[2]) + out += [((" " + (v[1])) + ": ") + toliteral(v[2])]; + } else { + out += [" ** Permission Denied **"]; + } + } else { + out += [($object_lib.get_name(parent[1])) + " variables:"]; + for v in (parent[2]) + out += [((" " + (v[1])) + ": ") + toliteral(v[2])]; + } + refresh(); + } + return out; +}; + +public method .describe() { + arg header, info, args; + var obj, desc, flags, detail, page, body, name; + + obj = (| args["target"] |); + detail = (| args["detail"] |); + if (detail) { + detail = $http.decode(detail); + name = ((obj.name()) + ": ") + detail; + catch any + body = (<$ctext_frob, [[(<$format, ["subj", [["level", "2"]], [detail.capitalize()], 'do_subj]>)], #[['this, obj]]]>).append(obj.get_detail(detail)); + with + body = (header['interface]).response(404, ("No such detail '" + detail) + "'"); + } else { + name = obj.name(); + body = obj.get_description(#[['actor, $no_one]]); + } + return [[@.build_header(header, info, args), body, @.build_footer(header, info, args)]]; +}; + +public method .display() { + arg header, info, args; + var out, obj, what, user; + + obj = (| args["target"] |); + what = []; + if ((| args["vars"] |)) + what = setadd(what, 'variables); + if ((| args["methods"] |)) + what = setadd(what, 'methods); + if ((| args["description"] |)) + what = setadd(what, 'description); + if ($security_lib.check_userdb_with_optional(header['interface])) + user = (header['interface]).get_info('run_as); + if (user) { + if (!("description" in (args['arg_list]))) + what = ((| user.get_setting("www-show-descriptions", $www_preferences) |) || 0) ? setadd(what, 'description) : setremove(what, 'description); + if (!("methods" in (args['arg_list]))) + what = ((| user.get_setting("www-show-methods", $www_preferences) |) || 0) ? setadd(what, 'methods) : setremove(what, 'methods); + if (!("vars" in (args['arg_list]))) + what = ((| user.get_setting("www-show-variables", $www_preferences) |) || 0) ? setadd(what, 'variables) : setremove(what, 'variables); + } + return [[@.build_header(header, info, args, obj), ._show_object(obj, what), .build_footer(header, info, args)]]; +}; + +public method .generate() { + arg header, info, args; + var gate; + + return [(header['interface]).response(300, ["Multiple Choices: "] + (._list_gateways()))]; +}; + +public method .help() { + arg header, info, args; + var node, head, body, tail, tmp, n, name; + + node = (| args["node"] |); + head = [@.build_header(header, info, args, "Help: " + (node.node_name())), ("<h2 align=center>" + (node.html_node_name('top))) + "</h2><hr size=1 noshade>"]; + body = node.body(); + if (node.group()) { + tail = "<p><hr size=1 noshade><p align=center>"; + tmp = ""; + for n in (((node.parents())[1]).children()) { + if (n.nolist()) + continue; + name = (n.name()).word(1, "|"); + if (n == node) + tmp += ((tmp ? "| " : "") + name) + " "; + else if (n.holder()) + tmp += (((tmp ? "| " : "") + "<i>") + name) + "</i> "; + else + tmp += (((((tmp ? "| " : "") + "<a href=\"/bin/help?node=") + n) + "\">") + name) + "</a> "; + } + if (tmp) + tail += tmp + "<p>"; + } else { + tail = "<p>"; + } + return [[@head, body, tail, @.build_footer(header, info, args)]]; +}; + +public method .method() { + arg header, info, args; + var ref, str_ref, name, obj, code, anc, out, line, linenumbers, user, strings, flags; + + ref = (| args["target"] |); + linenumbers = (| args["linenumbers"] |); + if (!("linenumbers" in (args['arg_list]))) { + if ($security_lib.check_userdb_with_optional(header['interface])) { + user = (header['interface]).get_info('run_as); + linenumbers = (| user.get_setting("www-show-line-num", $www_preferences) |) || 0; + } + } + catch any { + name = (> tosym(ref[4]) <); + obj = ref[3]; + anc = obj.find_method(name); + if ('native in (anc.method_flags(name))) + code = ["This method is implemented natively within the driver."]; + else + code = (anc.list_method(name)).mmap('html_escape); + code = $code_lib.code_to_html(code, obj); + if (linenumbers) + code = code.numbered_text(); + str_ref = ((obj + ".") + name) + "()"; + out = [@.build_header(header, info, args, str_ref), (((("<center><h1>" + (._make_string_to_display_href(obj, "&methods=yes"))) + ".") + name) + "()") + "</h1></center>", "<hr size=1 noshade>"]; + strings = linenumbers ? ["no", "off"] : ["yes", "on"]; + out += [strfmt("[<A HREF=\"/bin/method?target=%s&linenumbers=%s\">Turn %s line numbering</A>]", str_ref, @strings)]; + out += ["<blockquote><pre>", @code, "</pre></blockquote>"]; + } with { + switch (error()) { + case ~type: + return [(header['interface]).response(400, ((("Invalid method reference " + obj) + ".") + name) + "()")]; + case ~methodnf: + line = ((obj + ".") + name) + "()"; + return [(header['interface]).response(400, line + " not found.")]; + default: + return [(header['interface]).response(400, (traceback()[1])[2])]; + } + } + return [out + (.build_footer(header, info, args))]; +}; + +public method .object() { + arg header, info, args; + var out, obj, o, line, objs, m; + + obj = (| args["target"] |); + out = [@.build_header(header, info, args, obj.namef('xref)), ("<h1 align=center>" + (._make_display_href(obj, "&methods=1"))) + "</h1>"]; + line = "<p align=center><b>Parent(s)</b>: " + ((| ._make_object_href((obj.parents())[1]) |) || "(none)"); + for o in ((| (obj.parents()).subrange(2) |) || []) + line += ", " + (._make_object_href(o)); + out += [line + "</p>", "<table>"]; + objs = obj.children(); + if (obj) { + out += ["<p align=center><b>Children:</b></p>", "<center><table width=300 cellspacing=0 cellpadding=0>", "<tr><td width=25%><b>Name</b></td><td width=25%><b>Perms</b></td><td width=25%><b>Size</b></td><td width=25%><b>Manager</b></td></tr>"]; + for o in (objs) { + refresh(); + m = o.manager(); + if (!valid(o)) + m = toliteral(m); + else + m = ._make_object_href(m); + out += [((((((("<tr><td>" + (._make_object_href(o))) + "</td><td>") + ($object_lib.see_perms(o, ["", ""]))) + "</td><td>") + ((o.size()).to_english())) + "</td><td>") + m) + "</td></tr>"]; + } + } + return [(out + ["</table></center>"]) + (.build_footer(header, info, args))]; +}; + +public method .who() { + arg headers, info, args; + var who, namel, names, times, idle, realm, x, cols, out, output, line; + + out = (.build_header(headers, info, args, "Connected users to " + ($motd.server_name()))) + [("<center><h2>Connected users to <i>" + ($motd.server_name())) + "</i></h2></center></head><body><pre>"]; + who = $user_db.connected(); + names = who.mmap('hname); + namel = []; + for x in (who.mmap('name)) + namel += [x.length()]; + cols = (namel.max()) + 1; + if (cols < 5) + cols = 5; + times = who.mmap('connected_time); + cols = [cols, (times.element_maxlength()) + 1]; + if ((cols[2]) < 7) + cols = [cols[1], 7]; + idle = who.mmap('idle_time); + cols += [(idle.element_maxlength()) + 1]; + if ((cols[3]) < 5) + cols = cols.replace(3, 5); + realm = who.mmap('realm_name, "text/html"); + out += [((((("<hr size=1 noshade><b>" + ("Name".pad(cols[1]))) + " ") + ("On for".pad(cols[2]))) + " ") + ("Idle".pad(cols[3]))) + " Location", ((((("----".pad(cols[1])) + " ") + ("------".pad(cols[2]))) + " ") + ("----".pad(cols[3]))) + " --------</b>"]; + for x in [1 .. who.length()] { + line = ((("<b>" + (names[x])) + "</b>") + ("".pad((cols[1]) - (namel[x])))) + " "; + line = (((line + "<i>") + (times[x])) + ("".pad((cols[2]) - ((times[x]).length())))) + " "; + line = (((line + (idle[x])) + "</i>") + ("".pad((cols[3]) - ((idle[x]).length())))) + " "; + line += realm[x]; + out += [line]; + } + return [out + (.build_footer(headers, info, args))]; +}; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/page_desktop_login.cdc Tue Aug 19 12:15:18 1997 @@ -0,0 +1,29 @@ + +new object $page_desktop_login: $page; + +var $dmi_data descriptions = #[]; +var $root created_on = 864277988; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$page_desktop_login]; +var $root manager = $page_desktop_login; + +public method .content_frame() { + arg headers, info, args; + + return [["<html>", "<head><title>User Desktop</title></head>", "<body bgcolor=\"#ffffff\">", "Content Frame", "</body>", "</html>"]]; +}; + +public method .generate() { + arg headers, info, args; + + return [["<html>", "<head><title>User Desktop</title></head>", "<frameset rows=\"50,*\">", "<frame name=\"nav\" src=\"/page_desktop_login/nav_frame\">", "<frame name=\"content\" src=\"/\">", "</frameset>", "<noframe>", "<body bgcolor=\"#ffffff\">", "You must support frames", "</body>", "</noframe>", "</html>"]]; +}; + +public method .nav_frame() { + arg headers, info, args; + + return [["<html>", "<head><title>User Desktop</title></head>", "<body bgcolor=\"#ffffff\">", "<a href=\"/bin/help\" target=\"content\">Help</a> |", "<a href=\"/bin/object\" target=\"content\">Browse Objects</a> |", "<a href=\"/bin/describe\" target=\"content\">Browse VR World</a> |", "<a href=\"/bin/who\" target=\"content\">Who</a> |", "<a href=\"/desktop/web_prefs/config\" target=\"content\">Configure Preferences</a>", "</body>", "</html>"]]; +}; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/page_file_index.cdc Tue Aug 19 12:15:18 1997 @@ -0,0 +1,35 @@ + +new object $page_file_index: $page; + +var $dmi_data descriptions = #[]; +var $root created_on = 864282511; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$page_file_index]; +var $root manager = $page_file_index; + +public method .generate() { + arg headers, info, args; + var filename, stat, i; + + filename = "html" + (info['path_info]); + stat = (| $file.fstat(filename) |); + if ((!stat) || (substr(stat[1], 1, 1) == "4")) + return [(headers['interface]).response(404, "Unable to find URL " + (info['path_info]))]; + if ((i = (info['path_info]).rindex("."))) { + switch ((info['path_info]).subrange(i + 1)) { + case "txt": + (headers['interface]).set_ctype("text/plain"); + case "gif": + (headers['interface]).set_ctype("image/gif"); + case "jpg": + (headers['interface]).set_ctype("image/jpeg"); + case "html": + (headers['interface]).set_ctype("text/html"); + } + } + (headers['interface]).respond_with_file(stat, filename); + return 0; +}; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/page_home_index.cdc Tue Aug 19 12:15:18 1997 @@ -0,0 +1,32 @@ + +new object $page_home_index: $page; + +var $dmi_data descriptions = #[]; +var $root created_on = 863765377; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$page_home_index]; +var $root manager = $page_home_index; + +public method .generate() { + arg header, info, args; + var user, page; + + user = (| $user_db.search(substr(info['path_info], 2)) |); + if (user) { + catch ~private { + page = user.get_setting("rl-home-page", $user_info); + if ((page[1]) && (page[2])) { + if (substr(page[2], 1, 7) != "http://") + page = page.replace(2, "http://" + (page[2])); + return ['redirect, page[2]]; + } + } with { + return [(header['interface]).response(404, "User's homepage is private")]; + } + } else { + return [(header['interface]).response(404, "User not found")]; + } +}; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/page_login.cdc Tue Aug 19 12:15:18 1997 @@ -0,0 +1,17 @@ + +new object $page_login: $page; + +var $dmi_data descriptions = #[['generate, #[['args, #[]], ['auth, [$security_lib, 'check_userdb_with_password, []]]]]]; +var $root created_on = 867750868; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$page_login]; +var $root manager = $page_login; + +public method .generate() { + arg header, info, args; + + return ['redirect, "/desktop/"]; +}; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/page_root_index.cdc Tue Aug 19 12:15:18 1997 @@ -0,0 +1,17 @@ + +new object $page_root_index: $page; + +var $dmi_data descriptions = #[]; +var $root created_on = 863765389; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$page_root_index]; +var $root manager = $page_root_index; + +public method .generate() { + arg headers, info, args; + + return [$motd.build_html()]; +}; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/page_web_prefs.cdc Tue Aug 19 12:15:18 1997 @@ -0,0 +1,40 @@ + +new object $page_web_prefs: $page; + +var $dmi_data descriptions = #[['submit_new, #[['args, #[["www-show-descriptions", [[], []]], ["www-show-line-num", [[], []]], ["www-show-methods", [[], []]], ["www-show-variables", [[], []]]]]]]]; +var $page_web_prefs prefs = [["Show line numbers in methods", "www-show-line-num"], ["Show methods on object displays", "www-show-methods"], ["Show variables on object displays", "www-show-variables"], ["Show descriptions on object displays", "www-show-descriptions"]]; +var $root created_on = 868020037; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$page_web_prefs]; +var $root manager = $page_web_prefs; + +public method .config() { + arg header, info, args; + var text, user, value, boolean, pref; + + user = info['run_as]; + text = [@.build_header(header, info, args, "Configure Web Preferences")]; + text += ["<form action=\"/desktop/web_prefs/submit_new\" method=\"post\">"]; + text += ["<table><tr><th>Preference</th><th>Yes</th><th>No</th></tr>"]; + for pref in (prefs) { + value = user.get_setting(pref[2], $www_preferences); + text += [((("<tr><td>" + (pref[1])) + "</td>") + (map boolean in ([1, 0]) to (((((("<td><input type=\"radio\" name=\"" + (pref[2])) + "\" value=\"") + (boolean ? "1" : "0")) + "\" ") + ((value == boolean) ? "checked" : "")) + "></td>").join(""))) + "</tr>"]; + } + text += ["</table>"]; + text += ["<input type=submit name=\"Submit new preferences\"><input type=reset>"]; + text += ["</form>", @.build_footer(header, info, args)]; + return [text]; +}; + +public method .submit_new() { + arg header, info, args; + var pref, user; + + user = info['run_as]; + for pref in (prefs.slice(2)) + user.set_www_preferences(pref, args[pref]); + return ['redirect, @header["Referer"]]; +}; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/plain_format.cdc Tue Aug 19 12:15:17 1997 @@ -0,0 +1,445 @@ + +new object $plain_format: $formatter; + +var $root created_on = 837583858; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$plain_format]; +var $root manager = $plain_format; + +public method .do_action() { + arg vars, flags, args; + + [args, vars] = ._eval_ctext(args[1], vars); + (vars['receiver]).register_action(args, flags.getkey("cmd")); + return [("[" + args) + "]", vars]; +}; + +public method .do_anchor() { + arg vars, flags, args; + + [args, vars] = ._eval_ctext(args[1], vars); + return [("/" + args) + "/", vars]; +}; + +public method .do_b() { + arg vars, flags, args; + var out, a; + + return ._eval_ctext(args, vars); +}; + +public method .do_br() { + arg vars, flags, args; + + return ["\n", vars]; +}; + +public method .do_columnize() { + arg vars, flags, args; + var cols; + + cols = (| flags.getkey("cols") |) || "*"; + [args, vars] = ._eval_ctext(args, vars); + return [[(cols == "*") ? (args.lcolumnize()) : (args.columnize(toint(cols)))], vars]; +}; + +public method .do_dd() { + arg vars, flags, args; + + return .eval_indented(args, vars, (| vars['dl_ind] |) || 4); +}; + +public method .do_detail() { + arg vars, flags, args; + + return [("[" + (flags.getkey("name"))) + "]", vars]; +}; + +public method .do_dfn() { + arg vars, flags, args; + var ind, nobound; + + ind = toint((| flags.getkey("ind") |) || 8); + nobound = (| flags.getkey("nobound") |); + vars = vars.add('header, ""); + [args, vars] = .eval_indented(args, vars, ind); + if (nobound) + return ["\n" + args, vars]; + return [("\n" + args) + "\n", vars]; +}; + +public method .do_dl() { + arg vars, flags, args; + var out, token, c, cm, ind, mem; + + c = (| vars['columned] |) || 0; + cm = (| flags.getkey("columned") |) || 0; + ind = (| toint(flags.getkey("ind")) |) || 4; + vars = vars.add('columned, cm); + if (dict_contains(vars, 'dl_ind)) + mem = vars['dl_ind]; + vars = dict_add(vars, 'dl_ind, ind); + [args, vars] = ._eval_ctext(args, vars); + if (mem) + vars = dict_add(vars, 'dl_ind, mem); + else + vars = dict_del(vars, 'dl_ind); + if (c) + vars = vars.add('columned, c); + else if (vars.contains('columned)) + vars = vars.del('columned); + return [args + "\n", vars]; +}; + +public method .do_dt() { + arg vars, flags, args; + + vars = vars.add('header, ""); + [args, vars] = ._eval_ctext(args, vars); + if ((| vars['columned] |)) + return ["\n ", vars.add('header, pad(" " + args, 25))]; + else + return [("\n " + args) + "\n", vars.add('header, "")]; +}; + +public method .do_em() { + arg vars, flags, args; + var out, a; + + return ._eval_ctext(args, vars); +}; + +public method .do_hr() { + arg vars, flags, args; + + if ((| flags.getkey("sep") |)) + return ["---\n", vars]; + return [pad("\n", vars['width], "-") + "\n", vars]; +}; + +public method .do_i() { + arg vars, flags, args; + var out, a; + + return ._eval_ctext(args, vars); +}; + +public method .do_img() { + arg vars, flags, args; + var alt; + + alt = (| flags.getkey("plain") |) || ""; + return [alt, vars]; +}; + +public method .do_lh() { + arg vars, flags, args; + var line, oheader; + + oheader = (| vars['header] |); + vars = dict_add(vars, 'header, ""); + [args, vars] = .eval_indented(args, vars, 2); + if (oheader == ~keynf) + vars = dict_del(vars, 'header); + else + vars = dict_add(vars, 'header, oheader); + return [args + "\n", vars]; +}; + +public method .do_li() { + arg vars, flags, args; + var line, type, num, depth, oheader; + + type = (| vars['list_type] |) || 'plain; + depth = (| vars['list_depth] |) || 1; + oheader = (| vars['header] |); + if (type == 'plain) { + if (depth % 2) + vars = dict_add(vars, 'header, "* "); + else + vars = dict_add(vars, 'header, "+ "); + } else { + num = (vars['list_last]) + 1; + vars = dict_add(vars, 'header, num + ") "); + vars = dict_add(vars, 'list_last, num); + } + depth *= 2; + [args, vars] = .eval_indented(args, vars, depth); + if (oheader == ~keynf) + vars = dict_del(vars, 'header); + else + vars = dict_add(vars, 'header, oheader); + return ["\n" + args, vars]; +}; + +public method .do_link() { + arg vars, flags, args; + + [args, vars] = ._eval_ctext(args[1], vars); + return [("[" + args) + "]", vars]; +}; + +public method .do_np() { + arg vars, flags, args; + + return ["\n\n", vars]; +}; + +public method .do_ol() { + arg vars, flags, args; + var out, token, old, last, depth; + + if (dict_contains(vars, 'list_type)) { + old = vars['list_type]; + if (old == 'ordinal) + last = vars['list_last]; + else + last = -1; + vars = dict_add(vars, 'list_depth, (vars['list_depth]) + 1); + } else { + vars = dict_add(vars, 'list_depth, 1); + } + vars = dict_add(vars, 'list_type, 'ordinal); + vars = dict_add(vars, 'list_last, 0); + [args, vars] = ._eval_ctext(args, vars); + if (old) { + vars = dict_add(vars, 'list_type, old); + if ((old == 'ordinal) && (last != (-1))) + vars = dict_add(vars, 'list_last, last); + vars = dict_add(vars, 'list_depth, (vars['list_depth]) - 1); + } else { + vars = dict_del(vars, 'list_type); + if (dict_contains(vars, 'list_last)) + vars = dict_del(vars, 'list_last); + vars = dict_del(vars, 'list_depth); + } + return [args, vars]; +}; + +public method .do_p() { + arg vars, flags, args; + + return ["\n", vars]; +}; + +public method .do_quote() { + arg vars, flags, args; + + return [args[1], vars]; +}; + +public method .do_subj() { + arg vars, flags, args; + var out, word, l, len; + + [out, vars] = ._eval_ctext(args, vars); + len = vars['width]; + switch (toint((| flags.getkey("level") |) || "4")) { + case 1: + out = ((("\n\n" + out) + "\n") + ("".pad(strlen(out), "="))) + "\n"; + case 2: + out = ((("\n\n" + out) + "\n") + ("".pad(strlen(out), "-"))) + "\n"; + case 3: + out = ("\n\n" + out) + "\n"; + default: + out = ("\n" + out) + "\n"; + } + return [out, vars]; +}; + +public method .do_table() { + arg vars, flags, args; + var tblinfo, i, ntbinfo, info, width, l, lr, lc, inds, ind, cwidth; + + tblinfo = (| vars['table_info] |) || 0; + width = vars['width]; + if (!(| (ntbinfo = flags.getkey("cols")) |)) + throw(~flags, "Need column information."); + ind = (| abs(toint(flags.getkey("ind"))) |) || 0; + info = []; + cwidth = width - ind; + if ("%" in ntbinfo) { + for i in (ntbinfo.explode(",")) + info += [toint(cwidth * (toint(i) / 100.0))]; + } else { + for i in (ntbinfo.explode(",")) + info += [toint(i)]; + } + vars = #[['table_info, [info, 0]], ['rinfo, $list.make(info.length(), 0)], ['rcont, $list.make(info.length(), [])]].union(vars); + [args, vars] = ._eval_ctext(args, vars); + vars = tblinfo ? (vars.add('table_info, tblinfo)) : (vars.del('table_info)); + vars = vars.add('width, width); + return ["\n" + args, vars]; +}; + +public method .do_td() { + arg vars, flags, args; + var tblinfo, rinfo, col, cols, rows, w, n, max; + + rows = (| toint(flags.getkey("rowspan")) |) || 1; + cols = (| toint(flags.getkey("colspan")) |) || 1; + rinfo = vars['rinfo]; + tblinfo = vars['table_info]; + col = (tblinfo[2]) + 1; + n = []; + max = listlen(tblinfo[1]); + while (rinfo[col]) { + col++; + n += [[0, (tblinfo[1])[col], []]]; + } + w = ((tblinfo[1]).subrange(col, cols)).sum(); + tblinfo = tblinfo.replace(2, (col + cols) - 1); + vars = (vars.add('table_info, tblinfo)).add('header, ""); + [args, vars] = .eval_indented(args, vars, 0, w); + return [(n + [[rows, w, args.explode("\n", 1)]]) + ($list.make(cols - 1, [rows, 0, []])), vars]; +}; + +public method .do_th() { + arg vars, flags, args; + var tblinfo, rinfo, col, cols, rows, w, n, max; + + rows = (| toint(flags.getkey("rowspan")) |) || 1; + cols = (| toint(flags.getkey("colspan")) |) || 1; + rinfo = vars['rinfo]; + tblinfo = vars['table_info]; + col = (tblinfo[2]) + 1; + n = []; + max = listlen(tblinfo[1]); + while (rinfo[col]) { + col++; + n += [[0, (tblinfo[1])[col], []]]; + } + w = ((tblinfo[1]).subrange(col, cols)).sum(); + tblinfo = tblinfo.replace(2, (col + cols) - 1); + vars = (vars.add('table_info, tblinfo)).add('header, ""); + [args, vars] = .eval_indented(args, vars, 0, w); + return [(n + [[rows, w, args.explode("\n", 1)]]) + ($list.make(cols - 1, [rows, 0, []])), vars]; +}; + +public method .do_tr() { + arg vars, flags, args; + var tblinfo, rinfo, i, l, len, s, j, col, rcont, done; + + tblinfo = vars['table_info]; + tblinfo = tblinfo.replace(2, 0); + rinfo = vars['rinfo]; + rcont = vars['rcont]; + vars = vars.add('table_info, tblinfo); + l = []; + col = 1; + for i in (args) { + if (type(i) != 'frob) + throw(~table, "Only {td} tags permitted in rows"); + switch (i.method()) { + case 'do_td: + [i, vars] = .do_td(vars, i.ctext_flags(), i.args()); + case 'do_th: + [i, vars] = .do_th(vars, i.ctext_flags(), i.args()); + default: + throw(~table, "Only {td} tags permitted in rows"); + } + l += i; + for j in (i) { + rcont = rcont.replace(col, (rcont[col]) + (j[3])); + col++; + } + } + l += $list.make((rcont.length()) - (l.length()), [0, 0, []]); + s = ""; + i = 1; + done = 0; + rinfo = map j in [1 .. rinfo.length()] to (((rinfo[j]) - 1) + ((l[j])[1])); + while (!done) { + done = 1; + for j in [1 .. rcont.length()] { + s += ((| (rcont[j])[i] |) || "").pad((l[j])[2]); + done = done && ((rinfo[j]) || (i >= listlen(rcont[j]))); + } + i++; + s += "\n"; + } + for j in [1 .. rinfo.length()] + rcont = rcont.replace(j, (| (rcont[j]).subrange(i) |) || []); + vars = (vars.add('rinfo, rinfo)).add('rcont, rcont); + return [s, vars]; +}; + +public method .do_tt() { + arg vars, flags, args; + var out, a; + + return ._eval_ctext(args, vars); +}; + +public method .do_ul() { + arg vars, flags, args; + var out, token, old, last, depth; + + if (dict_contains(vars, 'list_type)) { + old = vars['list_type]; + if (old == 'ordinal) + last = vars['list_last]; + else + last = -1; + vars = dict_add(vars, 'list_depth, (vars['list_depth]) + 1); + } else { + vars = dict_add(vars, 'list_depth, 1); + } + vars = dict_add(vars, 'list_type, 'plain); + [args, vars] = ._eval_ctext(args, vars); + if (old) { + vars = dict_add(vars, 'list_type, old); + if ((old == 'ordinal) && (last != (-1))) + vars = dict_add(vars, 'list_last, last); + vars = dict_add(vars, 'list_depth, (vars['list_depth]) - 1); + } else { + vars = dict_del(vars, 'list_type); + vars = dict_del(vars, 'list_depth); + } + return [args, vars]; +}; + +public method .do_web() { + arg vars, flags, args; + + [args, vars] = ._eval_ctext(args, vars); + return [((((args + "<") + (flags.getkey("name"))) + ":") + (flags.getkey("src"))) + ">", vars]; +}; + +public method .eval_indented() { + arg args, vars, i, @w; + var width, indent; + + width = vars['width]; + vars = vars.add('width, (| w[1] |) || (width - i)); + [args, vars] = ._eval_ctext(args, vars); + return [.rewrap_lines(vars, (vars['header]) + args, pad("", i)), vars.add('width, width)]; +}; + +public method .format() { + arg data, vars; + var str, len, line, out; + + str = (> (._eval_ctext(data, vars))[1] <); + if ((strlen(str) < 2) || (substr(str, strlen(str) - 1) != "\n")) + str += "\n"; + return str_to_buf(str); +}; + +public method .init() { + return #[['header, ""], ['width, 78]]; +}; + +public method .rewrap_lines() { + arg vars, str, prefix; + var s, p, n, firstline; + + s = []; + n = (vars['width]) + (prefix.length()); + for str in (str.explode("\n", 1)) + s += str.wrap_lines(n, prefix, 1); + return s.join("\n"); +}; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/plain_page.cdc Tue Aug 19 12:15:18 1997 @@ -0,0 +1,26 @@ + +new object $plain_page: $page, $note; + +var $described prose = []; +var $dmi_data descriptions = #[]; +var $has_commands local = #[]; +var $has_commands remote = #[]; +var $has_commands shortcuts = #[]; +var $has_name name = ['prop, "plain_page", "plain_page"]; +var $has_text text = []; +var $located location = $void; +var $located obvious = 1; +var $root created_on = 863765676; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$plain_page]; +var $root manager = $plain_page; +var $thing gender = $gender_neuter; + +public method .generate() { + arg header, info, args; + + return [.text()]; +}; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/propagator.cdc Tue Aug 19 12:15:36 1997 @@ -0,0 +1,66 @@ + +new object $propagator: $frob; + +var $root created_on = 861726346; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$propagator]; +var $root manager = $propagator; + +public method .effect() { + arg self; + + return ((self.length()) > 1) ? (self[2]) : 0; +}; + +public method .format() { + arg prop; + var i, str, pref, val; + + if (!prop) + return "no"; + [val, (pref ?= "")] = prop; + str = map i in (val) to ((tostr(i[1]) + "=") + (i[2])).join("; "); + if (pref) { + if (type(pref) == 'string) + str += " /" + pref; + else + str += strfmt(" /.%l(%l)", pref[1], map i in (pref.subrange(2)) to (toliteral(i)).join(",")); + } + return str; +}; + +public method .new_with() { + arg str; + var ctext, i, m, effect, props; + + if (str in ["n", "no", "none", "0"]) + return 0; + effect = 0; + props = #[]; + if ((m = str.match_pattern("*/*"))) { + [str, effect] = m; + if (((effect.length()) >= 2) && ((effect[1]) == ".")) { + if (!(effect = effect.match_pattern("*(*)"))) + throw(~parse, "Effect is not of the form .method(arg, ...)"); + effect = [tosym((effect[1]).subrange(2)), @map i in ((effect[2]).split(",")) to (fromliteral(i))]; + } + } + for i in ((str.explode(";")).mmap('trim)) { + if (!(m = i.match_pattern("*=*"))) + throw(~parse, "'=' expected"); + if (!((m[2]).is_numeric())) + throw(~parse, "Illegal propagator value"); + props = props.add(tosym(m[1]), toint(m[2])); + } + props = effect ? [props, effect] : [props]; + return (<this(), props>); +}; + +public method .senses() { + arg self; + + return self[1]; +}; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/propagator_effects.cdc Tue Aug 19 12:15:37 1997 @@ -0,0 +1,10 @@ + +new object $propagator_effects: $misc; + +var $root created_on = 861968399; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$propagator_effects]; +var $root manager = $propagator_effects; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/pueblo_format.cdc Tue Aug 19 12:15:17 1997 @@ -0,0 +1,132 @@ + +new object $pueblo_format: $html_format; + +var $root created_on = 862777021; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$pueblo_format]; +var $root manager = $pueblo_format; + +public method .do_dd() { + arg vars, flags, args; + + return $plain_format.do_dd(vars, flags, args); +}; + +public method .do_detail() { + arg vars, flags, args; + var det; + + det = flags.getkey("name"); + return [((((((("<a href=\"" + (vars['base_url])) + "/bin/describe?target=") + ((vars['this]).objname())) + "&detail=") + ($http.encode(det))) + "\">") + det) + "</a></b>", vars]; +}; + +public method .do_dl() { + arg vars, flags, args; + + [args, vars] = $plain_format.do_dl(vars, flags, args); + return [("<pre>" + args) + "</pre>", vars]; +}; + +public method .do_dt() { + arg vars, flags, args; + + return $plain_format.do_dt(vars, flags, args); +}; + +public method .do_img() { + arg vars, flags, args; + var src, html, alt; + + src = flags.getkey("src"); + alt = (| ("alt=\"" + (flags.getkey("alt"))) + "\"" |) || ""; + if (!match_regexp(src, "^(http|ftp):")) + src = (vars['base_url]) + src; + return [((("<img src=\"" + src) + "\" align=left hspace=10 ") + alt) + ">", vars]; +}; + +public method .do_link() { + arg vars, flags, args; + var node; + + [args, vars] = ._eval_ctext([args[1]], vars); + node = (| flags.getkey("node") |); + if (node) + return [((("<a xch_cmd=\"@help " + node) + "\">") + args) + "</a>", vars]; + return [">>ERROR: Invalid node<<", vars]; +}; + +public method .do_obj() { + arg vars, flags, args; + var gateway, argname, output, context, object, name, options; + + name = flags.getkey("name"); + [name, vars] = ._eval_ctext([name], vars); + context = flags.getkey("context"); + options = (| flags.getkey("options") |); + object = args[1]; + if (type(context) == 'string) + context = tosym(context); + if (options && (type(options) == 'string)) + options = tosym(options); + switch (context) { + case 'look: + if (options) { + switch (options) { + case 'exit: + output = [((("<a xch_cmd=\"go " + (object.name('noarticle))) + "\">") + name) + "</a>", vars]; + case 'contained: + output = [((((("<a xch_cmd=\"look " + ((object.location()).name('noarticle))) + "'s ") + (object.name('noarticle))) + "\">") + name) + "</a>", vars]; + } + } else { + output = [((("<a xch_cmd=\"look " + (object.name('noarticle))) + "\">") + name) + "</a>", vars]; + } + case 'display: + [gateway, argname] = ["display", "target"]; + case 'exit: + output = [((("<a xch_cmd=\"go " + (object.name())) + "\">") + name) + "</a>", vars]; + } + if (output) + return output; + return [((((((((("<a href=\"" + (vars['base_url])) + "/bin/") + gateway) + "?") + argname) + "=") + tostr(object)) + "\">") + name) + "</a>", vars]; +}; + +public method .do_table() { + arg vars, flags, args; + + [args, vars] = $plain_format.do_table(vars, flags, args); + return [("<pre>" + args) + "</pre>", vars]; +}; + +public method .do_td() { + arg vars, flags, args; + + return $plain_format.do_td(vars, flags, args); +}; + +public method .do_tr() { + arg vars, flags, args; + + return $plain_format.do_tr(vars, flags, args); +}; + +public method .format() { + arg data, vars; + var str, len, line, out, base, port; + + base = "http://" + ($dns.hostname("")); + port = $http_daemon.current_port(); + if (port != 80) + base += ":" + port; + vars = dict_add(vars, 'base_url, base); + str = (> (._eval_ctext(data, vars))[1] <); + if ((strlen(str) < 2) || (substr(str, strlen(str) - 1) != "\n")) + str += "\n"; + return str_to_buf(str + "\n"); +}; + +public method .init() { + return #[['width, 78]]; +}; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/security_lib.cdc Tue Aug 19 12:15:37 1997 @@ -0,0 +1,49 @@ + +new object $security_lib: $libraries; + +var $dmi_data descriptions = #[]; +var $root created_on = 864002483; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$security_lib]; +var $root manager = $security_lib; + +public method .bounce_to_auth() { + arg interface, destination; + var user; + + if (!(.check_userdb_with_optional(interface))) + return ['redirect, destination]; + else + return 0; +}; + +public method .check_userdb_with_optional() { + arg interface; + var user, auth, req; + + if (!(| (auth = interface.get_info('browser_auth)) |)) + return 0; + if (!(| (user = $user_db.search((auth[2])[1])) |)) + return 0; + if (!(user.check_password((auth[2])[2]))) + return 0; + interface.set_info('run_as, user); + return 1; +}; + +public method .check_userdb_with_password() { + arg interface; + var user, auth, req; + + if (!(| (auth = interface.get_info('browser_auth)) |)) + return ['basic, (interface.get_info('directory_object)).get_realm()]; + if (!(| (user = $user_db.search((auth[2])[1])) |)) + return [auth[1], (interface.get_info('directory_object)).get_realm()]; + if (!(user.check_password((auth[2])[2]))) + return [auth[1], (interface.get_info('directory_object)).get_realm()]; + interface.set_info('run_as, user); + return 0; +}; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/wrapped_format.cdc Tue Aug 19 12:15:17 1997 @@ -0,0 +1,26 @@ + +new object $wrapped_format: $plain_format; + +var $root created_on = 848777209; +var $root flags = ['variables, 'methods, 'code, 'core]; +var $root inited = 1; +var $root managed = [$wrapped_format]; +var $root manager = $wrapped_format; + +public method .format() { + arg data, vars; + var str, len, line, out; + + str = (> (._eval_ctext(data, vars))[1] <); + if ((strlen(str) < 2) || (substr(str, strlen(str) - 1) != "\n")) + str += "\n"; + + // ugly and inneficient--use a client people + len = (vars['receiver]).linelen(); + out = ""; + for line in (explode(str, "\n")) + out += (line.wrap_line(len, " ")) + "\n"; + return str_to_buf(out); +}; + + --- /dev/null Tue Aug 19 05:32:20 1997 +++ ColdCore-3.0a9.02/src/www_preferences.cdc Tue Aug 19 12:15:20 1997 @@ -0,0 +1,23 @@ + +new object $www_preferences: $user_interfaces; + +var $dmi_data descriptions = #[]; +var $has_commands local = #[]; +var $has_commands remote = #[]; +var $has_commands shortcuts = #[]; +var $root created_on = 867669920; +var $root defined_settings = #[["www-show-line-num", #[['parse, ['is_boolean]], ['format, ['format_boolean]]]], ["www-show-descriptions", #[['parse, ['is_boolean]], ['format, ['format_boolean]]]], ["www-show-methods", #[['parse, ['is_boolean]], ['format, ['format_boolean]]]], ["www-show-variables", #[['parse, ['is_boolean]], ['format, ['format_boolean]]]]]; +var $root flags = ['variables, 'methods, 'code, 'fertile, 'core]; +var $root inited = 1; +var $root managed = [$www_preferences]; +var $root manager = $www_preferences; +var $root settings = #[["www-show-line-num", 0], ["www-show-descriptions", 0], ["www-show-methods", 0], ["www-show-variables", 0]]; + +public method .set_www_preferences() { + arg name, value; + + (> .perms(caller(), $page_web_prefs, this()) <); + .set_setting(name, $www_preferences, value); +}; + +