diff options
author | Stijn Buys <ingar@osirion.org> | 2008-08-03 18:15:41 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-08-03 18:15:41 +0000 |
commit | 611e311124523cb8add6960e894d92b5d909d2ad (patch) | |
tree | 122efe9d2c268f197732e53a8834dac99c5b7289 /src/server/console.cc | |
parent | e685db34cb94e4bef564da4afdaa7a18b1819c09 (diff) |
dump console content on server shutdown
Diffstat (limited to 'src/server/console.cc')
-rw-r--r-- | src/server/console.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/server/console.cc b/src/server/console.cc index 1fb7f38..c4e63e3 100644 --- a/src/server/console.cc +++ b/src/server/console.cc @@ -82,10 +82,23 @@ void Console::shutdown() server_console.draw(); endwin(); console_initialized = false; + + server_console.dump(); #endif } #ifdef HAVE_CURSES +void Console::dump() +{ + flush(); + + // dump console content + for (std::deque<std::string>::iterator it = consoleinterface_text.begin(); it != consoleinterface_text.end(); it++) { + print_ansi((*it).c_str()); + std::cout << std::endl; + } +} + void Console::resize() { if (!console_initialized) |