2013-01-13 06:10:26 -05:00
|
|
|
|
|
|
|
-- plugin.lua
|
|
|
|
|
|
|
|
-- Implements the main entrypoint for the plugin, as well as all the handling needed
|
|
|
|
|
|
|
|
-- ChatLog plugin logs all chat messages into the server log
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function Initialize(Plugin)
|
|
|
|
Plugin:SetName("ChatLog")
|
|
|
|
Plugin:SetVersion(3)
|
2012-02-22 10:57:45 -05:00
|
|
|
|
|
|
|
PluginManager = cRoot:Get():GetPluginManager()
|
2013-01-13 06:10:26 -05:00
|
|
|
PluginManager:AddHook(Plugin, cPluginManager.HOOK_CHAT)
|
2012-02-22 10:57:45 -05:00
|
|
|
|
2013-01-13 06:10:26 -05:00
|
|
|
LOG("Initialized " .. Plugin:GetName() .. " v." .. Plugin:GetVersion())
|
2012-02-22 10:57:45 -05:00
|
|
|
return true
|
|
|
|
end
|
|
|
|
|
2013-01-13 06:10:26 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function OnChat(Player, Message)
|
2012-02-22 10:57:45 -05:00
|
|
|
-- Lets get loggin'
|
|
|
|
LOGINFO("[" .. Player:GetName() .. "]: " .. Message);
|
|
|
|
|
|
|
|
return false
|
|
|
|
end
|