2013-04-03 12:30:02 -04:00
|
|
|
function HandleListGroupsCommand( Split, Player )
|
|
|
|
local GroupsIni = cIniFile("groups.ini")
|
|
|
|
if GroupsIni:ReadFile() == false then
|
|
|
|
Player:SendMessage( cChatColor.Green .. "No groups found" )
|
|
|
|
end
|
2013-06-28 06:18:55 -04:00
|
|
|
Number = GroupsIni:NumKeys() - 1
|
2013-04-03 12:30:02 -04:00
|
|
|
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
|