diff options
author | Stijn Buys <ingar@osirion.org> | 2010-02-21 12:36:17 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2010-02-21 12:36:17 +0000 |
commit | 730c452ff5896ed66114e6b2153add9379edef5c (patch) | |
tree | 353c7c0449deb41f3396d776c0437a4141383d01 /src/game/base | |
parent | 745b4e04e5f23a02e5d9b12ebabf38d6dd034136 (diff) |
network info messages bugfixes
Diffstat (limited to 'src/game/base')
-rw-r--r-- | src/game/base/shipdealer.cc | 11 | ||||
-rw-r--r-- | src/game/base/shipmodel.cc | 6 | ||||
-rw-r--r-- | src/game/base/shipmodel.h | 2 |
3 files changed, 19 insertions, 0 deletions
diff --git a/src/game/base/shipdealer.cc b/src/game/base/shipdealer.cc index b38855b..d825e2c 100644 --- a/src/game/base/shipdealer.cc +++ b/src/game/base/shipdealer.cc @@ -83,7 +83,18 @@ void ShipDealer::func_buy(core::Player *player, const std::string &args) } if (!shipmodel) { + // enable rcon buffering + sys::ConsoleInterface::instance()->set_rcon(true); ShipModel::list(); + + 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; } diff --git a/src/game/base/shipmodel.cc b/src/game/base/shipmodel.cc index dacc5a6..a6a2bf9 100644 --- a/src/game/base/shipmodel.cc +++ b/src/game/base/shipmodel.cc @@ -75,4 +75,10 @@ ShipModel *ShipModel::search(const std::string searchstr) return (ShipModel *) core::Info::search(shipmodel_infotype, searchstr); } + +void ShipModel::list() +{ + core::Info::list(shipmodel_infotype); +} + } diff --git a/src/game/base/shipmodel.h b/src/game/base/shipmodel.h index dc56033..3c7f6df 100644 --- a/src/game/base/shipmodel.h +++ b/src/game/base/shipmodel.h @@ -85,6 +85,8 @@ public: static ShipModel *find(const std::string & label); static ShipModel *search(const std::string searchstr); + + static void list(); static core::InfoType *shipmodel_infotype; |