Are you sure you need an event to do it, I'm pretty sure you could just do.
Code:
MainMenuBarLeftEndCap:Hide()
MainMenuBarRightEndCap:Hide()
as all Blizzard code is executed before addons (unless it's LOD).
and heres an example of a super simple event handler:
Code:
local function OnEvent(f, event, args)
if event == <Event 1> then
--Do stuff
elseif event == <Event 2> then
--Do other stuff
end
end
local f = CreateFrame("Frame")
f:RegisterEvent(<Event 1>)
f:RegisterEvent(<Event 2>)
f:SetScript("OnEvent", OnEvent)