diff options
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/game.cpp b/src/game.cpp index 1c555dbee..5bbd92d55 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -49,6 +49,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "main.h" // For g_settings #include "tooldef.h" #include "tile.h" // For TextureSource +#include "logoutputbuffer.h" /* Setting this to 1 enables a special camera mode that forces @@ -642,6 +643,9 @@ void the_game( // Create node definition manager IWritableNodeDefManager *nodedef = createNodeDefManager(); + // Add chat log output for errors to be shown in chat + LogOutputBuffer chat_log_error_buf(LMT_ERROR); + /* Create server. SharedPtr will delete it when it goes out of scope. @@ -2122,7 +2126,13 @@ void the_game( Get chat messages from client */ { - // Get new messages + // Get new messages from error log buffer + while(!chat_log_error_buf.empty()) + { + chat_lines.push_back(ChatLine(narrow_to_wide( + chat_log_error_buf.get()))); + } + // Get new messages from client std::wstring message; while(client.getChatMessage(message)) { |