2013-07-29 07:13:03 -04: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 16:03:50 -04:00
|
|
|
cPluginManager.AddHook(cPluginManager.HOOK_CHAT, OnChat)
|
2013-07-29 07:13:03 -04: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 10:57:45 -05:00
|
|
|
end
|