From 49c443896dcac8c4eaf08c4024e8bd2366ad899a Mon Sep 17 00:00:00 2001 From: LogicParrot Date: Sat, 2 Sep 2017 10:45:06 +0300 Subject: Revert "Replace ItemCallbacks with lambdas (#3948)" This reverts commit 496c337cdfa593654018c171f6a74c28272265b5. --- src/WebAdmin.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/WebAdmin.cpp') diff --git a/src/WebAdmin.cpp b/src/WebAdmin.cpp index 335b6b94e..eefe57b73 100644 --- a/src/WebAdmin.cpp +++ b/src/WebAdmin.cpp @@ -21,6 +21,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("
  • "); + m_Contents.append(a_Player->GetName()); + m_Contents.append("
  • "); + return false; + } + +public: + + AString m_Contents; +} ; + + + + + //////////////////////////////////////////////////////////////////////////////// // cWebadminRequestData -- cgit v1.2.3