jrgps script, minus the stuff you don't need if you just want to kill.
// Config
const
FileName = 'BadWordsList.txt'; //file which holds the badwords, each seperated with a space
// Holders of information
var
BadWords: TStringArray;
HaveBadWords: Boolean;
// Credits to DorkeyDear - http://forums.soldat.pl/index.php?topic=27844.0
function Explode(Source: String; const Delimiter: String): Array of String;
var TempStr: String;
begin
Source := Source + Delimiter;
repeat
TempStr := GetPiece(Source, Delimiter, 0);
SetArrayLength(Result, GetArrayLength(Result) + 1);
Result[GetArrayLength(Result) - 1] := TempStr;
Delete(Source, 1, Length(TempStr) + Length(Delimiter));
until Length(Source) = 0;
end;
//load badwords list
procedure ActivateServer();
begin
if not FileExists(FileName) then
begin
WriteLn('Cannot find badwords file')
HaveBadWords := false;
exit;
end;
BadWords := Explode(UpperCase(ReadFile(FileName)), ' ');
HaveBadWords := True;
end;
//whenever someone says something, check it.
procedure OnPlayerSpeak(PlayerID: Byte; Text: string);
var i: integer;
var Bad: boolean;
begin
//do we any badwords to check?
if not HaveBadWords then
exit;
//for now, make it false
Bad := false;
//check it!
for i := 0 to GetArrayLength(BadWords) - 1 do
if ContainsString(UpperCase(Text), BadWords[i]) then
Bad := true;
//saying something naughty?
if Bad then
Command('/kill ' + IntToStr(PlayerID));
end;