MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / init

Method init

plugins/webReport/webReport.cpp:98–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98void WebReport::init(const char* tDir) {
99 // find any groups that have viewreport or admin, let them fly
100 if (findGroupsWithPerm(bz_perm_viewReports).size()) {
101 addPermToLevel(1, bz_perm_viewReports);
102 }
103 else {
104 addPermToLevel(1, "ADMIN");
105 }
106
107 loadDefaultTemplates();
108
109 templateSystem.addSearchPath(tDir);
110
111 templateSystem.addKey("evenodd", this);
112 templateSystem.addKey("Report", this);
113 templateSystem.addLoop("Reports", this);
114 templateSystem.addIF("Valid", this);
115
116 templateSystem.setPluginName("Web Report", getBaseURL().c_str());
117}
118
119void WebReport::keyCallback(std::string& data, const std::string& key) {
120 if (key == "evenodd") {

Callers 1

bz_LoadFunction · 0.45

Calls 8

findGroupsWithPermFunction · 0.85
addSearchPathMethod · 0.80
addKeyMethod · 0.80
addLoopMethod · 0.80
addIFMethod · 0.80
setPluginNameMethod · 0.80
c_strMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected