MCPcopy Create free account
hub / github.com/cuberite/cuberite / Start

Method Start

src/WebAdmin.cpp:118–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116
117
118bool cWebAdmin::Start(void)
119{
120 if (!m_IsInitialized)
121 {
122 // Not initialized
123 return false;
124 }
125
126 LOGD("Starting WebAdmin...");
127
128 // Initialize the WebAdmin template script and load the file
129 m_TemplateScript.Create();
130 m_TemplateScript.RegisterAPILibs();
131 if (!m_TemplateScript.LoadFile(FILE_IO_PREFIX "webadmin/template.lua"))
132 {
133 LOGWARN("Could not load WebAdmin template \"%s\", using default template.", FILE_IO_PREFIX "webadmin/template.lua");
134 m_TemplateScript.Close();
135 }
136
137 m_IsRunning = m_HTTPServer.Start(*this);
138 return m_IsRunning;
139}
140
141
142

Callers

nothing calls this directly

Calls 5

LOGWARNFunction · 0.85
RegisterAPILibsMethod · 0.80
LoadFileMethod · 0.80
CreateMethod · 0.45
CloseMethod · 0.45

Tested by

no test coverage detected