All pastes #904172 Raw Edit

Untitled

public text v1 · immutable
·published 2008-02-14 19:34 UTC
rendered paste body
function main()
{
WindowSize -viewable 256x192
declare KeyFile string global 1
declare KeyFileCheck string script 0
declare NannyDir filepath script "C:/Program Files/Innerspace/Scripts/NannyDir/"
declare EKG int script
declare EKGstored int script ${Time.Timestamp}
declare Heartstored int ${Heartbeat}
	
Uplink Name "${Me.Name}"
WindowText "${Me.Name}"

	do 
	{
		if ${KeyFile.Equal[0]}
			exit
	if !${KeyFile.Equal[${KeyFileCheck}]}
		{
		call KeyClean
		echo "keyfile is ${KeyFile}"
		call CreateKeyFile ${KeyFile}
			
			
		
		}
		wait 50
		if !${Session.Equal[${Me.Name}]}
			Uplink Name ${Me.Name}
		
	}
	while 1

}

function CreateKeyFile(int KeyNumber)
{
declare KeyFilePath filepath local "${NannyDir}${Me.Name}-${KeyNumber}"
echo "---CREATEKEYFILE----"

SettingXML[${KeyFilePath}]:Unload	
SettingXML[${KeyFilePath}]:Save
echo "Key is ${KeyNumber}"
KeyFileCheck:Set[${KeyNumber}]

}

function KeyClean()
{
declare count int local 0
echo "--KEYCLEAN--"
	do 
	{
	if ${NannyDir.FileExists["${Me.Name}-${count}"]}
		rm "${NannyDir}/${Me.Name}-${count}"
		count:Inc
	}
	while ${count}<=100
}