summaryrefslogtreecommitdiffstats
path: root/Plugins
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Plugins/SquirrelChatLog.nut20
1 files changed, 7 insertions, 13 deletions
diff --git a/Plugins/SquirrelChatLog.nut b/Plugins/SquirrelChatLog.nut
index 586e8d6e2..df43c3fb3 100644
--- a/Plugins/SquirrelChatLog.nut
+++ b/Plugins/SquirrelChatLog.nut
@@ -1,26 +1,20 @@
-class SquirrelChatLog extends cPlugin__Squirrel
+class SquirrelChatLog extends Plugin
{
- constructor()
- {
- base.constructor();
- }
-
+ name = "SquirrelChatLogger";
+
function Initialize()
{
::print("SquirrelChatLog initialize()");
- this.SetName("SquirrelChatLog");
- local PluginManager = cRoot.Get().GetPluginManager();
- PluginManager.AddHook( this, PluginManager.E_PLUGIN_CHAT );
+ this.AddHook(Hook.Chat);
+
return true;
}
function OnChat( Message, Player )
{
+ ::print("CHAT");
::print(Player.GetName() + ": " + Message);
+
}
}
-
-
-Plugin <- SquirrelChatLog();
-cRoot.Get().GetPluginManager().AddPlugin( Plugin );