Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/console.cc13
-rw-r--r--src/server/console.h2
2 files changed, 15 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)
diff --git a/src/server/console.h b/src/server/console.h
index ed15c79..b96f593 100644
--- a/src/server/console.h
+++ b/src/server/console.h
@@ -34,6 +34,8 @@ protected:
void draw_text();
/// draw the console input (ncurses)
void draw_input();
+ /// dump console content to cout
+ void dump();
private:
/// set ncurses drawing color