From b72b7c33ac51a6c11827b40e956c30e7bc31d9d3 Mon Sep 17 00:00:00 2001 From: "nielsbreu@gmail.com" Date: Wed, 3 Apr 2013 16:30:02 +0000 Subject: 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 --- MCServer/Plugins/Core/listgroups.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 MCServer/Plugins/Core/listgroups.lua (limited to 'MCServer/Plugins') diff --git a/MCServer/Plugins/Core/listgroups.lua b/MCServer/Plugins/Core/listgroups.lua new file mode 100644 index 000000000..da9a6ce67 --- /dev/null +++ b/MCServer/Plugins/Core/listgroups.lua @@ -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 \ No newline at end of file -- cgit v1.2.3