Citadel/UX v5.50 showstoppers list
----------------------------------
* Figure out a way to auto-launch expire functions (and other functions)
+
+Other things that might be nice to take care of:
+------------------------------------------------
* Fix the way netproc handles incoming file transfers. (marked)
-* Don't delete a user who is currently logged in. (marked)
* Don't try to delete a msglist that doesn't exist. (marked)
Aide> may not be deleted.
.<A>ide <R>oom <I>nvite Invites a user to the room if it is private.
.<A>ide <R>oom <K>ickOut Kicks a user out of the room if it is private.
+ .<A>ide <S>ystem config Edits global system configuration.
.<A>ide <U>serEdit Edits certain parameters of a user's account.
.<A>ide <V>alidate newusers Lists users who have recently registered and
prompts for new access levels.
struct quickroom qrbuf;
char lowercase_name[32];
int a;
+ struct CitContext *ccptr;
+ int user_is_logged_in = 0;
for (a=0; a<=strlen(pname); ++a) {
lowercase_name[a] = tolower(pname[a]);
return(ERROR+NO_SUCH_USER);
}
- lprintf(5, "Deleting user <%s>\n", pname);
+ /* Don't delete a user who is currently logged in. Instead, just
+ * set the access level to 0, and let the account get swept up
+ * during the next purge.
+ */
+ user_is_logged_in = 0;
+ begin_critical_section(S_SESSION_TABLE);
+ for (ccptr=ContextList; ccptr!=NULL; ccptr=ccptr->next) {
+ if (ccptr->usersupp.usernum == usbuf.usernum) {
+ user_is_logged_in = 1;
+ }
+ }
+ end_critical_section(S_SESSION_TABLE);
+ if (user_is_logged_in == 1) {
+ lprintf(5, "User <%s> is logged in; not deleting.\n", pname);
+ usbuf.axlevel = 0;
+ putuser(&usbuf, pname);
+ return(1);
+ }
- /* FIX Don't delete a user who is currently logged in. */
+ lprintf(5, "Deleting user <%s>\n", pname);
/* Perform any purge functions registered by server extensions */
PerformUserHooks(usbuf.fullname, usbuf.usernum, EVT_PURGEUSER);