752057fb1b
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1140 0a769ca7-a7f5-676a-18bf-c427514a06d6
32 lines
605 B
Lua
32 lines
605 B
Lua
|
|
-- 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)
|
|
|
|
PluginManager = cRoot:Get():GetPluginManager()
|
|
PluginManager:AddHook(Plugin, cPluginManager.HOOK_CHAT)
|
|
|
|
LOG("Initialized " .. Plugin:GetName() .. " v." .. Plugin:GetVersion())
|
|
return true
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
function OnChat(Player, Message)
|
|
-- Lets get loggin'
|
|
LOGINFO("[" .. Player:GetName() .. "]: " .. Message);
|
|
|
|
return false
|
|
end |