From 9dfa0f1f15c413540e932a04e94419a8a3b37dcf Mon Sep 17 00:00:00 2001 From: faketruth Date: Mon, 30 Jan 2012 16:47:26 +0000 Subject: Added a WebAdmin interface to view users their groups, and the permissions of groups. cChunk::Tick did an assertion in cCSLock, I used a cCSUnlock to fix it, but not sure if this is correct. git-svn-id: http://mc-server.googlecode.com/svn/trunk@194 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- Plugins/Core/web_playerlist.lua | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'Plugins/Core/web_playerlist.lua') diff --git a/Plugins/Core/web_playerlist.lua b/Plugins/Core/web_playerlist.lua index eeb9369c1..205306ba8 100644 --- a/Plugins/Core/web_playerlist.lua +++ b/Plugins/Core/web_playerlist.lua @@ -18,14 +18,17 @@ function HandleRequest_PlayerList( Request ) local PlayerList = World:GetAllPlayers() - for i, Player in ipairs( PlayerList ) do - Content = Content .. "" - Content = Content .. "" .. i .. "." - Content = Content .. "" .. Player:GetName() .. "" - Content = Content .. "Kick" - Content = Content .. "" + if( #PlayerList > 0 ) then + for i, Player in ipairs( PlayerList ) do + Content = Content .. "" + Content = Content .. "" .. i .. "." + Content = Content .. "" .. Player:GetName() .. "" + Content = Content .. "Kick" + Content = Content .. "" + end + else + Content = Content .. "None" end - Content = Content .. "" Content = Content .. "
" return Content -- cgit v1.2.3