CC->quickroom.QRdirname, filename);
a = unlink(pathname);
if (a == 0) {
- cprintf("%d File '%s' deleted.\n", OK, pathname);
+ cprintf("%d File '%s' deleted.\n", CIT_OK, pathname);
}
else {
cprintf("%d File '%s' not found.\n",
"cat ./files/%s/filedir |grep %s >>./files/%s/filedir",
CC->quickroom.QRdirname, filename, qrbuf.QRdirname);
system(buf);
- cprintf("%d File '%s' has been moved.\n", OK, filename);
+ cprintf("%d File '%s' has been moved.\n", CIT_OK, filename);
}
}
snprintf(buf, sizeof buf, "sysop@%s", destsys);
e = alias(buf);
- if (e != MES_BINARY) {
+ if (e != MES_IGNET) {
cprintf("%d No such system: '%s'\n",
ERROR + NO_SUCH_SYSTEM, destsys);
return;
putc(0, ofp);
fclose(ofp);
- cprintf("%d File '%s' has been sent to %s.\n", OK, filename,
+ cprintf("%d File '%s' has been sent to %s.\n", CIT_OK, filename,
destsys);
/* FIXME start a network run here. */
return;
modtime = (time_t) statbuf.st_mtime;
cprintf("%d %ld|%ld|%s|%s\n",
- OK, filesize, (long)modtime, filename, mime_type);
+ CIT_OK, filesize, (long)modtime, filename, mime_type);
}
snprintf(pathname, sizeof pathname,
"./images/floor.%d.gif", which_floor);
} else if (!strcasecmp(filename, "_roompic_")) {
- assoc_file_name(pathname, &CC->quickroom, "images");
+ assoc_file_name(pathname, sizeof pathname, &CC->quickroom, "images");
} else {
for (a = 0; a < strlen(filename); ++a) {
filename[a] = tolower(filename[a]);
ERROR, CC->upl_path, strerror(errno));
return;
}
- cprintf("%d Ok\n", OK);
+ cprintf("%d Ok\n", CIT_OK);
}
}
if ((!strcasecmp(basenm, "_roompic_")) && (is_room_aide())) {
- assoc_file_name(CC->upl_path, &CC->quickroom, "images");
+ assoc_file_name(CC->upl_path, sizeof CC->upl_path, &CC->quickroom, "images");
}
if (strlen(CC->upl_path) == 0) {
}
if (is_this_for_real == 0) {
- cprintf("%d Ok to send image\n", OK);
+ cprintf("%d Ok to send image\n", CIT_OK);
return;
}
ERROR, CC->upl_path, strerror(errno));
return;
}
- cprintf("%d Ok\n", OK);
+ cprintf("%d Ok\n", CIT_OK);
CC->upload_type = UPL_IMAGE;
}
unlink(buf);
}
- cprintf("%d Ok\n", OK);
+ cprintf("%d Ok\n", CIT_OK);
}
if ((!strcasecmp(cmd, "1")) && (CC->upload_type != UPL_FILE)) {
CC->upload_type = UPL_FILE;
- cprintf("%d Upload completed.\n", OK);
+ cprintf("%d Upload completed.\n", CIT_OK);
/* FIXME ... here we need to trigger a network run */
}
if (!strcasecmp(cmd, "1")) {
- cprintf("%d File '%s' saved.\n", OK, CC->upl_path);
+ cprintf("%d File '%s' saved.\n", CIT_OK, CC->upl_path);
fp = fopen(CC->upl_filedir, "a");
if (fp == NULL) {
fp = fopen(CC->upl_filedir, "w");
}
/* put together an upload notice */
- sprintf(upload_notice,
+ snprintf(upload_notice, sizeof upload_notice,
"NEW UPLOAD: '%s'\n %s\n",
CC->upl_file, CC->upl_comment);
quickie_message(CC->curr_user, NULL, CC->quickroom.QRname,
- upload_notice);
+ upload_notice, 0, NULL);
} else {
abort_upl(CC);
- cprintf("%d File '%s' aborted.\n", OK, CC->upl_path);
+ cprintf("%d File '%s' aborted.\n", CIT_OK, CC->upl_path);
}
}
CC->dl_is_net = 1;
stat(pathname, &statbuf);
- cprintf("%d %ld\n", OK, statbuf.st_size);
+ cprintf("%d %ld\n", CIT_OK, (long)statbuf.st_size);
}
/*
}
CC->upload_type = UPL_NET;
- cprintf("%d Ok\n", OK);
+ cprintf("%d Ok\n", CIT_OK);
}