@verb #755:"www_login" this none this rxdo #789 @program #755:"www_login" this none this ":www_login(URL)" "Verifies that the user and password are valid. Updates serial number and web object lists, then returns all info." if (caller != this && caller != this.transcript) raise(E_PERM) endif slice = $list_utils:slice(dobj, 1) if (!dobj) return "" elseif (slice[1..min($, 5)] != {"id", "pw", "md", "sn", "tx"} || length(slice) > 6) "Invalid or missing data from URL." return "Invalid URL arguments: " + toliteral(slice) endif {id, pw, md, sn, tx, ?style = "Say it!"} = $list_utils:slice(dobj, 2) "Is this a real user?" count = where = 0 for user in (this.users) count = count + 1 if (id == user[1]) where = count break user endif endfor if (!where) return "Unknown username!" endif user = this.users[where] id = user[1] "Check the password." if (!("*" == user[2] || pw == user[2])) return "Incorrect password!" endif "Wipe out text if it is a reload, otherwise store the new serial number." if (sn in user[3]) tx = "" else user[3] = {sn, @user[3]} length(user[3]) > 10 && (user[3] = user[3][1..10]) this.users[where][3] = user[3] endif "Announce the person's text to the room." if (tx) tx = $msg:censor(tx) this:www_speak(id, tx, style, user[5]) endif "Record the last seen time." this.users[where][6] = time() return {id, pw, md, where, tx} "Last modified by Dax (#789) on Mon May 10 16:12:19 1999 MDT." .