2013-07-29 04:13:03 -07: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)
|
|
|
|
|
2013-08-21 13:03:50 -07:00
|
|
|
cPluginManager.AddHook(cPluginManager.HOOK_CHAT, OnChat)
|
2013-07-29 04:13:03 -07:00
|
|
|
|
|
|
|
LOG("Initialized " .. Plugin:GetName() .. " v." .. Plugin:GetVersion())
|
|
|
|
return true
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function OnChat(Player, Message)
|
|
|
|
-- Lets get loggin'
|
|
|
|
LOGINFO("[" .. Player:GetName() .. "]: " .. StripColorCodes(Message));
|
|
|
|
|
|
|
|
return false
|
2012-02-22 07:57:45 -08:00
|
|
|
end
|