Save on shutdown and reload is now default to to false.

This commit is contained in:
cnaude 2015-12-01 22:28:21 -07:00
parent 860aa27f27
commit 1bb118bf45
2 changed files with 8 additions and 2 deletions

View File

@ -114,6 +114,7 @@ public class PurpleIRC extends JavaPlugin {
private File configFile;
public static long startTime;
public boolean identServerEnabled;
private boolean autoSave;
private final CaseInsensitiveMap<HashMap<String, String>> messageTmpl;
private final CaseInsensitiveMap<CaseInsensitiveMap<String>> ircHeroChannelMessages;
private final CaseInsensitiveMap<CaseInsensitiveMap<String>> ircHeroActionChannelMessages;
@ -349,7 +350,9 @@ public class PurpleIRC extends JavaPlugin {
for (PurpleBot ircBot : ircBots.values()) {
commandQueue.cancel();
ircBot.stopTailers();
ircBot.saveConfig(getServer().getConsoleSender());
if (autoSave) {
ircBot.saveConfig(getServer().getConsoleSender());
}
ircBot.quit();
}
ircBots.clear();
@ -382,7 +385,7 @@ public class PurpleIRC extends JavaPlugin {
/**
* Return the current debug mode status
*
*
* @return
*/
public boolean debugMode() {
@ -584,6 +587,7 @@ public class PurpleIRC extends JavaPlugin {
} catch (IOException | InvalidConfigurationException ex) {
logError(ex.getMessage());
}
autoSave = getConfig().getBoolean("save-on-shutdown", false);
overrideMsgCmd = getConfig().getBoolean("override-msg-cmd", false);
smsgAlias = getConfig().getString("smsg-alias", "/m");
smsgReplyAlias = getConfig().getString("smsg-reply-alias", "/r");

View File

@ -1,5 +1,7 @@
# Global configuration for PurpleIRC
# NOTE: If you make changes to this file while the server is running use "/irc reloadconfig" to load the changes into memory.
# Automatically save configurations on shutdown or reload
save-on-shutdown: false
# Check for updates
update-checker: true
# Update checker mode: stable or dev