summaryrefslogtreecommitdiffstats
path: root/Plugins/SquirrelChatLog.nut
blob: 586e8d6e27787121b47abd0c27ecb726f966b6ea (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
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 );