if (r / 100 == 1) {
int a = 0;
- while (reg && strlen(reg) > 0) {
+ while (reg && !IsEmptyStr(reg)) {
extract_token(buf, reg, 0, '\n', sizeof buf);
remove_token(reg, 0, '\n');
scr_printf("%s\n", buf);
if (a == 11)
scr_printf("%s\n", buf);
- } while (strlen(resp));
+ } while (!IsEmptyStr(resp));
scr_printf("Current access level: %d (%s)\n", ax, axdefs[ax]);
} else {
scr_printf("%s\n%s\n", user, &cmd[4]);
char buf[256];
newprompt("Filename: ", filename, 31);
- if (strlen(filename) == 0)
+ if (IsEmptyStr(filename))
return;
CtdlIPCDeleteFile(ipc, filename, buf);
err_printf("%s\n", buf);
char filename[32], destsys[20], buf[256];
newprompt("Filename: ", filename, 31);
- if (strlen(filename) == 0)
+ if (IsEmptyStr(filename))
return;
newprompt("System to send to: ", destsys, 19);
CtdlIPCNetSendFile(ipc, filename, destsys, buf);
char buf[256];
newprompt("Filename: ", filename, 63);
- if (strlen(filename) == 0)
+ if (IsEmptyStr(filename))
return;
newprompt("Enter target room: ", newroom, ROOMNAMELEN - 1);
CtdlIPCMoveFile(ipc, filename, newroom, buf);
pprintf("%s\n", buf);
return;
}
- while (strlen(resp)) {
+ while (!IsEmptyStr(resp)) {
extract_token(buf, resp, 0, '\n', sizeof buf);
remove_token(resp, 0, '\n');
pprintf("%s\n", buf);
"Allow Aides to Zap (forget) rooms",
atoi(&sc[26][0]))));
- if (strlen(&sc[18][0]) > 0) logpages = 1;
+ if (!IsEmptyStr(&sc[18][0])) logpages = 1;
else logpages = 0;
logpages = boolprompt("Log all pages", logpages);
if (logpages) {
r = CtdlIPCGetSystemConfigByType(ipc, INTERNETCFG, &resp, buf);
if (r / 100 == 1) {
- while (strlen(resp)) {
+ while (!IsEmptyStr(resp)) {
extract_token(buf, resp, 0, '\n', sizeof buf);
remove_token(resp, 0, '\n');
++num_recs;
newprompt("Enter host name: ",
buf, 50);
striplt(buf);
- if (strlen(buf) > 0) {
+ if (!IsEmptyStr(buf)) {
++num_recs;
if (num_recs == 1)
recs = malloc(sizeof(char *));
char *listing = NULL;
int r;
- if (strlen(editor_paths[0]) == 0) {
+ if (IsEmptyStr(editor_paths[0])) {
scr_printf("You must have an external editor configured in"
" order to use this function.\n");
return;
r = CtdlIPCGetRoomNetworkConfig(ipc, &listing, buf);
if (r / 100 == 1) {
- while(listing && strlen(listing)) {
+ while(listing && !IsEmptyStr(listing)) {
extract_token(buf, listing, 0, '\n', sizeof buf);
remove_token(listing, 0, '\n');
extract_token(instr, buf, 0, '|', sizeof instr);
/* Load all netconfig entries that are *not* of the type we are editing */
r = CtdlIPCGetRoomNetworkConfig(ipc, &listing, buf);
if (r / 100 == 1) {
- while(listing && strlen(listing)) {
+ while(listing && !IsEmptyStr(listing)) {
extract_token(buf, listing, 0, '\n', sizeof buf);
remove_token(listing, 0, '\n');
extract_token(instr, buf, 0, '|', sizeof instr);
if (buf[i] == '#') buf[i] = 0;
}
striplt(buf);
- if (strlen(buf) > 0) {
+ if (!IsEmptyStr(buf)) {
fprintf(changefp, "%s|%s\n", entrytype, buf);
}
}
int r;
r = CtdlIPCGetSystemConfigByType(ipc, IGNETCFG, &listing, buf);
- if (r / 100 == 1) while (*listing && strlen(listing)) {
+ if (r / 100 == 1) while (*listing && !IsEmptyStr(listing)) {
extract_token(buf, listing, 0, '\n', sizeof buf);
remove_token(listing, 0, '\n');
int r;
r = CtdlIPCGetSystemConfigByType(ipc, FILTERLIST, &listing, buf);
- if (r / 100 == 1) while (*listing && strlen(listing)) {
+ if (r / 100 == 1) while (*listing && !IsEmptyStr(listing)) {
extract_token(buf, listing, 0, '\n', sizeof buf);
remove_token(listing, 0, '\n');