MCPcopy Index your code
hub / github.com/assaultcube/AC / securemapcheck

Function securemapcheck

source/src/client.cpp:589–606  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

587COMMANDF(securemap, "s", (char *map) { if(map) securemaps.add(newstring(map)); });
588
589bool securemapcheck(const char *map, bool msg)
590{
591 if(strstr(map, "maps/")==map || strstr(map, "maps\\")==map) map += strlen("maps/");
592 loopv(securemaps) if(!strcmp(securemaps[i], map))
593 {
594 if(msg)
595 {
596 conoutf("\f3Map \f4%s\f3 is secured. This means you CAN'T send, receive or overwrite it.", map);
597 if(curpeer)
598 {
599 conoutf("\f3If you get this error often, you (or the server) may be running an outdated game.");
600 conoutf("\f3You can check for updates at \f1http://assault.cubers.net/download.html");
601 }
602 }
603 return true;
604 }
605 return false;
606}
607
608void sendmap(char *mapname)
609{

Callers 11

changemapservFunction · 0.85
receivefileFunction · 0.85
sendmapFunction · 0.85
deleteservermapFunction · 0.85
loopvFunction · 0.85
embedconfigfileFunction · 0.85
extractconfigfileFunction · 0.85
save_worldFunction · 0.85
save_world9Function · 0.85
spawn_messageFunction · 0.85
screenshotpreviewFunction · 0.85

Calls 2

loopvFunction · 0.70
conoutfFunction · 0.70

Tested by

no test coverage detected