View Single Post
deejayy
Junior Member
Join Date: Mar 2005
Old 03-10-2014 , 06:57   Re: HLDS-V8: Extending HLDS with V8 JavaScript engine
Reply With Quote #7

Code:
function ClientCommand(params)
{
	if (params.argv[0] == 'say' || params.argv[0] == 'say_team') {
		if (params.args.match(/[0-9 ]+\.[0-9 ]+\.[0-9 ]+\.[0-9 ]+|2[6-9 ][0-9 ][0-9 ][0-9 ]|\.com|\.net|\.hu|\.org|\.ro|\.sk/)) {
			console.log('SPAMMER! ' + v8.getPlayerName(params.id));
			return V8_SUPERCEDE;
		}
	}
}
__________________
deejayy is offline