X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=textclient%2Froutines.c;h=ab9254eb4f58ddf3321f949b6a2814e3f1d6865c;hb=HEAD;hp=6ef2978663fb1d67b999288d791fcddf4f5063ee;hpb=7408ecea5cc097c76ed667097020e1d9a1228b0d;p=citadel.git diff --git a/textclient/routines.c b/textclient/routines.c index 6ef297866..ab9254eb4 100644 --- a/textclient/routines.c +++ b/textclient/routines.c @@ -2,13 +2,7 @@ // // Copyright (c) 1987-2016 by the citadel.org team // -// This program is open source software. Use, duplication, and/or -// disclosure are subject to the GNU General Purpose License version 3. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// This program is open source software. Use, duplication, or disclosure is subject to the GNU General Public License version 3. #include "textclient.h" @@ -81,7 +75,7 @@ void edit_user_internet_email_addresses(CtdlIPC * ipc, char *who) { switch (ch) { case 'a': newprompt("Enter new email address: ", buf, 50); - striplt(buf); + string_trim(buf); if (!IsEmptyStr(buf)) { // FIXME validate the email address (format, our own domain, addr does not belong to another user) ++num_recs; @@ -218,8 +212,6 @@ void edituser(CtdlIPC * ipc, int cmd) { else { user->flags |= US_REGIS; } - user->timescalled = intprompt("Times called", user->timescalled, 0, INT_MAX); - user->posted = intprompt("Messages posted", user->posted, 0, INT_MAX); user->lastcall = boolprompt("Set last login to now", 0) ? time(NULL) : user->lastcall; user->USuserpurge = intprompt("Purge time (in days, 0 for system default", user->USuserpurge, 0, INT_MAX); } @@ -239,8 +231,10 @@ void edituser(CtdlIPC * ipc, int cmd) { } free(user); - if (boolprompt("Edit this user's Internet email addresses", 0)) { - edit_user_internet_email_addresses(ipc, who); + if (cmd == 25) { // user edit + if (boolprompt("Edit this user's Internet email addresses", 0)) { + edit_user_internet_email_addresses(ipc, who); + } } }