Internet-Draft
Date: 4. 4. 04
Expires: when 1.0 is ready
©1995 - 2011
C. von Loesch



PSYC Storage Rules

<draft-vonLoesch-psyc-storage-00>
http://www.psyc.eu/storage.html
In perlpsyc (Net::PSYC::Storage.pm to be exact) we have started using certain standard files and environment variables to retrieve the UNIs of known people, including the user. The ~ tilde character stands for the home directory of the user, which under unix is kept in the environment variable $HOME. Other operating systems have other ways of defining where the home directory for user settings is, and a similar mechanism to unix environment variables.

  • My UNI
  • PSYC applications SHOULD first check their environment for the following information: The own identification is kept in the environment variable $PSYC. An alternate nickname MAY be given in $NICK but is normally to be extracted from $PSYC.

    The file ~/.psyc/me MAY contain the preferred identification if $PSYC is undefined. The file MUST NOT contain anything else but the UNI string, so that a simple

    uni = `cat ~/.psyc/me`
    statement in a shell script is valid.

  • My authentication
  • The $PSYCPASS environment variable contains the password typically matching the $PSYC identification. If that is not the case, you SHOULD look into a file called ~/.psyc/auth.

    Each line of the file may either be a comment (with a leading # sign), or a whitespace-seperated format of

    <UNI>	<pass>
    with the first matching line being the preferred UNI.

    If neither any of the environment variables nor the files are available, you may use $IRCNICK or $USER as a nickname, or even the hostname $HOST for root or daemon processes.

  • My people
  • The file ~/.psyc/people currently contains a list of one UNI per line. The UNI itself contains the default nickname according to UNI specification. The line may also contain nickname aliases seperated by whitespace. Further information like friendship degrees is currently not provided here. Sample file:
    psyc://psyced.org/~depairet dep
    psyc://psyced.org/~elridion elrid el
    psyc://psyced.org/~lynX
    psyc://goodadvice.pages.de/~fippo
    psyc://goodadvice.pages.de/~heldensaga saga tobi
    This format may be obsoleted by a file format identical to the PSYC packet format of _status_storage, which makes syncing between UNI and local file easier. Or we may want to store this type of information in XML to make it more accessible to non-PSYC applications. Maybe we will like to keep all of these formats available at once.
Comments to psyc://psyced.org/~lynX or psyc://psyced.org/@dev