/* Create any personal rooms required by the system.
* (Technically, MAILROOM should be there already, but just in case...)
*/
- create_room(MAILROOM, 4, "", 0, 1, 0, VIEW_MAILBOX);
- create_room(SENTITEMS, 4, "", 0, 1, 0, VIEW_MAILBOX);
- create_room(USERTRASHROOM, 4, "", 0, 1, 0, VIEW_MAILBOX);
- /* create_room(USERDRAFTROOM, 4, "", 0, 1, 0, VIEW_MAILBOX); temporarily disabled for 7.60 */
+ CtdlCreateRoom(MAILROOM, 4, "", 0, 1, 0, VIEW_MAILBOX);
+ CtdlCreateRoom(SENTITEMS, 4, "", 0, 1, 0, VIEW_MAILBOX);
+ CtdlCreateRoom(USERTRASHROOM, 4, "", 0, 1, 0, VIEW_MAILBOX);
+ /* CtdlCreateRoom(USERDRAFTROOM, 4, "", 0, 1, 0, VIEW_MAILBOX); temporarily disabled for 7.60 */
/* Run any startup routines registered by loadable modules */
PerformSessionHooks(EVT_LOGIN);
/* Enter the lobby */
- usergoto(config.c_baseroom, 0, 0, NULL, NULL);
+ CtdlUserGoto(config.c_baseroom, 0, 0, NULL, NULL);
}
static int validpw(uid_t uid, const char *pass)
{
char buf[256];
+ int rv = 0;
if (IsEmptyStr(pass)) {
CtdlLogPrintf(CTDL_DEBUG, "refusing to check empty password for uid=%d using chkpwd...\n", uid);
CtdlLogPrintf(CTDL_DEBUG, "Validating password for uid=%d using chkpwd...\n", uid);
begin_critical_section(S_CHKPWD);
- write(chkpwd_write_pipe[1], &uid, sizeof(uid_t));
- write(chkpwd_write_pipe[1], pass, 256);
- read(chkpwd_read_pipe[0], buf, 4);
+ rv = write(chkpwd_write_pipe[1], &uid, sizeof(uid_t));
+ rv = write(chkpwd_write_pipe[1], pass, 256);
+ rv = read(chkpwd_read_pipe[0], buf, 4);
end_critical_section(S_CHKPWD);
if (!strncmp(buf, "PASS", 4)) {
char password[256];
int a;
+ memset(password, 0, sizeof(password));
extract_token(password, buf, 0, '|', sizeof password);
a = CtdlTryPassword(password);
* Make the latter an invisible system room.
*/
MailboxName(mailboxname, sizeof mailboxname, &usbuf, MAILROOM);
- create_room(mailboxname, 5, "", 0, 1, 1, VIEW_MAILBOX);
+ CtdlCreateRoom(mailboxname, 5, "", 0, 1, 1, VIEW_MAILBOX);
MailboxName(mailboxname, sizeof mailboxname, &usbuf, USERCONFIGROOM);
- create_room(mailboxname, 5, "", 0, 1, 1, VIEW_BBS);
- if (lgetroom(&qrbuf, mailboxname) == 0) {
+ CtdlCreateRoom(mailboxname, 5, "", 0, 1, 1, VIEW_BBS);
+ if (CtdlGetRoomLock(&qrbuf, mailboxname) == 0) {
qrbuf.QRflags2 |= QR2_SYSTEM;
- lputroom(&qrbuf);
+ CtdlPutRoomLock(&qrbuf);
}
/* Perform any create functions registered by server extensions */
CC->cs_host,
CC->cs_addr
);
- aide_message(buf, "User Creation Notice");
+ CtdlAideMessage(buf, "User Creation Notice");
CtdlLogPrintf(CTDL_NOTICE, "New user <%s> created\n", username);
return (0);
}
((op == 1) ? "invited to" : "kicked out of"),
CC->room.QRname,
CC->user.fullname);
- aide_message(bbb,"User Admin Message");
+ CtdlAideMessage(bbb,"User Admin Message");
return(0);
}
lputuser(&CC->user);
/* Return to the Lobby, so we don't end up in an undefined room */
- usergoto(config.c_baseroom, 0, 0, NULL, NULL);
+ CtdlUserGoto(config.c_baseroom, 0, 0, NULL, NULL);
return(0);
}
snprintf(notify, SIZ,
"User \"%s\" has been deleted by %s.\n",
usbuf.fullname, CC->user.fullname);
- aide_message(notify, "User Deletion Message");
+ CtdlAideMessage(notify, "User Deletion Message");
}
cprintf("%d Ok", CIT_OK);
int num_msgs = 0;
MailboxName(mailboxname, sizeof mailboxname, &CC->user, MAILROOM);
- if (getroom(&mailbox, mailboxname) != 0)
+ if (CtdlGetRoom(&mailbox, mailboxname) != 0)
return (0);
CtdlGetRelationship(&vbuf, &CC->user, &mailbox);