// $Id: onDestroy.src 373 2006-06-17 18:27:33Z austinheilman $

include ":datafile:datafile";

program DestroyBook(book)
	var book_data_file := DFOpenDataFile(":sysbook:books", DF_NO_CREATE);
	book_data_file.DeleteElement(Hex(book.serial));
	
	var script_name := GetProcess(GetPid()).name;
	LogToFile("::log/sysBook.log", "["+script_name+"]: "+"Deleting datafile elem for book "+Hex(book.serial), LOG_DATETIME);
	
	return 1;
endprogram