#include <pwd.h>
#include <errno.h>
#include <sys/types.h>
-#include <sys/time.h>
+
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif
+
#include <sys/wait.h>
#include <string.h>
#include <limits.h>
#include "citadel.h"
#include "server.h"
-#include <time.h>
#include "sysdep_decls.h"
#include "citserver.h"
#include "support.h"
}
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");
}
}
cprintf("%d\n",LISTING_FOLLOWS);
- while (fgets(buf,255,ls)!=NULL)
+ while (fgets(buf,sizeof buf,ls)!=NULL)
if (getuserbynumber(&usbuf,atol(buf))==0)
cprintf("%s\n",usbuf.fullname);
pclose(ls);