#include "config.h"
#include "citserver.h"
#include "user_ops.h"
+#include "room_ops.h"
long control_highest_user = 0;
// 2 = show inconsistencies but don't repair them, continue execution
void control_find_highest(struct ctdlroom *qrbuf, void *data) {
struct cfh *cfh = (struct cfh *)data;
- struct cdbdata *cdbfr;
long *msglist;
int num_msgs=0;
int c;
}
// Load the message list
- cdbfr = cdb_fetch(CDB_MSGLISTS, &qrbuf->QRnumber, sizeof(long));
- if (cdbfr != NULL) {
- msglist = (long *) cdbfr->ptr;
- num_msgs = cdbfr->len / sizeof(long);
- }
- else {
- return; // No messages at all? No further action.
+ num_msgs = CtdlFetchMsgList(qrbuf->QRnumber, &msglist);
+ if (num_msgs < 0) {
+ return; // No msglists record? No further action.
}
if (num_msgs > 0) {
}
}
- cdb_free(cdbfr);
+ free(msglist);
}