You want to check that the event passed is equal to the name of the event:
Lua Code:
local oEvents = { -- These are events that we can check for
"GOSSIP_SHOW",
"BANKFRAME_OPENED",
"GUILDBANKFRAME_OPENED"
}
if oEvents[event] then -- The 'event' is passed from the OnEvent script within kgPanels
ChatFrame1:Hide()
ChatFrame3:Hide()
ChatFrame1ButtonFrame:Hide()
ChatFrame3ButtonFrame:Hide()
ChatFrameMenuButton:Hide()
GeneralDockManager:Hide()
FriendsMicroButton:Hide()
else
ChatFrame1:Show()
ChatFrame3:Show()
ChatFrame1ButtonFrame:Show()
ChatFrame3ButtonFrame:Show()
ChatFrameMenuButton:Show()
GeneralDockManager:Show()
FriendsMicroButton:Show()
end