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.cc16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/core/gameconnection.cc b/src/core/gameconnection.cc
index 46b50f5..ce33dc6 100644
--- a/src/core/gameconnection.cc
+++ b/src/core/gameconnection.cc
@@ -105,7 +105,7 @@ Info *GameConnection::info(unsigned int id)
return info;
} else {
info = new Info(id);
- info->text().push_back("Requesting information...");
+ info->add_text("Requesting information...");
}
@@ -113,12 +113,11 @@ Info *GameConnection::info(unsigned int id)
if (connection_network) {
//con_debug << "Requesting info for " << info->id() << std::endl;
info->set_timestamp(connection_timestamp);
- info->set_id(0);
-
+
connection_network->send_info_request(info);
connection_network->transmit();
} else {
- info->text().push_back("^RNot connected.");
+ info->add_text("^RNot connected.");
info->set_timestamp(0);
}
return info;
@@ -151,21 +150,18 @@ Info *GameConnection::info(const std::string &type, const std::string &label)
return info;
} else {
// create a new info record and set the label
- info = new Info(infotype);
- info->set_label(label);
- info->text().push_back("Requesting information...");
+ info = new Info(infotype, label);
+ info->add_text("Requesting information...");
}
// send an information request to the server
if (connection_network) {
//con_debug << "Requesting info for " << info->type()->label() << ":" << info->label() << std::endl;
info->set_timestamp(connection_timestamp);
- info->set_id(0);
-
connection_network->send_info_request(info);
connection_network->transmit();
} else {
- info->text().push_back("^RNot connected.");
+ info->add_text("^RNot connected.");
info->set_timestamp(0);
}
return info;