From 4f17362aeb80e5339c58a5d3b0fbaeb88d9e701c Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Mon, 13 Feb 2012 21:47:03 +0000 Subject: Rewritten most of the code for multithreading; still not 100%, but getting there. If this commit proves to be too problematic, we can always undo it. git-svn-id: http://mc-server.googlecode.com/svn/trunk@251 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cWebAdmin.cpp | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) (limited to 'source/cWebAdmin.cpp') diff --git a/source/cWebAdmin.cpp b/source/cWebAdmin.cpp index b33d28e16..bd762736f 100644 --- a/source/cWebAdmin.cpp +++ b/source/cWebAdmin.cpp @@ -27,7 +27,28 @@ -cWebAdmin * WebAdmin = 0; +/// Helper class - appends all player names together in a 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; +} ; + + + + + +cWebAdmin * WebAdmin = NULL; @@ -191,12 +212,10 @@ void cWebAdmin::Request_Handler(webserver::http_request* r) Content += ""; Content += "

    Players:


    "; } -- cgit v1.2.3