if not AceEvent and AceLibrary:HasInstance("AceEvent-2.0") then external(AceConsole, "AceEvent-2.0", AceLibrary("AceEvent-2.0")) end if AceEvent then if not AceConsole.nextAddon then AceConsole.nextAddon = {} end AceConsole.nextAddon[self] = options if not self.playerLogin then AceConsole:RegisterEvent("PLAYER_LOGIN", "PLAYER_LOGIN", true) end end if not AceHook and AceLibrary:HasInstance("AceHook-2.0") then external(AceConsole, "AceHook-2.0", AceLibrary("AceHook-2.0")) end if AceHook then AceConsole:Hook("ChatEdit_OnTabPressed") end AceConsole.registry[name] = options...function external(self, major, instance) if major == "AceEvent-2.0" then if not AceEvent then AceEvent = instance AceEvent:embed(self) end elseif major == "AceHook-2.0" then if not AceHook then AceHook = instance AceHook:embed(self) end endend