summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/ChatLog/plugin.lua
blob: adbf986e05e0acf3c9974dc0244f10f56540e913 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

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

	cPluginManager.AddHook(cPluginManager.HOOK_CHAT, OnChat)

	LOG("Initialized " .. Plugin:GetName() .. " v." .. Plugin:GetVersion())
	return true
end





function OnChat(Player, Message)
	-- Lets get loggin'
	LOGINFO("[" .. Player:GetName() .. "]: " .. StripColorCodes(Message));

	return false
end