// THANKS.CS - original script by Zear
// Modified by Presto for PrestoPak compatibility

$thanksFloodTime = 15;	// For 15 seconds we won't thank him again.

Include("presto\\match.cs");
Include("presto\\say.cs");
Include("presto\\event.cs");

function ThanksOnClientMessage(%client, %msg) {
	if (%client != 0)
		return;
	if (Match::ParamString(%msg, "Being repaired by %p")) {
		%player = Match::Result(p);
		if (Flood::Protect("thanks"@%player, $thanksFloodTime)) {
			say(1, "Thanks, "@ %player);
			Say::Local(sayThanks); // so everyone doesn't have to hear
			}
		return;
		}
	}
Event::Attach(eventClientMessage, ThanksOnClientMessage);
