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

Function savehistory

source/src/console.cpp:430–441  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

428COMMANDN(history, history_, "i");
429
430void savehistory()
431{
432 stream *f = openfile(path("config/history", true), "w");
433 if(!f) return;
434 loopv(history)
435 {
436 hline *h = history[i];
437 if(!h->action && !h->prompt && strncmp(h->buf, "/ ", 2))
438 f->printf("%s\n",h->buf);
439 }
440 delete f;
441}
442
443void loadhistory()
444{

Callers 1

quitFunction · 0.85

Calls 2

openfileFunction · 0.85
pathFunction · 0.85

Tested by

no test coverage detected