mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-10-22 01:23:15 +00:00
upstream dev sync + bump to 1.18
This commit is contained in:
@@ -354,20 +354,21 @@ bool RoomServerMesh::allowPacketForward(const mesh::Packet* /*packet*/) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// ZEPHCORE: ours. Also records whether the packet was an unscoped flood.
|
||||
// ZEPHCORE: ours. Also records whether the packet was an unscoped flood; a
|
||||
// transport flood with code 0 is one, wildcard deny included (UPSTREAM_TRACKER 01f9293b).
|
||||
mesh::DispatcherAction RoomServerMesh::onRecvPacket(mesh::Packet* pkt) {
|
||||
// Determine the request packet's region so sendFloodReply() can echo the same
|
||||
// scope. Runs for every packet (not just floods) so recv_pkt_region is cleared
|
||||
// for direct packets instead of inheriting the last flood's region.
|
||||
recv_pkt_unscoped_flood = (pkt->getRouteType() == ROUTE_TYPE_FLOOD);
|
||||
if (pkt->getRouteType() == ROUTE_TYPE_TRANSPORT_FLOOD) {
|
||||
recv_pkt_region = region_map.findMatch(pkt, REGION_DENY_FLOOD);
|
||||
} else if (pkt->getRouteType() == ROUTE_TYPE_FLOOD) {
|
||||
recv_pkt_unscoped_flood = mesh::isUnscopedFlood(pkt);
|
||||
if (recv_pkt_unscoped_flood) {
|
||||
if (region_map.getWildcard().flags & REGION_DENY_FLOOD) {
|
||||
recv_pkt_region = nullptr;
|
||||
} else {
|
||||
recv_pkt_region = ®ion_map.getWildcard();
|
||||
}
|
||||
} else if (pkt->getRouteType() == ROUTE_TYPE_TRANSPORT_FLOOD) {
|
||||
recv_pkt_region = region_map.findMatch(pkt, REGION_DENY_FLOOD);
|
||||
} else {
|
||||
recv_pkt_region = nullptr;
|
||||
}
|
||||
@@ -1003,6 +1004,8 @@ void RoomServerMesh::handleCommand(uint32_t sender_timestamp, char* command, cha
|
||||
addSystemPost(msg);
|
||||
strcpy(reply, "OK");
|
||||
}
|
||||
} else if (memcmp(command, "set repeat on", 13) == 0) {
|
||||
strcpy(reply, "ERR - repeat now deprecated"); // a room server never forwards (upstream 8579c667, 481f72ca)
|
||||
} else {
|
||||
_cli.handleCommand(sender_timestamp, command, reply);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user