Skip to content

Commit

Permalink
Don't call the server APIs when already on the server
Browse files Browse the repository at this point in the history
(Why the hell didn't i change that in the first place)
  • Loading branch information
SIMULATAN committed Jan 4, 2021
1 parent ce7bcea commit 280110d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions BlackOnion-Bot/files/values.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"commandsExecuted": 83,
"messagesSent": 493,
"messagesSent": 499,
"runMode": "production",
"prefix": "?",
"notifyUsers": [],
"status": "dnd",
"activityType": "playing",
"activity": "test",
"bdayDelay": 1000,
"lines": 4254,
"lines": 4250,
"files": 67
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
import static com.sun.jna.platform.win32.WinReg.HKEY_LOCAL_MACHINE;

import java.awt.Color;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileReader;
import java.io.OutputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,13 @@ public static void init() {
static {
//not very secure, I know
counterUser = new BotUser("counter", "cuntUser", BotRole.ADMIN);
System.out.println(counterUser.getName() + ":" + counterUser.getPasssword());
botUsers.add(new BotUser("SIMULATAN", "simugamz1@gmail.com", "sim", BotRole.ADMIN));
botUsers.add(new BotUser("ManuelP", "mani", BotRole.ADMIN));
botUsers.add(new BotUser("test", "tester", BotRole.USER));
botUsers.add(counterUser);

try {
if (new File("files/discordusers").exists()) {
if (new File("files/discordusers").exists() && !Bot.isJarFile) {
for (String line : Files.readLines(new File("files/discordusers"), StandardCharsets.UTF_8)) {
String[] lineSplitted = line.split(":");
discordUsers.add(new DiscordUser(Long.valueOf(lineSplitted[0]), Boolean.valueOf(lineSplitted[1])));
Expand Down

0 comments on commit 280110d

Please sign in to comment.