MCPcopy Create free account
hub / github.com/assaultcube/AC / writepcksourcecfg

Function writepcksourcecfg

source/src/autodownload.cpp:519–534  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

517}
518
519void writepcksourcecfg()
520{
521 if(pckservers.length())
522 {
523 stream *f = openfile("config" PATHDIVS "pcksources.cfg", "w");
524 if(!f) return;
525 f->printf("// list of package source servers (only add servers you trust!)\n\n");
526 f->printf("autodownloaddebug %d\n", autodownloaddebug); // saved.cfg is loaded too late for this to be in it and be efficient...
527 loopv(pckservers)
528 {
529 pckserver *s = pckservers[i];
530 if(s->priority > -10000) f->printf("addpckserver %s %d // ping: %d, resolved: %d, updates: %d\n", s->host, s->priority, s->ping, s->resolved, s->updates.numelems);
531 }
532 delete f;
533 }
534}
535
536void getmod(char *name)
537{

Callers 1

quitFunction · 0.85

Calls 3

openfileFunction · 0.85
lengthMethod · 0.45
printfMethod · 0.45

Tested by

no test coverage detected