From 983d23ca37baa89f7e4dc11d71502d9c059f6376 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Wed, 1 Jan 2014 17:15:03 +0000 Subject: [PATCH] Added plugin --- plugin.lua | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 plugin.lua diff --git a/plugin.lua b/plugin.lua new file mode 100644 index 0000000..adbf986 --- /dev/null +++ b/plugin.lua @@ -0,0 +1,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 \ No newline at end of file