void cmd_whok(char *cmdbuf) {
struct ctdluser temp;
- struct cdbdata cdbus;
+ struct cdbkeyval cdbus;
int ra;
cprintf("%d Who knows room:\n", LISTING_FOLLOWS);
cdb_rewind(CDB_USERS);
- while (cdbus = cdb_next_item(CDB_USERS), cdbus.ptr!=NULL) {
+ while (cdbus = cdb_next_item(CDB_USERS), cdbus.val.ptr!=NULL) {
memset(&temp, 0, sizeof temp);
- memcpy(&temp, cdbus.ptr, sizeof temp);
-
+ memcpy(&temp, cdbus.val.ptr, sizeof temp);
CtdlRoomAccess(&CC->room, &temp, &ra, NULL);
- if ((!IsEmptyStr(temp.fullname)) &&
- (CC->room.QRflags & QR_INUSE) &&
- (ra & UA_KNOWN)
- )
+ if ((!IsEmptyStr(temp.fullname)) && (CC->room.QRflags & QR_INUSE) && (ra & UA_KNOWN)) {
cprintf("%s\n", temp.fullname);
+ }
}
cprintf("000\n");
}