mirror of
https://github.com/edubart/otclient.git
synced 2025-12-14 04:49:45 +01:00
add chat panel, send text messages, guard forbidden functions with an ifdef
This commit is contained in:
19
modules/chat/chat.lua
Normal file
19
modules/chat/chat.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
Chat = {}
|
||||
|
||||
-- private variables
|
||||
local chatPanel
|
||||
|
||||
-- public functions
|
||||
function Chat.create()
|
||||
chatPanel = loadUI("/chat/chat.otui", Game.gameBottomPanel)
|
||||
end
|
||||
|
||||
function Chat.destroy()
|
||||
chatPanel:destroy()
|
||||
chatPanel = nil
|
||||
end
|
||||
|
||||
-- hooked events
|
||||
|
||||
connect(Game, { onLogin = Chat.create,
|
||||
onLogout = Chat.destroy })
|
||||
Reference in New Issue
Block a user