/*
- * $Id$
- *
* Main source module for the client program.
*
* Copyright (c) 1987-2009 by the citadel.org team
rv = system(rc_gotmail_cmd);
}
}
- status_line(ipc->ServInfo.humannode, ipc->ServInfo.site_location,
- room_name, secure, newmailcount);
free(room);
}
if (have_xterm) { /* dynamically size screen if on an xterm */
if (ioctl(0, TIOCGWINSZ, &xwinsz) == 0) {
if (xwinsz.height)
- screenheight = is_curses_enabled() ? (int)xwinsz.height - 1 : (int) xwinsz.height;
+ screenheight = (int) xwinsz.height;
if (xwinsz.width)
screenwidth = (int) xwinsz.width;
}
}
static void statusHook(char *s) {
- sln_printf(s);
- sln_flush();
+ scr_printf(s);
+ scr_flush();
}
/*
eCrash_Init(¶ms);
#endif
setIPCDeathHook(screen_delete);
- setIPCErrorPrintf(err_printf);
+ setIPCErrorPrintf(scr_printf);
setCryptoStatusHook(statusHook);
/* Permissions sanity check - don't run citadel setuid/setgid */
if (getuid() != geteuid()) {
- err_printf("Please do not run citadel setuid!\n");
+ scr_printf("Please do not run citadel setuid!\n");
logoff(NULL, 3);
} else if (getgid() != getegid()) {
- err_printf("Please do not run citadel setgid!\n");
+ scr_printf("Please do not run citadel setgid!\n");
logoff(NULL, 3);
}
newprompt("Connect to (return for local server): ", hostbuf, 64);
#endif
- sln_printf("Attaching to server... \r");
- sln_flush();
+ scr_printf("Attaching to server...\n");
ipc = CtdlIPC_new(argc, argv, hostbuf, portbuf);
if (!ipc) {
screen_delete();
}
if (!(ipc->isLocal)) {
- sln_printf("Connected to %s [%s].\n", ipc->ip_hostname, ipc->ip_address);
+ scr_printf("Connected to %s [%s].\n", ipc->ip_hostname, ipc->ip_address);
}
#if defined(HAVE_CURSES_H) && !defined(DISABLE_CURSES)
ipc->ServInfo.site_location);
scr_flush();
- status_line(ipc->ServInfo.humannode, ipc->ServInfo.site_location, NULL,
- secure, -1);
-
screenwidth = 80; /* default screen dimensions */
screenheight = 24;
mcmd = 29;
goto TERMN8;
}
+
+ /* FIXME this is a stupid way to do guest mode but it's a reasonable test harness FIXME */
+ if ( (ipc->ServInfo.guest_logins) && (!strcasecmp(fullname, "guest")) ) {
+ goto PWOK;
+ }
+
/* sign on to the server */
r = CtdlIPCTryLogin(ipc, fullname, aaa);
if (r / 100 != 3)
chatmode(ipc);
break;
- case 2:
- if (ipc->isLocal) {
- screen_reset();
- stty_ctdl(SB_RESTORE);
- snprintf(aaa, sizeof aaa, "USERNAME=\042%s\042; export USERNAME;"
- "exec ./subsystem %ld %d %d", fullname,
- usernum, screenwidth, axlevel);
- ka_system(aaa);
- stty_ctdl(SB_NO_INTR);
- screen_set();
- } else {
- scr_printf("*** Can't run doors when server is not local.\n");
- }
- break;
-
case 17:
who_is_online(ipc, 0);
break;
remove_march(marchptr->march_name, 0);
}
if (mcmd == 30) {
- sln_printf("\n\nType 'off' to disconnect, or next user...\n");
+ scr_printf("\n\nType 'off' to disconnect, or next user...\n");
}
CtdlIPCLogout(ipc);
if ((mcmd == 29) || (mcmd == 15)) {