/info set commands to server are out-of-band: #$# commands to the client are: % Login process: When a user logs in, the server sends *** Connected *** or *** Redirecting old connection to this port *** Right after this, the client is expected to identify itsef: Client to server: #$# client CLIENTNAME CLIENTVERSION ARCHITECHTURE ARCHITECTURE is: `uname -s`_`uname -r` and is optional Server to client: The server sends those only if the client is registered as understanding these commands. Some commands may be registered and not others. The client is expected to store this i %info_size MAXLINES : maximum number of lines allowed in an info file %recip_regexp REGEXP : a regular expression that can be used to parse lines the client gets from the user and passes on to the server. If the client matches the regular expression, that is the intended recipient of the message. It can be used to record a number users to whom the user sent messages %connected entry : sent after all initialization has been handled, if the users had previously quit with "bye" (or never entered) %connected attach : sent after all initialization has been handled, and after any detach-output if the user had previously /detach'ed, and has auto-review turned on. Also sent when the user redirects a previous connection Receiving messages: When a message is sent, the following messages are sent: %sender, %sendgroup, %g, header, message-body, %endmsg (Assuming the client supports them) %sender SENDERNAME\r\n : sent just before a private message to indicate who sent that message. Spaces are translated to underscores. That line should then be discarded (not parsed further, and not put on the screen.) %sendgroup GROUP\r\n : list of all the recipents of the message, plus the sender of the message, minus the user (the users who's running the client). The list is comma delimited, and has spaces translated to underscores. It is usable directly as a sender list. The line should be discarded. %g : tells the client to ring the bell. Discard only the "%g" part of the line. The rest should be put on the screen for the user. This command will have to be replaced soon. Exporting a file Client to server: #$# export_file FILENAME [DESTINATION] : sends a file called FILENAME as an info file for DESTINATION. If DESTINATION is not specified, the user's personal info is set. Client should check the %info_size before sending it. Server to client: %export_file OKAY | NOT : if OKAY, we can send the file. client sends the file, followed by the word "SAVE". If NO, the request has to be cancelled. The client should hold on to any data sent by the user between the #$# export_file an the file itself - otherwise, messages might end up in the info file! Setting the screen size: Client to server: #$# screen_width SIZE : tells the user the width of the screen. The users then uses this value to format messages for the users. Must be between 40 and 300. Server to client: %screen_width NOT|OKAY : agrees or disagrees with the request Threading: There are two methods to do threading. If a client uses both of them, method #1 "takes priority", that is, it encapsulates the output generated by the second method. Threading 1: Client to server: #$# delimiters STARTMSG ENDMSG : from this point on, every command the user sends, the server answers with STARTMSG, the output of the command, ENDMSG. Threading 2: Server to client: %begin COMMAND [task_id] each line generated by that command starts with %command [task_id] OUTPUT when the command is finished, server sends %end [task_id] Features to register: connected recip_regexp sender sendgroup recip (deprecated - not a useful feature to have) info_size leaf. SAVE