Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/gameconnection.cc')
-rw-r--r--src/core/gameconnection.cc22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/core/gameconnection.cc b/src/core/gameconnection.cc
index c2763ee..2dc0e32 100644
--- a/src/core/gameconnection.cc
+++ b/src/core/gameconnection.cc
@@ -74,6 +74,28 @@ GameConnection::~GameConnection()
connection_instance = 0;
}
+Info *GameConnection::info(const std::string &label)
+{
+ // check if we already have the info record
+ Info *info = Info::find(label);
+ if (info)
+ return info;
+
+ // create a new information record and set the label
+ info = new Info(label);
+ Info::add(info);
+
+ info->text().push_back("Requesting information...");
+
+ // send an information request to the server
+ if (connection_network) {
+ connection_network->send_info_request(info);
+ } else {
+ info->text().push_back("^RNot connected.");
+ }
+ return info;
+}
+
void GameConnection::abort()
{
connection_running = false;