pprintf(" User Name Num L LastCall Calls Posts\n");
pprintf("------------------------- ----- - ---------- ----- -----\n");
- if (listing != NULL) while (strlen(listing) > 0) {
+ if (listing != NULL) while (!IsEmptyStr(listing)) {
extract_token(buf, listing, 0, '\n', sizeof buf);
remove_token(listing, 0, '\n');
}
}
- if (strlen(bbb) == 0) {
+ if (IsEmptyStr(bbb)) {
scr_printf("No room '%s'.\n", towhere);
return;
}
newmailcount);
}
color(DIM_WHITE);
- if (strlen(rc_gotmail_cmd) > 0) {
+ if (!IsEmptyStr(rc_gotmail_cmd)) {
system(rc_gotmail_cmd);
}
}
mptr = tmp;
}
}
- if (strlen(targ) > 0) {
+ if (!IsEmptyStr(targ)) {
gf_toroom(ipc, targ, mode);
return;
}
mptr = tmp;
}
}
- if (strlen(targ) > 0) {
+ if (!IsEmptyStr(targ)) {
gf_toroom(ipc, targ, mode);
} else {
scr_printf("There are no rooms on '%s'.\n", &floorlist[tofloor][0]);
scr_printf("Enable color support: "); color(BRIGHT_CYAN); scr_printf("%s\n", (user->flags & US_COLOR)? "Yes" : "No"); color(DIM_WHITE);
}
scr_printf("Be unlisted in userlog: "); color(BRIGHT_CYAN); scr_printf("%s\n", (user->flags & US_UNLISTED)? "Yes" : "No"); color(DIM_WHITE);
- if (strlen(editor_paths[0]) > 0) {
+ if (!IsEmptyStr(editor_paths[0])) {
scr_printf("Always enter messages with the full-screen editor: "); color(BRIGHT_CYAN); scr_printf("%s\n", (user->flags & US_EXTEDIT)? "Yes" : "No"); color(DIM_WHITE);
}
free(user);
char pass2[20];
char buf[SIZ];
- if (strlen(rc_password) > 0) {
+ if (!IsEmptyStr(rc_password)) {
strcpy(pass1, rc_password);
strcpy(pass2, rc_password);
} else {
r = CtdlIPCOnlineUsers(ipc, &listing, &timenow, buf);
listing = SortOnlineUsers(listing);
if (r / 100 == 1) {
- while (strlen(listing) > 0) {
+ while (!IsEmptyStr(listing)) {
int isidle = 0;
/* Get another line */
(long) idlemins,
(long) idlesecs);
- if ( (strlen(actual_user)+strlen(actual_room)+strlen(actual_host)) > 0) {
+ if ( (!IsEmptyStr(actual_user)&&
+ !IsEmptyStr(actual_room)&&
+ !IsEmptyStr(actual_host))) {
pprintf("(really ");
- if (strlen(actual_user)>0) pprintf("<%s> ", actual_user);
- if (strlen(actual_room)>0) pprintf("in <%s> ", actual_room);
- if (strlen(actual_host)>0) pprintf("from <%s> ", actual_host);
+ if (!IsEmptyStr(actual_user)) pprintf("<%s> ", actual_user);
+ if (!IsEmptyStr(actual_room)) pprintf("in <%s> ", actual_room);
+ if (!IsEmptyStr(actual_host)) pprintf("from <%s> ", actual_host);
pprintf(")\n");
}
pprintf("\n");
GSTA: /* See if we have a username and password on disk */
if (rc_remember_passwords) {
get_stored_password(hostbuf, portbuf, fullname, password);
- if (strlen(fullname) > 0) {
+ if (!IsEmptyStr(fullname)) {
r = CtdlIPCTryLogin(ipc, fullname, aaa);
if (r / 100 == 3) {
if (*nonce) {
termn8 = 0;
newnow = 0;
do {
- if (strlen(rc_username) > 0) {
+ if (!IsEmptyStr(rc_username)) {
strcpy(fullname, rc_username);
} else {
newprompt("Enter your name: ", fullname, 29);
} while (
(!strcasecmp(fullname, "bbs"))
|| (!strcasecmp(fullname, "new"))
- || (strlen(fullname) == 0));
+ || (IsEmptyStr(fullname)));
if (!strcasecmp(fullname, "off")) {
mcmd = 29;
goto NEWUSR;
/* password authentication */
- if (strlen(rc_password) > 0) {
+ if (!IsEmptyStr(rc_password)) {
strcpy(password, rc_password);
} else {
newprompt("\rPlease enter your password: ", password, -19);
goto PWOK;
}
scr_printf("<< wrong password >>\n");
- if (strlen(rc_password) > 0)
+ if (!IsEmptyStr(rc_password))
logoff(ipc, 2);
goto GSTA;
-NEWUSR: if (strlen(rc_password) == 0) {
+NEWUSR: if (IsEmptyStr(rc_password)) {
scr_printf("'%s' not found.\n", fullname);
scr_printf("Type 'off' if you would like to exit.\n");
if (ipc->ServInfo.newuser_disabled == 1) {
if (b > 1)
scr_printf("*** You have %d new private messages in Mail>\n", b);
color(DIM_WHITE);
- if (strlen(rc_gotmail_cmd) > 0) {
+ if (!IsEmptyStr(rc_gotmail_cmd)) {
system(rc_gotmail_cmd);
}
}
dotgoto(ipc, "_MAIL_", 1, 0);
break;
case 20:
- if (strlen(argbuf) > 0) {
+ if (!IsEmptyStr(argbuf)) {
updatels(ipc);
dotgoto(ipc, argbuf, 0, 0);
}
break;
case 52:
- if (strlen(argbuf) > 0) {
+ if (!IsEmptyStr(argbuf)) {
if (rc_alt_semantics) {
updatelsa(ipc);
}