#include "htab.h"
#include "help.h"
-#ifdef COMPILE_CONSOLE
-#undef INFO_SLAVE
-#endif
-
#ifndef WIN32
#include "wait.h"
#ifdef INFO_SLAVE
#include "strtree.h"
#include "log.h"
#include "mypcre.h"
-#ifndef COMPILE_CONSOLE
#ifdef HAS_OPENSSL
#include "myssl.h"
#endif
-#endif
#include "mymalloc.h"
#include "extmail.h"
#include "attrib.h"
/* Default Connection flags for certain clients
*/
-#ifndef COMPILE_CONSOLE
static CLIENT_DEFAULTS client_maps[] = {
{"TINYFUGUE", CONN_PROMPT},
{NULL, -1}
};
-#endif /* COMPILE_CONSOLE */
/** Is this descriptor connected to a telnet-compatible terminal? */
*/
/* Telnet codes */
-#ifndef COMPILE_CONSOLE
#define IAC 255 /**< interpret as command: */
#define GOAHEAD 249 /**< Go Ahead command */
#define NOP 241 /**< no operation */
static void test_telnet(DESC *d);
static void setup_telnet(DESC *d);
static int handle_telnet(DESC *d, unsigned char **q, unsigned char *qend);
-#endif /* COMPILE_CONSOLE */
static const char *empabb(dbref);
static int do_su_exit(DESC *d);
static const char *register_success =
"Registration successful! You will receive your password by email.";
static const char *shutdown_message = "Going down - Bye";
-#ifndef COMPILE_CONSOLE
#ifdef HAS_OPENSSL
static const char *ssl_shutdown_message =
"GAME: SSL connections must be dropped, sorry.";
#endif
-#endif
/** Where we save the descriptor info across reboots. */
#define REBOOTFILE "reboot.db"
DESC *descriptor_list = NULL; /**< The linked list of descriptors */
intmap *descs_by_fd = NULL; /**< Map of ports to DESC* objects */
-#ifndef COMPILE_CONSOLE
-static int sock;
+static bool console_mode = 0;
+static int sock = 0;
#ifdef HAS_OPENSSL
static int sslsock = 0;
SSL *ssl_master_socket = NULL; /**< Master SSL socket for ssl port */
#ifdef WIN32
static WSADATA wsadata;
#endif
-#endif /* COMPILE_CONSOLE */
int maxd = 0;
int restarting = 0; /**< Are we restarting the server after a reboot? */
static int ndescriptors = 0;
static struct timeval *msec_add(struct timeval *t, int x);
static void update_quotas(struct timeval *last, struct timeval *current);
-#ifdef COMPILE_CONSOLE
-static void shovechars(void);
-#else /* COMPILE_CONSOLE */
static int how_many_fds(void);
static void shovechars(Port_t port, Port_t sslport);
static int test_connection(int newsock);
static DESC *new_connection(int oldsock, int *result, bool use_ssl);
-#endif /* COMPILE_CONSOLE */
static void clearstrings(DESC *d);
static int fcache_read(FBLOCK *cp, const char *filename);
static void logout_sock(DESC *d);
static void shutdownsock(DESC *d);
-DESC *initializesock(int s, char *addr, char *ip, int use_ssl);
+DESC *initializesock(int s, int os, char *addr, char *ip, int use_ssl);
int process_output(DESC *d);
/* Notify.c */
extern void free_text_block(struct text_block *t);
* The real "main" is in win32/services.c
*/
-/* TODO: Re-implement's Ari's COMPILE_CONSOLE defines.. */
-
int
mainthread(int argc, char **argv)
#else
FILE *id;
#endif
FILE *newerr;
-#ifdef COMPILE_CONSOLE
- bool detach_session = 0;
-#else
bool detach_session = 1;
-#endif
struct module_entry_t *m;
void (*handle)();
if (argv[n][0] == '-') {
if (strcmp(argv[n], "--no-session") == 0)
detach_session = 0;
- else if (strncmp(argv[n], "--pid-file", 10) == 0) {
+ else if (strcmp(argv[n], "--console") == 0) {
+ console_mode = 1;
+ detach_session = 0;
+ } else if (strncmp(argv[n], "--pid-file", 10) == 0) {
char *eq;
if ((eq = strchr(argv[n], '=')))
pidfile = eq + 1;
}
}
-#ifndef COMPILE_CONSOLE
#ifdef HAVE_FORK
/* Fork off and detach from controlling terminal. */
if (detach_session) {
}
}
#endif
-#endif
#ifdef HAVE_GETPID
if (pidfile) {
#endif
load_reboot_db();
-#ifdef COMPILE_CONSOLE
- shovechars();
-#else
shovechars((Port_t) TINYPORT, (Port_t) SSLPORT);
-#endif
#if defined(CSRI_DEBUG) && defined(CSRI)
mal_verify(1);
#endif
do_rawlog(LT_ERR, T("MUSH shutdown completed."));
-#ifndef COMPILE_CONSOLE
closesocket(sock);
-#endif
#ifdef WIN32
#ifdef WIN32SERVICES
shutdown_checkpoint();
extern slab *text_block_slab;
-#ifndef COMPILE_CONSOLE
static void
setup_desc(int sock, bool use_ssl)
{
maxd = newd->descriptor + 1;
}
}
-#endif
static void
-#ifdef COMPILE_CONSOLE
-shovechars()
-#else
-shovechars(Port_t port, Port_t sslport __attribute__ ((__unused__)))
-#endif
+shovechars(Port_t port __attribute__ ((__unused__)),
+ Port_t sslport __attribute__ ((__unused__)))
{
/* this is the main game loop */
int found;
int queue_timeout;
DESC *d, *dnext;
-#ifndef COMPILE_CONSOLE
#ifdef INFO_SLAVE
union sockaddr_u addr;
socklen_t addr_len;
int newsock;
#endif
int avail_descriptors;
-#endif /* COMPILE_CONSOLE */
unsigned long input_ready, output_ready;
int notify_fd = -1;
+ int infd, outfd;
-#ifdef COMPILE_CONSOLE
- d = initializesock(0, "localhost", "127.0.0.1", 0);
-#else
- if (!restarting) {
+ if (console_mode) {
+ infd = dup(STDIN_FILENO);
+ outfd = dup(STDOUT_FILENO);
+ if (infd >= maxd)
+ maxd = infd + 1;
+ if (outfd >= maxd)
+ maxd = outfd + 1;
+
+ d = initializesock(infd, outfd, "localhost", "127.0.0.1", 0);
+
+ sock = 0;
+#ifdef HAS_OPENSSL
+ sslsock = 0;
+#endif
+ } else if (!restarting) {
sock = make_socket(port, SOCK_STREAM, NULL, NULL, MUSH_IP_ADDR);
if (sock >= maxd)
maxd = sock + 1;
}
#endif
}
-#endif /* COMPILE_CONSOLE */
our_gettimeofday(&last_slice);
-#ifndef COMPILE_CONSOLE
avail_descriptors = how_many_fds() - 4;
#ifdef INFO_SLAVE
avail_descriptors -= 2; /* reserve some more for setting up the slave */
/* done. print message to the log */
do_rawlog(LT_ERR, "%d file descriptors available.", avail_descriptors);
-#endif /* COMPILE_CONSOLE */
do_rawlog(LT_ERR, "RESTART FINISHED.");
notify_fd = file_watch_init();
FD_ZERO(&input_set);
FD_ZERO(&output_set);
-#ifndef COMPILE_CONSOLE
- if (ndescriptors < avail_descriptors)
+ if (sock && ndescriptors < avail_descriptors)
FD_SET(sock, &input_set);
#ifdef HAS_OPENSSL
if (sslsock)
if (info_slave_state == INFO_SLAVE_PENDING)
FD_SET(info_slave, &input_set);
#endif
-#endif /* COMPILE_CONSOLE */
for (d = descriptor_list; d; d = d->next) {
if (d->input.head) {
timeout.tv_sec = slice_timeout.tv_sec;
timeout.tv_usec = slice_timeout.tv_usec;
-#ifdef COMPILE_CONSOLE
- } else {
- if(d->descriptor == 0)
- FD_SET(STDIN_FILENO, &input_set);
- else
- FD_SET(d->descriptor, &input_set);
- }
- if (d->output.head) {
- if(d->descriptor == 0)
- FD_SET(STDOUT_FILENO, &output_set);
- else
- FD_SET(d->descriptor, &output_set);
- }
-#else /* COMPILE_CONSOLE */
} else
FD_SET(d->descriptor, &input_set);
if (d->output.head)
- FD_SET(d->descriptor, &output_set);
-#endif /* COMPILE_CONSOLE */
+ FD_SET(d->outdesc, &output_set);
}
if (notify_fd >= 0)
FD_SET(notify_fd, &input_set);
-#ifndef COMPILE_CONSOLE
found = select(maxd, &input_set, &output_set, (fd_set *) 0, &timeout);
-#else
- found = select(2, &input_set, &output_set, (fd_set *) 0, &timeout);
-#endif
if (found < 0) {
#ifdef WIN32
if (found == SOCKET_ERROR && WSAGetLastError() != WSAEINTR)
do_top(options.active_q_chunk);
}
now = mudtime;
-#ifndef COMPILE_CONSOLE
#ifdef INFO_SLAVE
if (info_slave_state == INFO_SLAVE_PENDING
&& FD_ISSET(info_slave, &input_set)) {
setup_desc(sslsock, true);
#endif
#endif
-#endif /* COMPILE_CONSOLE */
if (notify_fd >= 0 && FD_ISSET(notify_fd, &input_set))
file_watch_event(notify_fd);
for (d = descriptor_list; d; d = dnext) {
dnext = d->next;
-#ifdef COMPILE_CONSOLE
- if (d->descriptor == 0) {
- input_ready = FD_ISSET(STDIN_FILENO, &input_set);
- output_ready = FD_ISSET(STDOUT_FILENO, &output_set);
- } else {
- input_ready = FD_ISSET(d->descriptor, &input_set);
- output_ready = FD_ISSET(d->descriptor, &output_set);
- }
- if (input_ready) {
- if (!process_input(d, output_ready)) {
- shutdownsock(d);
- if(d->descriptor == 0)
- return;
- continue;
- }
- }
- if (output_ready) {
- if (!process_output(d)) {
- shutdownsock(d);
- if (d->descriptor == 0)
- return;
- }
- }
-#else /* COMPILE_CONSOLE */
input_ready = FD_ISSET(d->descriptor, &input_set);
- output_ready = FD_ISSET(d->descriptor, &output_set);
+ output_ready = FD_ISSET(d->outdesc, &output_set);
if (input_ready) {
if (!process_input(d, output_ready)) {
shutdownsock(d);
continue;
}
}
- if (output_ready) {
- if (!process_output(d)) {
+ if (output_ready)
+ if (!process_output(d))
shutdownsock(d);
- }
- }
-#endif /* COMPILE_CONSOLE */
}
}
}
}
-#ifndef COMPILE_CONSOLE
static int
test_connection(int newsock)
{
}
do_rawlog(LT_CONN, T("[%d/%s/%s] Connection opened."), newsock, tbuf1, tbuf2);
set_keepalive(newsock);
- return initializesock(newsock, tbuf1, tbuf2, use_ssl);
+ return initializesock(newsock, newsock, tbuf1, tbuf2, use_ssl);
}
-#endif
static void
clearstrings(DESC *d)
shutdownsock(DESC *d)
{
char tbuf1[BUFFER_LEN];
-#ifdef COMPILE_CONSOLE
- int i;
-#endif
if (d->connected) {
do_rawlog(LT_CONN, T("[%d/%s/%s] Logout by %s(#%d)"),
}
process_output(d);
clearstrings(d);
-#ifdef COMPILE_CONSOLE
- if (d->descriptor != 0) {
- shutdown(d->descriptor, 2);
- closesocket(d->descriptor);
- } else {
- freeqs(d);
- d->input_handler = do_command;
- d->connected = 0;
- d->connected_at = mudtime;
- d->output_prefix = 0;
- d->output_suffix = 0;
- d->output_size = 0;
- d->output.head = 0;
- d->player = 0;
- d->output.tail = &d->output.head;
- d->input.head = 0;
- d->input.tail = &d->input.head;
- d->raw_input = 0;
- d->raw_input_at = 0;
- d->quota = COMMAND_BURST_SIZE;
- d->last_time = mudtime;
- d->idle_total = 0;
- d->unidle_times = 0;
- d->cmds = 0;
- d->hide = 0;
- d->doing[0] = '\0';
- strncpy(d->addr, "localhost", 100);
- d->addr[99] = '\0';
- strncpy(d->ip, "127.0.0.1", 100);
- d->ip[99] = '\0';
- d->conn_flags = CONN_DEFAULT;
- d->input_chars = 0;
- d->output_chars = 0;
- d->ttype = mush_strdup("unknown", "terminal description");
- d->checksum[0] = '\0';
- d->su_exit_path = NULL;
- d->pinfo.object = NOTHING;
- d->pinfo.atr = NULL;
- d->pinfo.lock = 0;
- d->pinfo.function = NULL;
- d->width = 78;
- d->height = 24;
- welcome_user(d);
- for (i = 0; i < MAX_SNOOPS; i++)
- d->snooper[i] = -1;
- }
- if (d->descriptor != 0) {
- if (d->prev)
- d->prev->next = d->next;
- else /* d was the first one! */
- descriptor_list = d->next;
- if (d->next)
- d->next->prev = d->prev;
- }
-
- if(d->descriptor != 0) {
- freeqs(d);
- mush_free(d->ttype, "terminal description");
- mush_free((Malloc_t) d, "descriptor");
- }
-#else /* COMPILE_CONSOLE */
shutdown(d->descriptor, 2);
closesocket(d->descriptor);
if (d->prev)
mush_free(d->ttype, "terminal description");
mush_free((Malloc_t) d, "descriptor");
}
-#endif /* COMPILE_CONSOLE */
ndescriptors--;
}
/* ARGSUSED */
DESC *
-initializesock(int s, char *addr, char *ip, int use_ssl
+initializesock(int s, int os, char *addr, char *ip, int use_ssl
__attribute__ ((__unused__)))
{
DESC *d;
if (!d)
mush_panic("Out of memory.");
d->descriptor = s;
+ d->outdesc = os;
d->input_handler = do_command;
d->connected = 0;
d->connected_at = mudtime;
d->pinfo.atr = NULL;
d->pinfo.lock = 0;
d->pinfo.function = NULL;
-#ifndef COMPILE_CONSOLE
#ifdef HAS_OPENSSL
d->ssl = NULL;
d->ssl_state = 0;
-#endif
#endif
im_insert(descs_by_fd, d->descriptor, d);
if (descriptor_list)
descriptor_list = d;
d->width = 78;
d->height = 24;
-#ifndef COMPILE_CONSOLE
#ifdef HAS_OPENSSL
if (use_ssl && sslsock) {
d->ssl = ssl_listen(d->descriptor, &d->ssl_state);
}
#endif
test_telnet(d);
-#endif /* COMPILE_CONSOLE */
welcome_user(d);
for(n = 0; n < MAX_SNOOPS; n++)
d->snooper[n] = -1;
return d;
}
-
-/* TODO: Build back in COMPILE_CONSOLE define in here */
-
/** Flush pending output for a descriptor.
* This function actually sends the queued output over the descriptor's
* socket.
{
struct text_block **qp, *cur;
int cnt;
-#ifndef COMPILE_CONSOLE
#ifdef HAS_OPENSSL
int input_ready = 0;
#endif
}
}
#endif
-#endif /* COMPILE_CONSOLE */
for (qp = &d->output.head; ((cur = *qp) != NULL);) {
-#ifdef COMPILE_CONSOLE
- if (d->descriptor == 0)
- cnt = write(STDOUT_FILENO, cur->start, cur->nchars);
- else {
-#else /* COMPILE_CONSOLE */
#ifdef HAVE_WRITEV
if (cur->nxt
#ifdef HAVE_SSL
return 1; /* Need to retry */
} else
#endif /* HAS_OPENSSL */
-#endif /* COMPILE_CONSOLE */
{
cnt = send(d->descriptor, cur->start, cur->nchars, 0);
if (cnt < 0) {
add_to_queue(&d->input, command, u_strlen(command) + 1);
}
-#ifndef COMPILE_CONSOLE
static void
test_telnet(DESC *d)
{
}
return 1;
}
-#endif /* COMPILE_CONSOLE */
static void
process_input_helper(DESC *d, char *tbuf1, int got)
} else if (*q == '\b') {
if (p > d->raw_input)
p--;
-#ifndef COMPILE_CONSOLE
} else if ((unsigned char) *q == IAC) { /* Telnet option foo */
if (q >= qend)
break;
if (p < pend && isprint(*q))
*p++ = *q;
}
-#endif /* COMPILE_CONSOLE */
} else if (p < pend && isprint(*q)) {
*p++ = *q;
}
errno = 0;
-#ifndef COMPILE_CONSOLE
#ifdef HAS_OPENSSL
if (d->ssl) {
/* Insure that we're not in a state where we need an SSL_handshake() */
}
} else {
#endif
-#endif /* COMPILE_CONSOLE */
-#ifdef COMPILE_CONSOLE
- if (d->descriptor == 0)
- got = read(STDIN_FILENO, tbuf1, sizeof tbuf1);
- else
- got = recv(d->descriptor, tbuf1, sizeof tbuf1, 0);
-#else /* COMPILE_CONSOLE */
got = recv(d->descriptor, tbuf1, sizeof tbuf1, 0);
-#endif /* COMPILE_CONSOLE */
if (got <= 0) {
/* At this point, select() says there's data waiting to be read from
* the socket, but we shouldn't assume that read() will actually get it
else
return 0;
}
-#ifndef COMPILE_CONSOLE
#ifdef HAS_OPENSSL
}
-#endif
#endif
process_input_helper(d, tbuf1, got);
for (d = descriptor_list; d; d = dnext) {
dnext = d->next;
-#ifdef COMPILE_CONSOLE
- if(d->descriptor == 0) {
- write(STDOUT_FILENO, T(shutdown_message), strlen(T(shutdown_message)));
- write(STDOUT_FILENO, "\r\n", 2);
- } else {
- send(d->descriptor, T(shutdown_message), strlen(T(shutdown_message)), 0);
- send(d->descriptor, "\r\n", 2, 0);
- if (shutdown(d->descriptor, 2) < 0)
- perror("shutdown");
- closesocket(d->descriptor);
- }
-#else /* COMPILE_CONSOLE */
#ifdef HAS_OPENSSL
if (!d->ssl) {
#endif
-#endif
#ifdef HAVE_WRITEV
struct iovec byebye[2];
byebye[0].iov_base = (char *) shutmsg;
byebye[0].iov_len = shutlen;
byebye[1].iov_base = (char *) "\r\n";
byebye[1].iov_len = 2;
- writev(d->descriptor, byebye, 2);
+ writev(d->outdesc, byebye, 2);
#else
- send(d->descriptor, shutmsg, shutlen, 0);
- send(d->descriptor, (char *) "\r\n", 2, 0);
+ send(d->outdesc, shutmsg, shutlen, 0);
+ send(d->outdesc, (char *) "\r\n", 2, 0);
#endif
-#ifndef COMPILE_CONSOLE
#ifdef HAS_OPENSSL
} else {
int offset;
d->ssl_state = 0;
}
#endif
-#endif /* COMPILE_CONSOLE */
if (shutdown(d->descriptor, 2) < 0)
penn_perror("shutdown");
closesocket(d->descriptor);
pid_t pid;
while ((pid = mush_wait(-1, &my_stat, WNOHANG)) > 0) {
-#ifndef COMPILE_CONSOLE
#ifdef INFO_SLAVE
if (info_slave_pid > -1 && pid == info_slave_pid) {
do_rawlog(LT_ERR, T("info_slave on pid %d exited!"), pid);
info_slave_state = INFO_SLAVE_DOWN;
info_slave_pid = -1;
} else
-#endif
#endif
if (forked_dump_pid > -1 && pid == forked_dump_pid) {
dump_error = forked_dump_pid;
time_format_1(now - d->connected_at),
time_format_2(now - d->last_time), csite ? d->cmds : 0,
csite ? d->descriptor : 0,
-#ifdef COMPILE_CONSOLE
- ' ',
-#else /* COMPILE_CONSOLE */
#ifdef HAS_OPENSSL
d->ssl ? 'S' : ' ',
#else
' ',
#endif
-#endif /* COMPILE_CONSOLE */
csite ? d->addr : "---");
tbuf1[78] = '\0';
if (Dark(d->player)) {
time_format_1(now - d->connected_at),
time_format_2(now - d->last_time), csite ? d->cmds : 0,
csite ? d->descriptor : 0,
-#ifdef COMPILE_CONSOLE
- ' ',
-#else /* COMPILE_CONSOLE */
#ifdef HAS_OPENSSL
d->ssl ? 'S' : ' ',
#else
' ',
#endif
-#endif /* COMPILE_CONSOLE */
csite ? d->input_chars : 0, csite ? d->output_chars : 0,
csite ? d->output_size : 0);
"#-1",
time_format_1(now - d->connected_at),
time_format_2(now - d->last_time), d->cmds, d->descriptor,
-#ifdef COMPILE_CONSOLE
- ' ',
-#else /* COMPILE_CONSOLE */
#ifdef HAS_OPENSSL
d->ssl ? 'S' : ' ',
#else
' ',
#endif
-#endif /* COMPILE_CONSOLE */
d->addr);
tbuf1[78] = '\0';
T("Connecting..."), "#-1",
time_format_1(now - d->connected_at),
time_format_2(now - d->last_time), d->cmds, d->descriptor,
-#ifdef COMPILE_CONSOLE
- ' ',
-#else /* COMPILE_CONSOLE */
#ifdef HAS_OPENSSL
d->ssl ? 'S' : ' ',
#else
' ',
#endif
-#endif /* COMPILE_CONSOLE */
d->input_chars, d->output_chars, d->output_size);
}
#ifdef COLOREDWHO
/* Return the status of the ssl flag on the least idle descriptor we
* find that matches the player's dbref.
*/
-#ifdef COMPILE_CONSOLE
- safe_boolean(0, buff, bp);
-#else /* COMPILE_CONSOLE */
#ifdef HAS_OPENSSL
DESC *match;
if (!sslsock) {
#else
safe_boolean(0, buff, bp);
#endif
-#endif /* COMPILE_CONSOLE */
}
FUNCTION(fun_width)
safe_str(" pueblo", buff, bp);
if (match->conn_flags & CONN_TELNET)
safe_str(" telnet", buff, bp);
-#ifndef COMPILE_CONSOLE
#ifdef HAS_OPENSSL
if (sslsock && match->ssl)
safe_str(" ssl", buff, bp);
-#endif
#endif
} else
safe_str(T(e_perm), buff, bp);
back, the client probably doesn't understand them */
if ((d->conn_flags & CONN_TELNET_QUERY) && difftime(now, d->connected_at) > 60)
d->conn_flags &= ~CONN_TELNET_QUERY;
-#ifndef COMPILE_CONSOLE
/* If they've been idle for 60 seconds and are set KEEPALIVE and using
a telnet-aware client, send a NOP */
if (d->conn_flags & CONN_TELNET && idle_for >= 60
queue_newwrite(d, nopmsg, 2);
process_output(d);
}
-#endif
if(d->connected && GoodObject(d->player) && ((a = atr_get(d->player, "IDLE_TIMEOUT"))!=NULL)) {
memset(tbuf, '\0', BUFFER_LEN);
#define fclose(x) f_close(x)
#endif /* SUN_OS */
-#ifdef COMPILE_CONSOLE
-void
-close_ssl_connections(void)
-{
-}
-#else /* COMPILE_CONSOLE */
static int
how_many_fds(void)
{
options.ssl_port = 0;
}
#endif
-#endif /* COMPILE_CONSOLE */
/** Dump the descriptor list to our REBOOTFILE so we can restore it on reboot.
}
/* Write out the reboot db flags here */
fprintf(f, "V%ld\n", flags);
-#ifdef COMPILE_CONSOLE
- putref(f, 0);
-#else /* COMPILE_CONSOLE */
putref(f, sock);
-#endif /* COMPILE_CONSOLE */
putref(f, maxd);
/* First, iterate through all descriptors to get to the end
* we do this so the descriptor_list isn't reversed on reboot
ungetc(c, f);
}
-#ifdef COMPILE_CONSOLE
- val = getref(f);
-#else /* COMPILE_CONSOLE */
sock = getref(f);
-#endif /* COMPILE_CONSOLE */
val = getref(f);
if (val > maxd)
maxd = val;
d->raw_input = NULL;
d->raw_input_at = NULL;
d->quota = options.starting_quota;
-#ifndef COMPILE_CONSOLE
#ifdef HAS_OPENSSL
d->ssl = NULL;
d->ssl_state = 0;
-#endif
#endif
if (d->conn_flags & CONN_CLOSE_READY) {
/* This isn't really an open descriptor, we're just tracking
strcpy(poll_msg, getstring_noalloc(f));
globals.first_start_time = getref(f);
globals.reboot_count = getref(f) + 1;
-#ifndef COMPILE_CONSOLE
#ifdef HAS_OPENSSL
if (SSLPORT) {
sslsock = make_socket(SSLPORT, SOCK_STREAM, NULL, NULL, SSL_IP_ADDR);
if (sslsock >= maxd)
maxd = sslsock + 1;
}
-#endif
#endif
fclose(f);
if ((d->player == player) && (!match || (d->last_time > match->last_time)))
match = d;
/* We're only entering using a password at this moment */
-#ifdef COMPILE_CONSOLE
- queue_newwrite(match, (unsigned char *) T("Password: "), 13);
-#else /* COMPILE_CONSOLE */
queue_newwrite(match, (unsigned char *) tprintf(T("Password: %c%c"),
IAC, GOAHEAD), 13);
-#endif /* COMPILE_CONSOLE */
if(!PromptConnection(match))
queue_newwrite(match, (unsigned char *) "\r\n", 3);
notify(player, T("Your HAVEN flag is set. You cannot receive pages."));
} else {
/* Part 3b. Put guy in password program */
-#ifdef COMPILE_CONSOLE
- queue_newwrite(match, (unsigned char *) T("Password: "), 13);
-#else /* COMPILE_CONSOLE */
queue_newwrite(match, (unsigned char *) tprintf(T("Password: %c%c"),
IAC, GOAHEAD), 13);
-#endif /* COMPILE_CONSOLE */
if(!PromptConnection(match))
queue_newwrite(match, (unsigned char *) "\r\n", 3);
#endif
#endif
dump_reboot_db();
-#if !defined(COMPILE_CONSOLE) && defined(INFO_SLAVE)
+#ifdef INFO_SLAVE
kill_info_slave();
#endif
/* Replacement for local_shutdown */