summaryrefslogblamecommitdiffstats
path: root/MCServer/Plugins/Core/listgroups.lua
blob: da9a6ce67b7f1b29fd0bf55f6a683fc8c431f738 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
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