mirror of
https://github.com/cnaude/PurpleIRC-spigot.git
synced 2025-02-27 08:51:22 +01:00
Only stop IdentServer when it has successfully started. #45
This commit is contained in:
parent
d63bb01940
commit
70d037e450
@ -128,6 +128,7 @@ public class PurpleIRC extends JavaPlugin {
|
|||||||
private File configFile;
|
private File configFile;
|
||||||
public static long startTime;
|
public static long startTime;
|
||||||
public boolean identServerEnabled;
|
public boolean identServerEnabled;
|
||||||
|
public boolean identServerStarted = false;
|
||||||
private boolean autoSave;
|
private boolean autoSave;
|
||||||
public boolean pingFixTemplate;
|
public boolean pingFixTemplate;
|
||||||
private final CaseInsensitiveMap<HashMap<String, String>> messageTmpl;
|
private final CaseInsensitiveMap<HashMap<String, String>> messageTmpl;
|
||||||
@ -316,6 +317,7 @@ public class PurpleIRC extends JavaPlugin {
|
|||||||
logInfo("Starting Ident Server ...");
|
logInfo("Starting Ident Server ...");
|
||||||
try {
|
try {
|
||||||
IdentServer.startServer();
|
IdentServer.startServer();
|
||||||
|
identServerStarted = true;
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
logError(ex.getMessage());
|
logError(ex.getMessage());
|
||||||
}
|
}
|
||||||
@ -418,7 +420,7 @@ public class PurpleIRC extends JavaPlugin {
|
|||||||
}
|
}
|
||||||
ircBots.clear();
|
ircBots.clear();
|
||||||
}
|
}
|
||||||
if (identServerEnabled) {
|
if (identServerEnabled && identServerStarted) {
|
||||||
logInfo("Stopping Ident Server");
|
logInfo("Stopping Ident Server");
|
||||||
try {
|
try {
|
||||||
IdentServer.stopServer();
|
IdentServer.stopServer();
|
||||||
|
Loading…
Reference in New Issue
Block a user