From 6694c79aedea3f5989dd3befdafb7906557f155d Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 6 Mar 2010 16:31:21 +0000 Subject: fixes 'buy ship' without argument lock-up --- src/game/base/shipdealer.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/game/base/shipdealer.cc b/src/game/base/shipdealer.cc index d825e2c..adb97ea 100644 --- a/src/game/base/shipdealer.cc +++ b/src/game/base/shipdealer.cc @@ -86,14 +86,13 @@ void ShipDealer::func_buy(core::Player *player, const std::string &args) // enable rcon buffering sys::ConsoleInterface::instance()->set_rcon(true); ShipModel::list(); - + // disable rcon buffering + sys::ConsoleInterface::instance()->set_rcon(false); + while (sys::ConsoleInterface::instance()->rconbuf().size()) { player->send((*sys::ConsoleInterface::instance()->rconbuf().begin())); sys::ConsoleInterface::instance()->rconbuf().pop_front(); } - - // disable rcon buffering - sys::ConsoleInterface::instance()->set_rcon(false); player->send("Usage: buy ship label"); return; -- cgit v1.2.3