Skip to content

Commit 3b0f953

Browse files
committed
Remove duplicates in open files
1 parent a27c467 commit 3b0f953

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

core/src/main/java/com/github/games647/lambdaattack/LambdaAttack.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public void start(String host, int port, int amount, int delay, String nameForma
5959
Bot bot;
6060
if (proxies != null) {
6161
Proxy proxy = proxies.get(i % proxies.size());
62+
LOGGER.info("USING PROXY " + proxy);
6263
bot = new Bot(account, proxy);
6364
} else {
6465
bot = new Bot(account);

core/src/main/java/com/github/games647/lambdaattack/gui/LoadNamesListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public void actionPerformed(ActionEvent actionEvent) {
3737
botManager.getThreadPool().submit(() -> {
3838
try {
3939
List<String> lines = Files.readAllLines(proxyFile.toPath());
40-
List<String> names = lines.stream().collect(Collectors.toList());
40+
List<String> names = lines.stream().distinct().collect(Collectors.toList());
4141

4242
LambdaAttack.getLogger().log(Level.INFO, "Loaded {0} names", names.size());
4343
botManager.setNames(names);

core/src/main/java/com/github/games647/lambdaattack/gui/LoadProxiesListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public void actionPerformed(ActionEvent actionEvent) {
4040
botManager.getThreadPool().submit(() -> {
4141
try {
4242
List<String> lines = Files.readAllLines(proxyFile.toPath());
43-
List<Proxy> proxies = lines.stream().map((line) -> {
43+
List<Proxy> proxies = lines.stream().distinct().map((line) -> {
4444
String host = line.split(":")[0];
4545
int port = Integer.parseInt(line.split(":")[1]);
4646

0 commit comments

Comments
 (0)