for some reason TortoiseSVN didn't commit listgroups.lua
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1354 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
parent
6552a9ddcc
commit
b72b7c33ac
14
MCServer/Plugins/Core/listgroups.lua
Normal file
14
MCServer/Plugins/Core/listgroups.lua
Normal file
@ -0,0 +1,14 @@
|
||||
function HandleListGroupsCommand( Split, Player )
|
||||
local GroupsIni = cIniFile("groups.ini")
|
||||
if GroupsIni:ReadFile() == false then
|
||||
Player:SendMessage( cChatColor.Green .. "No groups found" )
|
||||
end
|
||||
Number = GroupsIni:NumKeys()
|
||||
Groups = {}
|
||||
for i=0, Number do
|
||||
table.insert( Groups, GroupsIni:KeyName(i) )
|
||||
end
|
||||
Player:SendMessage( cChatColor.Green .. "Groups:" )
|
||||
Player:SendMessage( cChatColor.Green .. table.concat( Groups, ", " ) )
|
||||
return true
|
||||
end
|
Loading…
Reference in New Issue
Block a user