#include "support.h"
#include "config.h"
#include "control.h"
-#include "dynloader.h"
+#include "serv_extensions.h"
#include "room_ops.h"
#include "user_ops.h"
#include "policy.h"
return;
}
- sprintf(buf,"./bio/%ld",CC->usersupp.usernum);
+ snprintf(buf, sizeof buf, "./bio/%ld",CC->user.usernum);
fp = fopen(buf,"w");
if (fp == NULL) {
cprintf("%d Cannot create file\n",ERROR);
*/
void cmd_rbio(char *cmdbuf)
{
- struct usersupp ruser;
+ struct user ruser;
char buf[SIZ];
FILE *fp;
cprintf("%d No such user.\n",ERROR+NO_SUCH_USER);
return;
}
- sprintf(buf,"./bio/%ld",ruser.usernum);
+ snprintf(buf, sizeof 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);
+ (long)ruser.lastcall, ruser.timescalled, ruser.posted);
fp = fopen(buf,"r");
if (fp == NULL)
cprintf("%s has no bio on file.\n", ruser.fullname);
void cmd_lbio(char *cmdbuf) {
char buf[SIZ];
FILE *ls;
- struct usersupp usbuf;
+ struct user usbuf;
ls=popen("cd ./bio; ls","r");
if (ls==NULL) {
-char *Dynamic_Module_Init(void)
+char *serv_bio_init(void)
{
CtdlRegisterProtoHook(cmd_ebio, "EBIO", "Enter your bio");
CtdlRegisterProtoHook(cmd_rbio, "RBIO", "Read a user's bio");