Skip to content

Instantly share code, notes, and snippets.

@dennorske
Created January 7, 2016 03:18
Show Gist options
  • Save dennorske/725f1994f1c429c827d9 to your computer and use it in GitHub Desktop.
Save dennorske/725f1994f1c429c827d9 to your computer and use it in GitHub Desktop.
// ANTI FLAME --------------------------------------------
new strfindres = -1;
new stringz[132];
new words[11][]=
{
"fuck",
"nigger",
"bastard",
"asshole",
"bitch",
"whore",
"retard",
"gay",
"nigga",
"puta",
"perra"
};
for(new i; i<11; i++)
{
while(strfind(text, words[i], true) != -1)
{
strfindres = strfind(text, words[i], true, 0);
new nextspacepos = strfind(text, " ", true, strfindres);
if(nextspacepos > 0)
strdel(text, strfindres, nextspacepos);
else
strdel(text, strfindres, strfindres + strlen(words[i]) );
format(stringz, sizeof(stringz), "%s", text);
strins(stringz, "****", strfindres);
format(text, 135, "%s", stringz);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment