make reconnect delay and chat queue delay in bot options instead of global
This commit is contained in:
@@ -75,7 +75,6 @@ public class Bot {
|
||||
this.port = botOption.port;
|
||||
|
||||
this.options = botOption;
|
||||
if (options.reconnectDelay == -1) options.reconnectDelay = config.reconnectDelay;
|
||||
|
||||
this.bots = bots;
|
||||
|
||||
|
||||
@@ -14,10 +14,6 @@ public class Configuration {
|
||||
|
||||
@Getter public Map<String, String> consolePrefixes;
|
||||
|
||||
@Getter public int reconnectDelay = 2000;
|
||||
|
||||
@Getter public int chatQueueDelay = 125;
|
||||
|
||||
@Getter public Map<String, String> keys;
|
||||
|
||||
@Getter public String weatherApiKey;
|
||||
@@ -114,7 +110,8 @@ public class Configuration {
|
||||
@Getter @Setter public boolean useCore = true;
|
||||
@Getter @Setter public boolean useChat = false;
|
||||
@Getter public boolean hasEssentials = true;
|
||||
@Getter public int reconnectDelay = -1;
|
||||
@Getter public int reconnectDelay = 2000;
|
||||
@Getter public boolean removeNamespaces = false;
|
||||
@Getter public int chatQueueDelay = 125;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ public class ChatPlugin extends Bot.Listener {
|
||||
public ChatPlugin (Bot bot) {
|
||||
this.bot = bot;
|
||||
|
||||
queueDelay = bot.config().chatQueueDelay();
|
||||
queueDelay = bot.options().chatQueueDelay();
|
||||
|
||||
this.commandSpyParser = new CommandSpyParser(bot);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user