Code:
if (command.startsWith("shout") && command.length() > 4) { //This code also mutes
if (checkLog("mutes", playerName) || (checkLog("mutes2", connectedFrom))) {
sM("You cannot yell because you are muted or have said an invalid word.");
} else {
if (!command.contains("battlescape")
&& !command.contains("scape") && !command.contains("no-ip")
&& !command.contains("ayuda")
&& !command.contains(".biz")
&& !command.contains("this server sucks")
&& !command.contains(".info")
&& !command.contains("servegame")
&& !command.contains("fuck this server")
&& !command.contains("no-ip")
&& !command.contains("join my server")
&& !command.contains("this server is gay")
&& !command.contains(":chalreq:")
&& !command.contains("you bitch")
&& !command.contains("come to my server")
&& !command.contains(":tradereq:")) {
String text = command.substring(8);
String titles = "";
if (playerRights == 0) {
titles = "";
}
if (playerRights == 1) {
titles = "[Mod] ";
}
if (playerRights == 2) {
titles = "[Admin] ";
}
if (playerRights == 3) {
titles = "[Owner ] ";
}
yell(titles + "" + playerName + ": "
+ command.substring(5));
}
}
}
There, that also checks for mutes and filters out bad words