]> code.citadel.org Git - citadel.git/blobdiff - citadel/techdoc/session.txt
* Updated some of the docs. Bumped version number to 5.80 in anticipation
[citadel.git] / citadel / techdoc / session.txt
index bd94c8527e4ebaaba0201aec3ba14c9d2aadf214..4007dc176b4f0107a84b3bd84ba12838a41f9c3f 100644 (file)
@@ -1,5 +1,5 @@
                   SESSION LAYER PROTOCOL FOR CITADEL/UX
-         (c) 1995-1999 by Art Cancro et. al.    All Rights Reserved
+         (c) 1995-2001 by Art Cancro et. al.    All Rights Reserved
    
   
  INTRODUCTION
@@ -23,7 +23,8 @@ the same name but perform different functions.  If you don't coordinate new
 developments ahead of time, please at least send in an e-mail documenting
 what you did, so that your new commands can be added to this document.
  
- The coordinator of the Citadel/UX project is Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>.
+ The coordinator of the Citadel/UX project is Art Cancro
+<ajc@uncensored.citadel.org>.
     
   
  CONNECTING TO A SERVER
@@ -91,7 +92,15 @@ it wants to or not.  The end of the listing is signified by the string
 should begin sending a listing of some sort.  The client *must* send something,
 even if it is an empty listing.  Again, the listing ends with "000" on a line
 by itself.
-  
+ BINARY_FOLLOWS and SEND_BINARY mean that the client must immediately send
+or receive a block of binary data.  The first parameter will always be the
+number of bytes.
+ ASYNC_MESSAGE_FOLLOWS means that an asynchronous, or unsolicited, message
+follows.  The next line will be one of the above codes, and if a data transfer
+is involved it must be handled immediately.  Note that the client will not
+receive this type of response unless it indicates to the server that it is
+capable of handling them; see the writeup of the ASYN command later in this
+document.
   
  PARAMETERIZATION
  ----------------
@@ -257,7 +266,7 @@ inaccessible private rooms.
  
  This command retrieves the screen dimensions and user options for the
 currently logged in account.  ERROR will be returned if no user is logged
-in, of course.  Otherwise, OK will be returned, followed by three parameters.
+in, of course.  Otherwise, OK will be returned, followed by four parameters.
 The first parameter is the user's screen width, the second parameter is the
 user's screen height, and the third parameter is a bag of bits with the
 following meanings:
@@ -271,14 +280,17 @@ following meanings:
  
  There are other bits, too, but they can't be changed by the user (see below).
  
+ The fourth parameter, if present, is the moderation level this user is
+filtering at.
  
  SETU   (SET User configuration)
  
  This command does the opposite of SETU: it takes the screen dimensions and
 user options (which were probably obtained with a GETU command, and perhaps
 modified by the user) and writes them to the user account.  This command
-should be passed three parameters: the screen width, the screen height, and
-the option bits (see above).
+should be passed four parameters: the screen width, the screen height,
+the option bits (see above), and the desired moderation level to filter at.
  
  Note that there exist bits here which are not listed in this document.  Some
 are flags that can only be set by Aides or the system administrator.  SETU
@@ -521,6 +533,9 @@ parts of the listing:
  Line 12 - Paging level.  0 if the system only supports inline paging,
            1 if the system supports "extended" paging (check-only and
            multiline modes).  See the SEXP command for further information.
+ Line 13 - The "nonce" for this session, for support of APOP-style
+           authentication.  If this field is present, clients may authenticate
+           in this manner.
  
  *** NOTE! ***   The "server type" code is intended to promote global
 compatibility in a scenario in which developers have added proprietary
@@ -533,7 +548,7 @@ proprietary features:
 your own.
  -> Clients other than your own should still be able to utilize your server,
 even if your proprietary extensions aren't supported.
- -> Please contact Art Cancro <ajc@uncnsrd.mt-kisco.ny.us> and obtain a unique
+ -> Please contact Art Cancro <ajc@uncensored.citadel.org> and obtain a unique
 server type code, which can be assigned to your server program.
  -> If you document what you did in detail, perhaps it can be added to a
 future release of the Citadel/UX program, so everyone can enjoy it.  Better
@@ -560,12 +575,13 @@ length of the file, and a description.
  
  The server message contained on the same line with LISTING_FOLLOWS will
 contain the name of the system and the name of the directory, such as:
-  uncnsrd.mt-kisco.ny.us|/usr/bbs/files/my_room_directory
+  uncensored.citadel.org|/usr/bbs/files/my_room_directory
  
  
  SLRP   (Set Last-message-Read Pointer)
  
- This command is used to mark messages as having been read.  Its sole parameter
+ This command marks all messages in the current room as read (seen) up to and
+including the specified number.  Its sole parameter
 is the number of the last message that has been read.  This allows the pointer
 to be set at any arbitrary point in the room.  Optionally, the parameter
 "highest" may be used instead of a message number, to set the pointer to the
@@ -904,6 +920,7 @@ all remaining lines:
  Line 8:  Telephone number
  Line 9:  Access level
  Line 10: Internet e-mail address
+ Line 11: Country
  
  Users without Aide privileges may retrieve their own registration using
 this command.  This can be accomplished either by passing the user's own
@@ -970,6 +987,7 @@ SEND_LISTING is returned, and the server will expect the following information
  Line 5:  ZIP Code
  Line 6:  Telephone number
  Line 7:  e-mail address
+ Line 8:  Country
  
  
  CHEK   (CHEcK various things)
@@ -1044,7 +1062,10 @@ from, or "localhost" if the client is local.
      this client (Note: NOOP's don't count)
  6 - The last command received from a client. (NOOP's don't count)
  7 - Session flags.  These are: + (spoofed address), - (STEALTH mode), *
-     (posting) and . (idle).  (Citserver 5.02 and above)
+     (posting) and . (idle).
+ 8 - Actual user name, if user name is masqueraded and viewer is an Aide.
+ 9 - Actual room name, if room name is masqueraded and viewer is an Aide.
+ 10 - Actual host name, if host name is masqueraded and viewer is an Aide.
  
  The listing is terminated, as always, with the string "000" on a line by
 itself.
@@ -1391,9 +1412,14 @@ ERROR codes if it fails.
  
  Receive from the server a named user's bio.  This command should be passed
 a single argument - the name of the user whose bio is requested.  RBIO returns
-LISTING_FOLLOWS plus the bio file if the user exists and has a bio on file,
-ERROR+NO_SUCH_USER if the named user does not exist, or ERROR+FILE_NOT_FOUND
-if the user exists but has no bio on file.
+LISTING_FOLLOWS plus the bio file if the user exists and has a bio on file.
+The return has the following parameters:  the user name, user number, access
+level, date of last call, times called, and messages posted.  This command
+returns ERROR+NO_SUCH_USER if the named user does not exist.
+
+ RBIO no longer considers a user with no bio on file to be an error condition.
+It now returns a message saying the user has no bio on file as the text of the
+bio.  This allows newer servers to operate with older clients.
   
   
  STEL   (enter STEaLth mode)
@@ -1471,6 +1497,8 @@ of the session to be terminated.
 a client program is prohibited from terminating the session it is currently
 running on.
  
+ See also: REQT
  
  NSET   (Network SETup commands)
  
@@ -1498,9 +1526,10 @@ the client program should expect the connection to be immediately broken.
 0 to respectively set or clear the flag.  When the "scheduled shutdown" flag is
 set, the server will be shut down when there are no longer any users logged in.
 Any value other than 0 or 1 will not change the flag, only report its state.
-No users will be kicked off the system, and in fact the server is still available
-for new connections.  The command returns ERROR if it fails; otherwise, it
-returns OK followed by a number representing the current state of the flag.
+No users will be kicked off the system, and in fact the server is still
+available for new connections.  The command returns ERROR if it fails;
+otherwise, it returns OK followed by a number representing the current state
+of the flag.
  
  
  EMSG   (Enter a system MeSsaGe)
@@ -1537,11 +1566,8 @@ UCLS command.
  ->  _userpic_   (Server will attempt to write to the user's online photo)
  ->  Any of the "well known" filenames described in the writeup for the 
      OIMG command.
-
-----------------------------------------------
-The following are for citserver 5.02 and above
-----------------------------------------------
-
+   
+  
  HCHG  (Hostname CHanGe)
 
  HCHG is a command, usable by any user, that allows a user to change their RWHO
@@ -1685,10 +1711,16 @@ fails for any reason, ERROR is returned.
  19. Name of room to log express messages to (or a zero-length name for none)
  20. Access level required to create rooms
  21. Maximum message length which may be entered into the system
-  
- EXPI   (EXPIre system objects)
+ 22. Minimum number of worker threads
+ 23. Maximum number of worker threads
+ 24. Port number for POP3 service
+ 25. Port number for SMTP service
+ 26. Default moderation filter level for new users (-63 to +63)
+ 27. Flag (0 or 1) - allow Aides to zap (forget) rooms
+ 28. Port number for IMAP service
+
+
+  EXPI   (EXPIre system objects)
  
  Begins purge operations for objects which, according to site policy, are
 "old" and should be removed.  EXPI should be called with one argument, one of:
@@ -1741,42 +1773,106 @@ execute a random GEXP every now and then.  Or, it can check the byte in
 server return code messages, between the return code and the parameters.  In
 much the same way as FTP uses "-" to signify a continuation, Citadel uses
 an "*" in this position to signify the presence of waiting express messages.
+  
+  
+ FSCK   (check message base reference counts)
+ Verify, via the long way, that all message referenmce counts are correct.  If
+the user has permission to do this then LISTING_FOLLOWS is returned, followed
+by a transcript of the run.  Otherwise ERROR is returned.
+   
  
+ DEXP   (Disable EXPress messages)
   
+ DEXP sets or clears the "disable express messages" flag.  Pass this command a
+1 or 0 to respectively set or clear the flag.  When the "disable express
+messages" flag is set, no one except Aides may send the user express messages.
+Any value other than 0 or 1 will not change the flag, only report its state.
+The command returns ERROR if it fails; otherwise, it returns OK followed by a
+number representing the current state of the flag.
  
- CICQ   (Citadel ICQ metaclient setup)
+  
+ MMOD   (MODerate a Message)
+  
+ Set or change the moderation level of a message.  The two parameters passed
+to this command should be the message number and the desired moderation level.
+Please refer to the "moderation.txt" document for a description of some
+commonly used moderation levels.
+ If the command succeeds, OK is returned.  If the specified message does not
+exist in the current room, or if the specified moderation level is not within
+acceptable limits, ERROR+ILLEGAL_VALUE is returned.  This command requires at
+least Room Aide access; if the calling user is not an Aide, or a Room Aide for
+the current room, ERROR+HIGHER_ACCESS_REQUIRED is returned.
  
- ** WARNING **
- This command is most likely a temporary one.  Citadel will eventually have
-more robust functionality for abstract configuration screens, and when that
-happens, this command will certainly be migrated there.  If you're developing
-a client, don't spend a lot of time working on ICQ screens.
  
- If a Citadel server has the ICQ Metaclient installed, this command is used
-to configure it.  It has several usages:
+ REQT   (REQuest client Termination)
+ Request that the specified client (or all clients) log off.  Aide level
+access is required to run this command, otherwise ERROR+HIGHER_ACCESS_REQUIRED
+is returned.
  
- CICQ login|uin|pass
+ The REQT command accepts one parameter: the session ID of the client which
+should be terminated, or 0 for all clients.  When successful, the REQT command
+returns OK.
  
-  This tells Citadel the user's ICQ uin (second argument) and password (third
-argument).  When called in this fashion, CICQ will return either OK or ERROR.
-It should be noted, however, that the only way an ERROR code can be returned
-is if the uin and/or password is not supplied.  Authentication failures cannot
-be immediately detected, because the ICQ protocol is asynchronous.
+ It should be noted that REQT simply transmits an express message to the
+specified client(s) with the EM_GO_AWAY flag set.  Older clients do not honor
+this flag, and it is certainly possible for users to re-program their client
+software to ignore it.  Therefore the effects of the REQT command should be
+considered advisory only.  The recommended implementation practice is to first
+issue a REQT command, then wait a little while (from 30 seconds up to a few
+minutes) for well-behaved clients to voluntarily terminate, and then issue a
+TERM command to forcibly disconnect the client (or perhaps a DOWN command, if
+you are logging off users for the purpose of shutting down the server).
  
- CICQ getcl
  
- Request the current contact list.  If successful, CICQ will return
-LISTING_FOLLOWS followed by zero or more contacts in the format 
+ SEEN   (set or clear the SEEN flag for a message)
+ Beginning with version 5.80, Citadel supports the concept of setting or
+clearing the "seen" flag for each individual message, instead of only allowing
+a "last seen" pointer.  In fact, the old semantics are implemented in terms
+of the new semantics.  This command requires two arguments: the number of the
+message to be set, and a 1 or 0 to set or clear the "seen" bit.
+ This command returns OK, unless the user is not logged in or a usage error
+occurred, in which case it returns ERROR.  Please note that no checking is
+done on the supplied data; if the requested message does not exist, the SEEN
+command simply returns OK without doing anything.
+  
    
-   uin|nickname|status
+  
+ ASYN   (ASYNchronous message support)
  
- CICQ putcl
+ Negotiate the use of asynchronous, or unsolicited, protocol messages.  The
+only parameter specified should be 1 or 0 to indicate that the client can or
+cannot handle this type of messages.  The server will reply OK followed by a
+1 or 0 to tell the client which mode it is now operating in.
  
- Upload a new contact list.  If successful, CICQ will return SEND_LISTING
-after which the client should transmit zero or more uin's, one per line.  The
-server will then attempt to contact the ICQ server to determine nicknames
-and statuses.
+ If the command is not available on the server (i.e. it returns ERROR), or
+if the command has not been executed by the client, it should be assumed that
+this mode of operation is NOT in effect.
+ The client may also send any value other than 0 or 1 to simply cause the
+server to output its current state without changing it.
+ When asynchronous protocol mode is in effect, the client MUST handle any
+asynchronous messages as they arrive, before doing anything else.
+   
+   
+ ASYNCHRONOUS MESSAGES
+ ---------------------
+ When the client protocol is operating in asynchronous mode (please refer to
+the writeup of the ASYN command above), the following messages may arrive at
+any time:
+  
  
- CICQ status
+ 901  (express message arriving)
  
- Always returns OK followed by a 1 (connected to ICQ) or 0 (not connected).
+ There is an express message intended for this client.  When the client
+receives this message, it MUST act as if it just sent a GEXP command (the data
+following the 901 message WILL be a LISTING_FOLLOWS data transfer; in fact,
+the current implementation simply executes a GEXP command internally).