From 52122c342d335a2561ace87c9d8deaa16a136604 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sat, 31 Mar 2012 16:23:26 +0300 Subject: Add 'fly' and 'fast' privileges and the underlying privileges-to-client system --- src/client.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/client.cpp') diff --git a/src/client.cpp b/src/client.cpp index 7f1b39c33..de3c63698 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -1674,6 +1674,21 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id) m_sound->stopSound(client_id); } } + else if(command == TOCLIENT_PRIVILEGES) + { + std::string datastring((char*)&data[2], datasize-2); + std::istringstream is(datastring, std::ios_base::binary); + + m_privileges.clear(); + infostream<<"Client: Privileges updated: "; + u16 num_privileges = readU16(is); + for(u16 i=0; i