summaryrefslogtreecommitdiff
path: root/src/client.h
diff options
context:
space:
mode:
authorred-001 <red-001@outlook.ie>2017-04-19 14:16:54 +0100
committerparamat <mat.gregory@virginmedia.com>2017-05-04 04:25:45 +0100
commitae0d8f74d747fab2fbe5b4553818e0f938e3289d (patch)
treeddbb434b4a7c9b1300d6e0503b3fd70f391c6ff5 /src/client.h
parent468eeb618e9abbff2f04f4635eb89a8f684d71ae (diff)
downloadminetest-ae0d8f74d747fab2fbe5b4553818e0f938e3289d.tar.gz
minetest-ae0d8f74d747fab2fbe5b4553818e0f938e3289d.tar.bz2
minetest-ae0d8f74d747fab2fbe5b4553818e0f938e3289d.zip
Add function to get server info.
Diffstat (limited to 'src/client.h')
-rw-r--r--src/client.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/client.h b/src/client.h
index 0dd519308..11b670977 100644
--- a/src/client.h
+++ b/src/client.h
@@ -257,6 +257,7 @@ public:
IrrlichtDevice *device,
const char *playername,
const std::string &password,
+ const std::string &address_name,
MapDrawControl &control,
IWritableTextureSource *tsrc,
IWritableShaderSource *shsrc,
@@ -284,9 +285,7 @@ public:
The name of the local player should already be set when
calling this, as it is sent in the initialization.
*/
- void connect(Address address,
- const std::string &address_name,
- bool is_local_server);
+ void connect(Address address, bool is_local_server);
/*
Stuff that references the environment is valid only as
@@ -525,6 +524,16 @@ public:
IrrlichtDevice *getDevice() const { return m_device; }
+ const Address getServerAddress()
+ {
+ return m_con.GetPeerAddress(PEER_ID_SERVER);
+ }
+
+ const std::string &getAddressName() const
+ {
+ return m_address_name;
+ }
+
private:
// Virtual methods from con::PeerHandler
@@ -576,6 +585,7 @@ private:
ClientEnvironment m_env;
ParticleManager m_particle_manager;
con::Connection m_con;
+ std::string m_address_name;
IrrlichtDevice *m_device;
Camera *m_camera;
Minimap *m_minimap;