protected void DowntimeExitAndRelaunch() { StealthBot.Instance.IsEnabled = false; if (StealthBot.Config.MaxRuntimeConfig.RelaunchAfterDowntime) { LavishScript.ExecuteCommand( String.Format("relay {0} \"TimedCommand 54000 run isboxer -launch \"{1}\"\"", "${SettingXML[InnerSpace.XML].Set[Remote].GetString[Name].Escape}", StealthBot.Config.MaxRuntimeConfig.CharacterSetToRelaunch)); } LavishScript.ExecuteCommand( "uplink TimedCommand 200 kill ${Session}"); StealthBot.OnSaveAndExit(this); }
protected void ExitAndRelaunch() { StealthBot.Instance.IsEnabled = false; if (StealthBot.Config.MaxRuntimeConfig.UseRelaunching) { LavishScript.ExecuteCommand( String.Format("relay {0} \"TimedCommand 600 run isboxer -launch \"{1}\"\"", "${SettingXML[InnerSpace.XML].Set[Remote].GetString[Name].Escape}", StealthBot.Config.MaxRuntimeConfig.CharacterSetToRelaunch)); } //This code might not be correct, but the idea is. We want to exit after 5 seconds so we don't undock forever, which is going to get things blown up in low/nullsec. LavishScript.ExecuteCommand("uplink TimedCommand 200 kill ${Session}"); StealthBot.OnSaveAndExit(this); }
public override bool OutOfFrameCleanup() { IsEnabled = false; //RemoveBookmarkAndCacheEntry the logging callback Tracing.RemoveCallback(); //Set the inframe cleanup flag and unset enabled Instance.IsEnabled = false; _isDoingInFrameCleanup = true; //Wait on the event if (!_isDisposed) { _InFrameCleanupResetEvent.WaitOne(); } //Block dispose until we can safely exit if (!_isDisposed) { _exitResetEvent.WaitOne(); } //Dispose any disposables if (ModuleManager != null) { var timeout = 450; while (!ModuleManager.OutOfFrameCleanup() && timeout-- > 0) { Thread.Sleep(10); } ModuleManager.Dispose(); } //Null the instance so there are no more references to this object. Instance = null; return(true); }