#include "snprintf.h"
#endif
#include "screen.h"
+#include "citadel_dirs.h"
#include "md5.h"
int r; /* IPC response code */
char *listing = NULL;
- r = CtdlIPCUserListing(ipc, &listing, buf);
+ r = CtdlIPCUserListing(ipc, patn, &listing, buf);
if (r / 100 != 1) {
pprintf("%s\n", buf);
return;
pprintf(" User Name Num L LastCall Calls Posts\n");
pprintf("------------------------- ----- - ---------- ----- -----\n");
- while (strlen(listing) > 0) {
+ if (listing != NULL) while (strlen(listing) > 0) {
extract_token(buf, listing, 0, '\n', sizeof buf);
remove_token(listing, 0, '\n');
* guaranteed to have the uid/gid we want.
*/
if (!getuid() || !getgid()) {
- if (stat(CTDLDIR "/citadel.config", &st) < 0) {
+ if (stat(file_citadel_config, &st) < 0) {
perror("couldn't stat citadel.config");
logoff(NULL, 3);
}
* program. Don't mess with these once they've been set, because we
* will be unlinking them later on in the program and we don't
* want to delete something that we didn't create. */
- snprintf(temp, sizeof temp, tmpnam(NULL));
- snprintf(temp2, sizeof temp2, tmpnam(NULL));
- snprintf(tempdir, sizeof tempdir, tmpnam(NULL));
+ CtdlMakeTempFileName(temp, sizeof temp);
+ CtdlMakeTempFileName(temp2, sizeof temp2);
+ CtdlMakeTempFileName(tempdir, sizeof tempdir);
/* Get screen dimensions. First we go to a default of 80x24. Then
* we try to get the user's actual screen dimensions off the server.
formout(ipc, "help");
break;
case 4:
- entmsg(ipc, 0, 0);
+ entmsg(ipc, 0, ((userflags & US_EXTEDIT) ? 2 : 0));
break;
case 36:
entmsg(ipc, 0, 1);
{
/* Only m.author is used */
struct ctdlipcmessage m;
- newprompt("What do you want your username to be? ", m.author, USERNAME_SIZE - 1);
+ newprompt("What do you want your username to be? ",
+ m.author, USERNAME_SIZE - 1);
+ m.text = "";
r = CtdlIPCPostMessage(ipc, 2, &m, aaa);
if (r / 100 != 2)
scr_printf("%s\n", aaa);