;var p, new; if(!(| valid($thing_152) |)) { new = $thing.spawn(); new.set_objname('thing_152);} ;as $thing_152<$root>;manager = $user_andrew; ;as $thing_152<$root>;flags = ['variables, 'methods, 'code]; ;as $thing_152<$root>;created_on = 849049688; ;as $thing_152<$root>;owners = [$user_andrew]; ;as $thing_152<$root>;inited = 1; @av $thing_152,authentication_keys = [[$user_andrew, "29360150"]] ;as $thing_152<$thing_152>;authentication_keys = [[$user_andrew, "29360150"]]; @av $thing_152,new_tag = 28 ;as $thing_152<$thing_152>;new_tag = 28; ;as $thing_152<$has_settings>;defined_settings = #[]; ;as $thing_152<$has_settings>;local_settings = #[]; ;as $thing_152<$has_settings>;settings = #[]; ;as $thing_152<$has_name>;name = ['prop, "XDR", "XDR"]; ;as $thing_152<$has_name>;name_aliases = []; ;as $thing_152<$has_gender>;gender = $gender_neuter; ;as $thing_152<$has_commands>;shortcuts = #[]; ;as $thing_152<$has_commands>;remote = #[["foo", [["foo", "*", "foo ", 'foo, #[[1, ['this, []]]]]]], ["@xmcp_challenge", [["@xmcp_challenge", "*", "@xmcp_challenge ", 'challenge, #[[1, ['this, []]]]]]], ["@xmcp_authentication_key", [["@xmcp_authentication_key", "* with *", "@xmcp_authentication_key with ", 'set_authentication_key, #[[1, ['this, []]], [3, ['any, []]]]]]]]; ;as $thing_152<$has_commands>;local = #[]; ;as $thing_152<$described>;prose = []; ;as $thing_152<$located>;location = $the_pit; ;as $thing_152<$located>;obvious = 1; @program $thing_152.new_tag() +access=public return ++new_tag; // $#Edited: 27 Nov 96 00:13 $user_andrew // $#Edited: 27 Nov 96 00:30 $user_andrew . @program $thing_152.challenge() +access=public // which objects can spam the client, asking for an authentication key // to be sent? Most likely this will be called via the @xmcp_challenge // user interface command. // 1. the user // 2. any trusted object if (!(sender() in [user(), @.trusted()])) return; user().tell("$#$xmcp version: 1.1"); // $#Edited: 30 Nov 96 22:48 $user_andrew . @program $thing_152.set_authentication_key() +access=public arg key; var psn, newvalue; // Which objects can set a user's authentication key? Most likely // this will be via the @xmcp_authentication_key user interface command. // 1. the user // 2. any trusted object if (!(sender() in [user(), @.trusted()])) return; psn = user() in authentication_keys.slice(1); newvalue = [user(), key]; if (psn != 0) authentication_keys = authentication_keys.replace(psn, newvalue); else authentication_keys = [newvalue, @authentication_keys]; // $#Edited: 30 Nov 96 22:15 $user_andrew . @program $thing_152.init() +access=public authentication_keys = []; new_tag = 0; // $#Edited: 27 Nov 96 00:53 $user_andrew // $#Edited: 27 Nov 96 00:53 $user_andrew . @program $thing_152.authentication_key() +access=public arg who; var psn; if (!(sender() in [this(), user(), @.trusted()])) return; psn = who in authentication_keys.slice(1); if (psn != 0) return authentication_keys[psn][2]; else return 0; // $#Edited: 30 Nov 96 23:17 $user_andrew . @program $thing_152.client_notify() +access=public arg who, request, kv, [lines]; var ok, keyval, keyvals, line, tag; if (who == user() && user() in sender().owners()) { // user writing to themselves // user wrote their own interface to this method // user().tell("u -> u, o(i) == u"); } else if (sender() in .trusted()) { // user writing to self or others // user using a trusted interface to this method } else { return; } // quite minimal, no argument or perms checking. I don't know enough // Cold .db to do this yet. ok = 1; keyvals = ""; for keyval in (kv) keyvals = keyvals + keyval[1] + ": " + toliteral(keyval[2]) + " "; // lines == [] is not the same as not being given an argument at all lines = [@lines, "NOTHING"][1]; if (lines != "NOTHING") { tag = .new_tag(); keyvals = keyvals + " tag: " + tag; who.tell("$#$" + request + "* " + .authentication_key(who) + " " + keyvals); for line in (lines) who.tell("$#$data tag: " + tag + " data: " + toliteral(line)); who.tell("$#$END tag: " + tag); } else { who.tell("$#$" + request + " " + .authentication_key(who) + " " + keyvals); } return 1; // $#Edited: 27 Nov 96 01:31 $user_andrew // $#Edited: 27 Nov 96 02:33 $user_andrew // $#Edited: 30 Nov 96 22:07 $user_andrew // $#Edited: 30 Nov 96 22:36 $user_andrew // $#Edited: 30 Nov 96 23:13 $user_andrew .