Looking at the code you aren't actually using g_PluginInfo. You're looping through all the known commands and getting the info from there. As of yet every plugin I've seen uses "<PluginName>.<Permission>" in their permissions. You could thus get the name by using something like this:
If you would actually use the Info.lua file you would use something like this:
I believe the prettifier escaped some single quotes. You probably need to fix that before testing
local PluginName = a_CBPermission:match("^.-%.")This would of course mean that you'd mostly have lowercase plugin names like "worldedit" instead of "WorldEdit" (unless a plugin has permissions that look weird)
If you would actually use the Info.lua file you would use something like this:
cPluginManager:ForEachPlugin( function(a_Plugin) if (not cFile:Exists(a_Plugin:GetLocalFolder() .. "/Info.lua")) then -- The plugin doesn't have a Info.lua file return false end local PluginInfoLoader = loadfile(a_Plugin:GetLocalFolder() .. "/Info.lua") local LoaderEnv = {} -- This way the function can't overwrite any of the functions in this environment. -- And we can extract the g_PluginInfo variable setfenv(PluginInfoLoader, LoaderEnv) local PluginInfo = LoaderEnv["g_PluginInfo"] local PluginName = PluginInfo.Name -- You can also use a_Plugin:GetName() of course. -- For each command like usually. for CommandString, CommandInfo in pairs(PluginInfo.Commands) do ins(Row, "<tr></td><td valign='top'>" .. CommandString .. "<br/></td><td valign='top'>" .. (CommandInfo.Permission or "") .. "<br/></td><td valign='top'>" .. (CommandInfo.HelpString or "") .. "<br/></td><td valign='top'></tr>") end end )Keep in mind that I haven't tested this It could fail miserably.
I believe the prettifier escaped some single quotes. You probably need to fix that before testing