public static void addWadToBlacklist(String filename, String sender) {
		String query = "SELECT `md5`,`name` FROM `" + mysql_db + "`.`blacklist` WHERE `name` = ?";
		try {
			Connection con = getConnection();
			PreparedStatement pst = con.prepareStatement(query);
			pst.setString(1, filename);
			ResultSet r = pst.executeQuery();
			if (r.next()) {
				bot.sendMessage(sender, "Wad '" + filename + "' already exists in blacklist.");
			}
			else {
				query = "SELECT `md5`,`wadname` FROM `" + mysql_db + "`.`wads` WHERE `wadname` = ?";
				pst = con.prepareStatement(query);
				pst.setString(1, filename);
				r = pst.executeQuery();
				String name = "", md5 = "";
				if (r.next()) {
					name = r.getString("wadname");
					md5 = r.getString("md5");
				}
				else {
					bot.sendMessage(sender, "Wad '" + filename + "' was not found in our repository.");
					return;
				}
				query = "INSERT INTO `" + mysql_db + "`.`blacklist` (`name`,`md5`) VALUES (?, ?)";
				pst = con.prepareStatement(query);
				pst.setString(1, name);
				pst.setString(2, md5);
				int result = pst.executeUpdate();
				if (result == 1)
					bot.sendMessage(sender, "Added '" + name + "' to the blacklist with hash " + md5);
				else
					bot.sendMessage(sender, "There was an error adding the wad to the blacklist. Please contact an administrator.");
			}
		} catch (SQLException e) {
			e.printStackTrace();
			logMessage(LOGLEVEL_IMPORTANT, "Could not blacklist wad (SQL Error)");
		}
	}