From 1e0df536c2fae85c317ce9c3cc17603d5f98c911 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Wed, 15 Oct 2008 20:33:15 +0000 Subject: moved client console into a Widget --- src/core/application.cc | 4 +--- src/core/gameserver.cc | 7 +++---- 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'src/core') diff --git a/src/core/application.cc b/src/core/application.cc index db4f338..f98d44e 100644 --- a/src/core/application.cc +++ b/src/core/application.cc @@ -230,7 +230,7 @@ void Application::init(int count, char **arguments) Cvar::con_ansi = Cvar::get("con_ansi", "1", Cvar::Archive); #endif Cvar::con_ansi->set_info("[bool] console ANSI colors"); - sys::ConsoleInterface::instance()->set_ansi(Cvar::con_ansi->value()); + sys::set_ansi(Cvar::con_ansi->value()); #ifdef _WIN32 // Initialize win32 socket library @@ -302,8 +302,6 @@ void Application::shutdown() void Application::quit(int status) { - console()->flush(); - sys::quit(status); } diff --git a/src/core/gameserver.cc b/src/core/gameserver.cc index 46c3624..e42d1b2 100644 --- a/src/core/gameserver.cc +++ b/src/core/gameserver.cc @@ -484,7 +484,6 @@ void GameServer::exec(Player *player, std::string const & cmdline) Func *function = Func::find(command); if (function ) { - std::string args; if (cmdline.size() > command.size() +1 ) args.assign(cmdline.substr(command.size()+1)); @@ -499,9 +498,9 @@ void GameServer::exec(Player *player, std::string const & cmdline) console()->set_rcon(true); function->exec(args); - char line[MAXCMDSIZE]; - while(console()->buffer().getline(line, MAXCMDSIZE-1)) { - send(player, std::string(line)); + while(console()->rconbuf().size()) { + send(player, (*console()->rconbuf().begin())); + console()->rconbuf().pop_front(); } // disable rcon buffering -- cgit v1.2.3