This is dry-coded, so it might not be 100% right, but something like this should add the slash commands you're looking for. This would have to be put into an addon or run at load-time by something like WowLua or _DevPad.
Code:
local function PrintError(message)
DEFAULT_CHAT_FRAME:AddMessage(msg, 1, 0, 0)
end
local function GetAltModule()
if not Prat then
PrintError("Prat is not loaded!")
return
end
local module = Prat:GetModule("AltNames", true)
if not module then
PrintError("The AltNames module is not loaded!")
return
end
return module
end
SLASH_PRAT_ADDALT1 = "/addalt"
SlashCmdList["PRAT_ADDALT"] = function(args)
local alt, main = strmatch(args, '(%S+)%s+(%S+)')
if not main or not alt then
PrintError("Invalid arguments to /addalt! Syntax is: /addalt ALT MAIN")
return
end
local altModule = GetAltModule()
if not altModule then return end
altModule:addAlt(alt.." "..main)
end
SLASH_PRAT_DELALT1 = "/delalt"
SlashCmdList["PRAT_DELALT"] = function(alt)
if not alt then
PrintError("Invalid arguments to /delalt! Syntax is : /delalt ALT")
return
end
local altModule = GetAltModule()
if not altModule then return end
altModule:delAlt(alt)
end