* serv_bio.c: RBIO now also returns stats about a user, see session.txt
authorMichael Hampton <io_error@uncensored.citadel.org>
Sun, 28 Jan 2001 07:35:04 +0000 (07:35 +0000)
committerMichael Hampton <io_error@uncensored.citadel.org>
Sun, 28 Jan 2001 07:35:04 +0000 (07:35 +0000)
citadel/ChangeLog
citadel/serv_bio.c
citadel/techdoc/session.txt

index b7cc4f36f94d5927a72a2cd0f50bc2c11264078e..9c02de18515442bb943954cba5b86ba835d55f8a 100644 (file)
@@ -1,4 +1,7 @@
  $Log$
+ Revision 573.74  2001/01/28 07:35:04  error
+  * serv_bio.c: RBIO now also returns stats about a user, see session.txt
+
  Revision 573.73  2001/01/16 04:03:13  ajc
  * yeesh ... more on the IMAP BODYSTRUCTURE
 
@@ -2341,3 +2344,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import 
+
index f4599bec8b8f5158733f3c56c35b44e64a28260a..18bf3b920db98fed23477d640eb58b89036d593d 100644 (file)
@@ -79,15 +79,16 @@ void cmd_rbio(char *cmdbuf)
        }
        sprintf(buf,"./bio/%ld",ruser.usernum);
        
+       cprintf("%d OK|%s|%ld|%d|%ld|%ld|%ld\n", LISTING_FOLLOWS,
+               ruser.fullname, ruser.usernum, ruser.axlevel,
+               ruser.lastcall, ruser.timescalled, ruser.posted);
        fp = fopen(buf,"r");
-       if (fp == NULL) {
-               cprintf("%d %s has no bio on file.\n",
-                       ERROR+FILE_NOT_FOUND,ruser.fullname);
-               return;
+       if (fp == NULL)
+               cprintf("%s has no bio on file.\n", ruser.fullname);
+       else {
+               while (fgets(buf,256,fp)!=NULL) cprintf("%s",buf);
+               fclose(fp);
        }
-       cprintf("%d  \n",LISTING_FOLLOWS);
-       while (fgets(buf,sizeof buf,fp)!=NULL) cprintf("%s",buf);
-       fclose(fp);
        cprintf("000\n");
 }
 
index e7f2344812c03d13514ba555f3b17000a32efdcc..77eff271ff706752dcb84e16bda2ad5a4c2737a0 100644 (file)
@@ -1411,9 +1411,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)