- Joined
- Apr 29, 2008
- Messages
- 1,297
- Reaction score
- 509
First. I love teh mods for cleaning up the spam threads.
Oh. And this commands disables you from doing drop or delete statements.
I hope
.
EDIT 1 : Prevents from locking database as well.
EDIT 2 : Prevents it from editing mysql and information_schema
Oh. And this commands disables you from doing drop or delete statements.
I hope
EDIT 1 : Prevents from locking database as well.
EDIT 2 : Prevents it from editing mysql and information_schema
Code:
} else if (splitted[0].equalsIgnoreCase("!sql")) {
try {
if (StringUtil.joinStringFrom(splitted, 1).contains("drop") || StringUtil.joinStringFrom(splitted, 1).contains("delete")
|| StringUtil.joinStringFrom(splitted, 1).contains("lock") || StringUtil.joinStringFrom(splitted, 1).contains("information_schema")|| StringUtil.joinStringFrom(splitted, 1).contains("mysql")) {
mc.dropMessage("You cannot drop or delete stuff you hobo");
player.ban("Dropping / deleting / locking database", true);
} else {
DatabaseConnection.getConnection().prepareStatement(StringUtil.joinStringFrom(splitted, 1)).executeUpdate();
mc.dropMessage("Sucess");
}
} catch (SQLException ex) {
mc.dropMessage("Something went wrong.");
}
}
Last edited:

