From 5d959c5ba476eb0b103fe5953cca69939a6d836a Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 18 Nov 2012 21:54:47 +0000 Subject: Log dedicated server console messages to server.log, print version number and command line to console on startup. --- src/dedicated/console.h | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'src/dedicated/console.h') diff --git a/src/dedicated/console.h b/src/dedicated/console.h index b0bafdb..2b00c05 100644 --- a/src/dedicated/console.h +++ b/src/dedicated/console.h @@ -18,6 +18,9 @@ public: Console(); ~Console(); + /// dump console content to cout + void open_log(); + /// initialize the server console static void init(); /// shutdown the server console @@ -40,11 +43,10 @@ protected: void draw_text(); /// draw the console input (ncurses) void draw_input(); - /// dump console content to cout - void dump(); - /// print one line of text (do nothing) +#endif + /// print one line of text virtual void print(const std::string & text); - +#ifdef HAVE_CURSES private: typedef std::deque History; @@ -52,15 +54,16 @@ private: void set_color(const char *color_code); // input history - History history; - History::reverse_iterator history_pos; + History history; + History::reverse_iterator history_pos; - size_t input_pos; - size_t console_scroll; + size_t input_pos; + size_t console_scroll; - int console_width; - int console_height; + int console_width; + int console_height; #endif + std::string console_logfilename; }; Console *console(); -- cgit v1.2.3