*/
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);
/* Run any startup routines registered by loadable modules */
PerformSessionHooks(EVT_LOGIN);
}
close(pipev[0]);
- execl(BBSDIR "/chkpwd", BBSDIR "/chkpwd", NULL);
- perror(BBSDIR "/chkpwd");
+ execl(CTDLDIR "/chkpwd", CTDLDIR "/chkpwd", NULL);
+ perror(CTDLDIR "/chkpwd");
exit(1);
}
#ifdef ENABLE_AUTOLOGIN
- /* A uid of BBSUID or -1 indicates that this user exists only in
+ /* A uid of CTDLUID or -1 indicates that this user exists only in
* Citadel, not in the underlying operating system.
*/
- if ( (CC->user.uid == BBSUID) || (CC->user.uid == (-1)) ) {
+ if ( (CC->user.uid == CTDLUID) || (CC->user.uid == (-1)) ) {
strproc(password);
strproc(CC->user.password);
code = strcasecmp(CC->user.password, password);
cdb_delete(CDB_USERS, usernamekey, strlen(usernamekey));
/* remove the user's bio file */
- snprintf(filename, sizeof filename, "./bio/%ld", usbuf.usernum);
+ snprintf(filename, sizeof filename,
+#ifndef HAVE_DATA_DIR
+ "."
+#else
+ DATA_DIR
+#endif
+ "/bio/%ld", usbuf.usernum);
unlink(filename);
/* remove the user's picture */
- snprintf(filename, sizeof filename, "./userpics/%ld.gif", usbuf.usernum);
+ snprintf(filename, sizeof filename,
+#ifndef HAVE_DATA_DIR
+ "."
+#else
+ DATA_DIR
+#endif
+ "/userpics/%ld.gif", usbuf.usernum);
unlink(filename);
return (0);
if (CtdlAccessCheck(ac_logged_in)) {
return;
}
- if ( (CC->user.uid != BBSUID) && (CC->user.uid != (-1)) ) {
+ if ( (CC->user.uid != CTDLUID) && (CC->user.uid != (-1)) ) {
cprintf("%d Not allowed. Use the 'passwd' command.\n", ERROR + NOT_HERE);
return;
}
target_msgnum = extract_long(argbuf, 0);
target_setting = extract_int(argbuf, 1);
- CtdlSetSeen(target_msgnum, target_setting, ctdlsetseen_seen);
+ CtdlSetSeen(&target_msgnum, 1, target_setting,
+ ctdlsetseen_seen, NULL, NULL);
cprintf("%d OK\n", CIT_OK);
}
*/
void ListThisUser(struct ctdluser *usbuf, void *data)
{
+ char *searchstring;
+
+ searchstring = (char *)data;
+ if (bmstrcasestr(usbuf->fullname, searchstring) == NULL) {
+ return;
+ }
+
if (usbuf->axlevel > 0) {
if ((CC->user.axlevel >= 6)
|| ((usbuf->flags & US_UNLISTED) == 0)
}
/*
- * List users
+ * List users (searchstring may be empty to list all users)
*/
-void cmd_list(void)
+void cmd_list(char *cmdbuf)
{
+ char searchstring[256];
+ extract_token(searchstring, cmdbuf, 0, '|', sizeof searchstring);
+ striplt(searchstring);
cprintf("%d \n", LISTING_FOLLOWS);
- ForEachUser(ListThisUser, NULL);
+ ForEachUser(ListThisUser, (void *)searchstring );
cprintf("000\n");
}