View/Edit #95!$site_db

File name: $site_db
Database of places
------------------
i.e., places people have connected from.

  :add(sitename,player)
      records the fact that player connected from sitename.
  :load()
      clears the db and reloads all of the player connection info.

  .domain
      default domain for unqualified sitenames given to :add.
      
For each domain we keep a list of players and subdomains. 
For example, :add("doc.ic.ac.uk",#666) enters #666 on the lists for "doc.ic.ac.uk", and, if we have to create an entry for "doc.ic.ac.uk", we enter "doc" on the list for "ic.ac.uk", "ic" on the list for "ac.uk", etc....  In this case, :find("ic") will return the "ic.ac.uk" list if there is no other domain in $site_db starting with "ic".  Note that the "ic.ac.uk" list may contain both objects, i.e., namely players that have connected from the site "ic.ac.uk", and strings, i.e., subdomains of "ic.ac.uk" like "doc".

  :find_exact(string)    => player/subdomain list or $failed_match
  :find_all_keys(string) => list of all domains that begin with string
  :find_key     (string) => unique domain that begins with string, 
                            $ambiguous_match or $failed_match

The other $generic_db functions (:find, :find_all) are also available, though admittedly less useful.

http://files.moo.ca:8081/9/5/$site_db
Size: 1,273 bytes.
File perms: Readable


You are not logged in.

[home | help | who | search | setup | code]