@q @program asys-verify 1 99999 d i ( asys-verify v1.2 Jessy@FurryMUCK 6/97, 11/99 The asys-verify program is used to handle verification settings. Verification in Argo works by appending a string known only to the player to all Argo output. This makes it virtually impossible for a non-wizbitted spoof or other form of 'fake' output to accurately duplicate Argo output. INSTALLATION: asys-verify uses the standard Argo installation method. Port the program and set it Wizard. Type '+install asys-verify' USAGE: +verify .................... Show your current verification string +verify ........... Set verification string to +verify #on ................ Turn on verification +verify #off ............... Turn off verification asys-verify may be freely ported. Please comment any changes. ) (2345678901234567890123456789012345678901234567890123456789012345678901) $def thisVersion "1.2" $define Tell me @ owner swap notify $enddef $include $lib/argo lvar scratch (* workspace var *) lvar ourCounter (* misc. counter var *) lvar ourDataObj (* dbref: object holding system-wide data *) lvar ourArg (* inital arg string, unmodified *) lvar ourCom (* string: 'official' name of command *) lvar ourBoolean (* int: misc flow control var *) : DoInstall ( -- ) (* install program into Argo system *) caller program? not if (* confirm installation method *) ">> Programs must be installed via the " "+install" GetCommandName strcat " command." strcat Tell exit then prog "@a/version" getpropstr if (* confirm re-install *) ">> Reinstalling... " Tell else ">> Installing..." Tell then (* record 'official' name of prog; remove old links *) prog "@a/name" "asys-verify" setprop RecOldActions (* create and register command; set default props *) #0 "+verify" newexit dup scratch ! prog setlink prog "@a/version" thisVersion setprop scratch @ "@a/version" thisVersion setprop #0 "@a/comm_list/+verify" scratch @ setprop #0 "@a/prog_list/" prog name strcat prog setprop scratch @ "@a/name" "+verify" setprop ">> Installed." Tell ; : DoUninstall (* uninstall program from Argo *) prog "@a/name" getpropstr if #0 "@a/prog_list/" prog "@a/name" getpropstr strcat getprop not if ">> " prog name strcat " is not currently installed." strcat Tell pid kill then else ">> " prog name strcat " is not currently installed." strcat Tell pid kill then ">> Please confirm: You wish to uninstall " prog name strcat "?" strcat Tell ReadYesNo not if ">> Aborted." Tell pid kill Then background "@a/comm_list/+verify" RemoveCommand #0 "@a/prog_list/" prog "@a/name" getpropstr strcat remove_prop RecOldActions ">> Uninstalled. Please edit the online manual as appropriate." Tell ; : DoHelp ( -- ) (* display help screen *) " " Tell prog name " (#" strcat prog intostr strcat ")" strcat Tell " " Tell "The " command @ strcat " command is used to append a verification string (that " "is, a string of letters, numbers or symbols known only to you) to " "all Argo output generated by other players. With a verification " "string set, and verification turned on, you can be confident that " "Argo output is indeed generated by Argo programs, and not by a " "spoof or some other form of 'fake' output." strcat strcat strcat strcat strcat strcat Tell " " Tell "Syntax:" Tell " " Tell " $command .................... Show your current verification string" command @ "$command" subst Tell " $command ........... Set verification string to " command @ "$command" subst Tell " $command #on ................ Turn on verification" command @ "$command" subst Tell " $command #off ............... Turn off verification" command @ "$command" subst Tell " " Tell ; : DoVerHelp ( -- ) (* explain purpose of verification strings *) "A verification string is a string of letters, numbers, or symbols " "set by you to verify that Argo output does indeed come from an " "Argo program, rather than a spoof program or some other 'fake' " "source of output. With a verification string set, and verification " "turned on, your verification string -- known only to you -- will " "be appended to Argo output generated by other players." strcat strcat strcat strcat strcat Tell ; : DoOn ( -- ) (* turn on verifications *) me @ "@a/store/verstring" getprop not if ">> Turning on verification..." Tell ">> You need to set a verification string first." Tell ">> [Enter verification string, or .q to quit]" Tell ReadLine strip QCheck me @ "@a/store/verstring" rot setprop then me @ "@a/store/veron" "yes" setprop ">> Verification on." Tell ; : DoOff ( -- ) (* turn off verification *) me @ "@a/store/veron" remove_prop ">> Verification off." Tell ; : DoShowVerify ( -- ) (* show current verification string *) me @ "@a/store/verstring" getpropstr dup if ">> Your current verfification string is $string." swap strip 1 strcut swap pop dup strlen 1 - strcut pop strip "$string" subst Tell else pop ">> You do not currently have a verification string set." Tell then me @ "@a/store/veron" getpropstr if ">> Verification is turned on." else ">> Verification is turned off." then Tell ; : DoSetVerify ( -- ) (* set verification string *) me @ "@a/store/verstring" " ( " ourArg @ strcat " )" strcat setprop ">> Verification string set to $string." ourArg @ "$string" subst Tell me @ "@a/store/veron" getprop not if me @ "@a/store/veron" "yes" setprop ">> Verification turned on." Tell then ; : main "me" match me ! (* initialize *) GetDataObj ourDataObj ! strip ourArg ! trig "@a/name" getpropstr ourCom ! Update ourArg @ if ourArg @ "#" stringpfx if "#help" ourArg @ stringpfx if DoHelp else "#on" ourArg @ stringpfx if DoOn else "#off" ourArg @ stringpfx if DoOff else "#enable" ourArg @ stringpfx if DoEnable else "#disable" ourArg @ stringpfx if DoDisable else "#version" ourArg @ stringpfx if DoVersion else "#install" ourArg @ stringpfx if DoInstall else "#uninstall" ourArg @ stringpfx if DoUninstall else ">> #Argument not understood." Tell then then then then then then then then exit then then me @ ArgoPermCheck Disabled? ourArg @ if DoSetVerify else DoShowVerify then ; . c q @set asys-verify=W