diff options
author | LogicParrot <LogicParrot@users.noreply.github.com> | 2017-09-02 12:35:22 +0200 |
---|---|---|
committer | LogicParrot <LogicParrot@users.noreply.github.com> | 2017-09-02 12:35:22 +0200 |
commit | 07a5bf0984559d04fce1091b82b0952217ac64cc (patch) | |
tree | 0d1eee372a782213c9e2b84deaefe717b379a04b /src/WebAdmin.cpp | |
parent | Skeletons (diff) | |
parent | Revert "Replace ItemCallbacks with lambdas (#3948)" (diff) | |
download | cuberite-07a5bf0984559d04fce1091b82b0952217ac64cc.tar cuberite-07a5bf0984559d04fce1091b82b0952217ac64cc.tar.gz cuberite-07a5bf0984559d04fce1091b82b0952217ac64cc.tar.bz2 cuberite-07a5bf0984559d04fce1091b82b0952217ac64cc.tar.lz cuberite-07a5bf0984559d04fce1091b82b0952217ac64cc.tar.xz cuberite-07a5bf0984559d04fce1091b82b0952217ac64cc.tar.zst cuberite-07a5bf0984559d04fce1091b82b0952217ac64cc.zip |
Diffstat (limited to 'src/WebAdmin.cpp')
-rw-r--r-- | src/WebAdmin.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/WebAdmin.cpp b/src/WebAdmin.cpp index 335b6b94e..eefe57b73 100644 --- a/src/WebAdmin.cpp +++ b/src/WebAdmin.cpp @@ -22,6 +22,30 @@ static const char DEFAULT_WEBADMIN_PORTS[] = "8080"; //////////////////////////////////////////////////////////////////////////////// +// cPlayerAccum: + +/** Helper class - appends all player names together in an HTML list */ +class cPlayerAccum : + public cPlayerListCallback +{ + virtual bool Item(cPlayer * a_Player) override + { + m_Contents.append("<li>"); + m_Contents.append(a_Player->GetName()); + m_Contents.append("</li>"); + return false; + } + +public: + + AString m_Contents; +} ; + + + + + +//////////////////////////////////////////////////////////////////////////////// // cWebadminRequestData /** The form parser callbacks for requests in the "/webadmin" and "/~webadmin" paths */ |