summaryrefslogblamecommitdiffstats
path: root/MCServer/Plugins/ChatLog/plugin.lua
blob: 9ef321b48beb6ef2e4d01b3ef5c435c677d7a298 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                                                                     

                                                       
                                                                
 
                                                                                


                    




                                 




                                                              

-- 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