1
0
cuberite-2a/Plugins/SquirrelChatLog.nut
faketruth 8285a11a26 It's a Squirrel!!
In SquirrelBindings.h use #define USE_SQUIRREL 1 to enable squirrel

git-svn-id: http://mc-server.googlecode.com/svn/trunk@76 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-08 01:25:01 +00:00

27 lines
538 B
Plaintext

class SquirrelChatLog extends cPlugin__Squirrel
{
constructor()
{
base.constructor();
}
function Initialize()
{
::print("SquirrelChatLog initialize()");
this.SetName("SquirrelChatLog");
local PluginManager = cRoot.Get().GetPluginManager();
PluginManager.AddHook( this, PluginManager.E_PLUGIN_CHAT );
return true;
}
function OnChat( Message, Player )
{
::print(Player.GetName() + ": " + Message);
}
}
Plugin <- SquirrelChatLog();
cRoot.Get().GetPluginManager().AddPlugin( Plugin );