diff options
author | Stijn Buys <ingar@osirion.org> | 2012-11-18 21:54:47 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2012-11-18 21:54:47 +0000 |
commit | 5d959c5ba476eb0b103fe5953cca69939a6d836a (patch) | |
tree | 81015c1b3b62c0de1dcdeb9c2eda2ac67b7a74ea /src/dedicated/console.h | |
parent | 0b54403c6ac20f2cdd1454e90e9006379f374ec0 (diff) |
Log dedicated server console messages to server.log,
print version number and command line to console on startup.
Diffstat (limited to 'src/dedicated/console.h')
-rw-r--r-- | src/dedicated/console.h | 23 |
1 files changed, 13 insertions, 10 deletions
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<std::string> 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(); |