8285a11a26
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
27 lines
538 B
Plaintext
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 );
|