aboutsummaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp
index cb7afe29f..216d86cd4 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -1900,6 +1900,20 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id)
}
inv->deSerialize(is);
}
+ else if(command == TOCLIENT_SHOW_FORMSPEC)
+ {
+ std::string datastring((char*)&data[2], datasize-2);
+ std::istringstream is(datastring, std::ios_base::binary);
+
+ std::string formspec = deSerializeLongString(is);
+
+ ClientEvent event;
+ event.type = CE_SHOW_FORMSPEC;
+ // pointer is required as event is a struct only!
+ // adding a std:string to a struct isn't possible
+ event.show_formspec.formspec = new std::string(formspec);
+ m_client_event_queue.push_back(event);
+ }
else
{
infostream<<"Client: Ignoring unknown command "