= Fixed 'send immediate'
This commit is contained in:
@@ -86,6 +86,8 @@ PollVoteNotValidVote=%s That's not a vaild vote!
|
||||
PollVoteSuccess=You successfully voted for
|
||||
|
||||
[CommandShutdown]
|
||||
ShutdownSafe=Shutting down, but first syncing database and finishing current threads.
|
||||
ShutdownUnsafe=Shutting down and immediately and abandoning all threads without sync.
|
||||
ShutdownInfo=Stops kitty. `-s` or `safe` as an argument attempts to sync off the database before shutdown.
|
||||
|
||||
[CommandTeey]
|
||||
|
||||
@@ -41,16 +41,21 @@ public class CommandShutdown extends Command
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(isSafe)
|
||||
{
|
||||
// Force upkeep, this works so long as upkeep is on the main thread.
|
||||
res.CallImmediate(LocStrings.Stub("ShutdownSafe"));
|
||||
DatabaseManager.instance.Upkeep();
|
||||
GlobalLog.Error(LogFilter.Command, "Forced shutdown, database synced before abandoning threads.");
|
||||
GlobalLog.Warn(LogFilter.Command, LocStrings.Lookup("ShutdownSafe"));
|
||||
|
||||
System.exit(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
GlobalLog.Error(LogFilter.Command, "Forced immediate shutdown, threads abandoned without sync.");
|
||||
res.CallImmediate(LocStrings.Stub("ShutdownUnsafe"));// "`Shutting down and immediately and abandoning all threads without sync.`");
|
||||
GlobalLog.Warn(LogFilter.Command, LocStrings.Lookup("ShutdownSafe"));
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ public class Response
|
||||
}
|
||||
else
|
||||
{
|
||||
event.getChannel().sendMessage(toRespondWith);
|
||||
event.getChannel().sendMessage(toRespondWith).complete();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user