@verb #555:"check" this none none rxdo #789 @program #555:"check" this none none if ($code_utils:task_valid(this._reboot_task)) player:tell("", this.name, " is in the process of rebooting the database. You probably don't want to check links in a database that is changing. Please wait...") return elseif ($code_utils:task_valid(this._check_task)) player:tell("", this.name, " is already in the process of link checking the database. Please wait...") return endif player:tell("Checking links & images!

") this._check_task = task_id() this:filewrite("check.txt", {}) this:jabber("Starting link check at: ", ctime()) files = $list_utils:choose_match(".%.htm", this:filelist()) this:jabber("Proccessing ", length(files), " files.") known_good = known_bad = {} for file in (files) this:jabber("... ", file) text = this:fileread(file) {good, bad} = $html_utils:link_check(text, $www:fileurl(this, ""), known_good, known_bad) for url in (bad) this:jabber("Bad URL: ", url) endfor known_good = $set_utils:union(known_good, good) known_bad = $set_utils:union(known_bad, bad) suspend(0) endfor this:jabber("Finished link check at: ", ctime()) this:jabber("Have a nice day!") this:jabber("") this:jabber("") this:jabber("List of all good URLs in all files:") for url in ($list_utils:sort_suspended(known_good)) this:jabber("* ", url) endfor this:jabber("") this:jabber("") this:jabber("List of all broken URLs in all files:") for url in ($list_utils:sort_suspended(known_bad)) this:jabber("* ", url) endfor "Last modified by Dax (#789) on Wed Jan 9 16:34:47 2002 MST." .