private async Task <TwitchChatReplyMessage> RegisterUser(TwitchChatMessage twitchChatMessage) { LogOutput.LogInformation($"[Registration] User requested registration: {twitchChatMessage.TwitchUsername}, ID {twitchChatMessage.TwitchUserId}"); var registerDetails = twitchChatMessage.Message.ToLower().Replace(TwitchChatCommands.REGISTER, ""); if (!(registerDetails.Equals("glumanda") || registerDetails.Equals("schiggy") || registerDetails.Equals("bisasam") || registerDetails.Equals("pikachu") || registerDetails.Equals("evoli"))) { return(new TwitchChatReplyMessage(twitchChatMessage.TwitchUsername, TwitchChatResponse.REG_ERROR_NOTVALIDMSG)); } else { var response = await userService.RegisterUser(twitchChatMessage.TwitchUserId, twitchChatMessage.TwitchUsername, registerDetails); if (response.RegistrationSuccessfull) { return(new TwitchChatReplyMessage(twitchChatMessage.TwitchUsername, TwitchChatResponse.REG_SUCCESS)); } else { if (response.UserAlreadyRegistered) { return(new TwitchChatReplyMessage(twitchChatMessage.TwitchUsername, TwitchChatResponse.REG_ALREADY_REG)); } } return(new TwitchChatReplyMessage(twitchChatMessage.TwitchUsername, TwitchChatResponse.REG_ERROR_UNKNOWN)); } }
public void LogTrace(LogOutput logOutput, string message = "Trace Message:", [CallerMemberName] string memberName = "", [CallerFilePath] string sourceFilePath = "", [CallerLineNumber] int sourceLineNumber = 0) { string time = "[" + DateTime.Now.ToString("HH:mm:ss") + "]"; int timeLength = time.Length + 1; string callerMemberName = "CallerMemberName: " + memberName; string callerFilePath = "CallerFilePath: " + sourceFilePath; string callerLineNumber = "CallerLineNumber: " + sourceLineNumber; StringBuilder sb = new StringBuilder(); sb.AppendLine(message); sb.AppendLine(callerMemberName.PadLeft(callerMemberName.Length + timeLength)); sb.AppendLine(callerFilePath.PadLeft(callerFilePath.Length + timeLength)); sb.Append(callerLineNumber.PadLeft(callerLineNumber.Length + timeLength)); if (logOutput == LogOutput.File || logOutput == LogOutput.Both) { WriteLine($"{time} {sb.ToString()}"); } if (logOutput == LogOutput.Console || logOutput == LogOutput.Both) { ModMonitor?.Log(sb.ToString()); } }
// 开启输出 public static void EnableOutput(LogOutput output, bool value) { if (value) { _logOutputFlag |= (int)output; } else { _logOutputFlag ^= (int)output; } if ((_logOutputFlag & (int)LogOutput.File) != 0) { if (_logPath == null) { _logPath = Application.persistentDataPath + "/log/"; } if (!Directory.Exists(_logPath)) { Directory.CreateDirectory(_logPath); } string filePath = _logPath + string.Format(_logFileName, DateTime.Today.ToString("yyyyMMdd")); try { _fs = new FileStream(filePath, FileMode.Append, FileAccess.Write, FileShare.ReadWrite); _sw = new StreamWriter(_fs); } catch (Exception ex) { Exception(ex); } } }
private void AppendLogLine(string message) { LogOutput.Invoke((MethodInvoker) delegate { LogOutput.AppendText(message + "\r\n"); }); }
// GET: ApplicationTypes public Object LogData([FromBody] LogFile log) { LogOutput lop = new LogOutput(); string sJSONResponse = ""; DataTable dt_AppType = new DataTable(); string ServerDateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture); int a = 0; string olPackage_Query = ""; try { cnn.Open(); olPackage_Query = "insert into AgentCallTrack(CallUUid,CallData,CallTime,AgentList,AgentNumber,CallTransferStatus,CallRecordingUrl,ConversationDuration,TotalCallDuration,CreatedBy,CreatedOn,IsDeleted,IsActive) values('" + log.CallUUid + "','" + log.CallData + "','" + log.CallTime + "','" + log.AgentList + "','" + log.AgentNumber + "','" + log.CallTransferStatus + "','" + log.CallRecordingUrl + "','" + log.ConversationDuration + "','" + log.TotalCallDuration + "','" + log.CreatedBy + "','" + ServerDateTime + "',0,1)"; SqlCommand tm_cmd = new SqlCommand(olPackage_Query, cnn); a = Convert.ToInt32(tm_cmd.ExecuteNonQuery()); lop.status = "Success"; lop.value = ""; } catch (Exception ex) { lop.status = "Fail"; } finally { cnn.Close(); } sJSONResponse = JsonConvert.SerializeObject(lop); return(sJSONResponse); }
private void ClearLog() { LogOutput.Invoke((MethodInvoker) delegate { LogOutput.Text = ""; }); }
static void InitLog() { var settings = Settings.Default; var log = new LogOutput(settings.LOG_FILE, settings.LOG_INFO, settings.LOG_WARNING, settings.LOG_ERROR); ProgramOutput.RegisterOutput(log); }
public bool SaveToLocalFile(string insertStr) { // 取得当前的 "年", "月", "日" string yearStr = DateTime.Now.Year.ToString(); string monthStr = DateTime.Now.Month.ToString().PadLeft(2, '0'); string dayStr = DateTime.Now.Day.ToString().PadLeft(2, '0'); try { // 取得保存本地文件的路径名: "HistoryDataRecords\年\月" string modulPath = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName; int idx = -1; if (-1 != (idx = modulPath.LastIndexOf(@"\"))) { modulPath = modulPath.Remove(idx); } string full_path = modulPath + "\\HistoryDataRecords\\" + yearStr + "\\" + monthStr + "\\"; if (!Directory.Exists(full_path)) { Directory.CreateDirectory(full_path); } string full_name = full_path + "\\" + dayStr + ".log"; StreamWriter sw = new StreamWriter(full_name, true); sw.WriteLine(insertStr); sw.Close(); return(true); } catch (Exception ex) { LogOutput.LogAppend(ex.ToString()); return(false); } }
private async Task <TwitchChatReplyMessage> ParticipateInBossFight(TwitchChatMessage twitchChatMessage) { LogOutput.LogInformation($"[Bossfight] User requested to particpate in boss fight: {twitchChatMessage.TwitchUsername}, ID {twitchChatMessage.TwitchUserId}"); TransferTwitchuser user_entered_battle = await userService.GetUser(twitchChatMessage.TwitchUserId); if (user_entered_battle == null) { LogOutput.LogInformation($"[Bossfight] User is not registered: {twitchChatMessage.TwitchUsername}, ID {twitchChatMessage.TwitchUserId}"); return(new TwitchChatReplyMessage(twitchChatMessage.TwitchUsername, "Du bist noch nicht registriert. Schreibe !registrieren [Glumanda/Schiggy/Bisasam/Pikachu/Evoli] in den Chat, um dich zu registrieren.")); } if (!bossService.IsBattleReady()) { LogOutput.LogInformation($"[Bossfight] Battle is not ready: {twitchChatMessage.TwitchUsername}, ID {twitchChatMessage.TwitchUserId}"); return(new TwitchChatReplyMessage(twitchChatMessage.TwitchUsername, "Aktuell streift kein Pokemon durch die Gegend. Versuche es in " + bossService.GetRemainingCoolDown().Minutes + " Minute(n) und " + bossService.GetRemainingCoolDown().Seconds + " Sekunde(n) erneut."));; } if (!bossService.IsBattleWaiting()) { LogOutput.LogInformation($"[Bossfight] Creating a new boss round: {twitchChatMessage.TwitchUsername}, ID {twitchChatMessage.TwitchUserId}"); bossService.StartNewBattleRound(); chatOutputService.SendMessage(twitchChatMessage.TwitchUsername + " hat ein wildes Pokemon entdeckt! Schreibe !boss in den Chat, um ihm im Kampf beizustehen."); } bossService.AddUserToCurrentRound(user_entered_battle); LogOutput.LogInformation($"[Bossfight] User entered bossfight: {twitchChatMessage.TwitchUsername}, ID {twitchChatMessage.TwitchUserId}"); return(null); }
/// <summary> /// Output log entries into rich text box /// </summary> /// <param name="type"></param> /// <param name="msg"></param> private void UpdateLog(LogType type, string msg = "") { var outputTxt = string.Format("{0} - {1}", DateTime.Now.ToTimeStamp(), msg); Paragraph paragraph = new Paragraph(new Run(outputTxt)); paragraph.Margin = new Thickness(0); // remove spacing between paragraphs switch (type) { case LogType.BeginEnd: paragraph.Foreground = Brushes.Gray; break; case LogType.Minor: paragraph.Foreground = Brushes.Gray; break; case LogType.Error: paragraph.Foreground = Brushes.Red; break; case LogType.Highlight: paragraph.FontWeight = FontWeights.Bold; break; default: paragraph.Foreground = Brushes.Black; break; } LogOutput.Document.Blocks.Add(paragraph); LogOutput.ScrollToEnd(); }
static void SendTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { lock (SendBufferQueue) { int bufferCount = SendBufferQueue.Count; if (0 != bufferCount) { try { string dataStr = string.Empty; for (int i = 0; i < bufferCount; i++) { dataStr = SendBufferQueue.Dequeue(); TcpSocketCommunicator reporter = new TcpSocketCommunicator(); reporter.Connect(RelayServerInfo.Host_name, RelayServerInfo.Port_num, 5000); reporter.Send(Encoding.UTF8.GetBytes(dataStr)); reporter.Close(); //LogOutput.LogAppend("SendTimer_Elapsed Send : " + dataStr); Thread.Sleep(10); } } catch (Exception ex) { System.Diagnostics.Trace.WriteLine(ex.ToString()); LogOutput.LogAppend(ex.ToString()); } } } SendTimer.Start(); }
/// <summary> /// Handler for SystemTypeComboBox SelectionChanged event /// </summary> private void SystemTypeComboBoxSelectionChanged(object sender, SelectionChangedEventArgs e) { LogOutput.VerboseLogLn($"Changed system to: {(SystemTypeComboBox.SelectedItem as KnownSystemComboBoxItem).Name}"); PopulateMediaType(); GetOutputNames(false); EnsureDiscInformation(); }
/// <summary> /// Handler for ProtectionProgress ProgressChanged event /// </summary> private void ProgressUpdated(object sender, ProtectionProgress value) { string message = $"{value.Percentage * 100:N2}%: {value.Filename} - {value.Protection}"; StatusLabel.Content = message; LogOutput.VerboseLogLn(message); }
/// <summary> /// Handler for StartStopButton Click event /// </summary> private void StartStopButtonClick(object sender, RoutedEventArgs e) { // Dump or stop the dump if ((string)StartStopButton.Content == Interface.StartDumping) { StartDumping(); } else if ((string)StartStopButton.Content == Interface.StopDumping) { LogOutput.VerboseLogLn("Canceling dumping process..."); Env.CancelDumping(); CopyProtectScanButton.IsEnabled = true; if (Env.Options.EjectAfterDump == true) { LogOutput.VerboseLogLn($"Ejecting disc in drive {Env.Drive.Letter}"); Env.EjectDisc(); } if (Options.DICResetDriveAfterDump) { LogOutput.VerboseLogLn($"Resetting drive {Env.Drive.Letter}"); Env.ResetDrive(); } } // Reset the progress bar LogOutput.ResetProgressBar(); }
/// <summary> /// Writes an event to the log specified in the LogOutput property. Safe to call if LogOutput is null. /// </summary> /// <param name="level">The severity of the message.</param> /// <param name="msg">The message to log, can be a formatted string.</param> /// <param name="args">The arguments to the formatted message string, if any.</param> protected void Log(LogLevel level, string msg, params object[] args) { lock (logLock) { if (LogOutput != null) { StackFrame frame = new StackTrace().GetFrame(1); MethodBase mb = frame.GetMethod(); // if the previous stack frame is from an invoked method or a non-overridden method, it's a system generated log event, // otherwise it's a user defined log event. string source = mb.Name.Equals("CallSite.Target") || mb.DeclaringType == typeof(JsonServiceBase) ? "System" : "User"; try { LogOutput.Write("{0:MM/dd/yyyy HH:mm:ss}\t{1}\t{2}\t", DateTime.Now, source, level); LogOutput.WriteLine(msg, args); } catch (FormatException) { LogOutput.WriteLine("String formatting error for log entry '{0}'", msg); } catch (Exception) { // So how do you log errors when the error log is the problem? } finally { LogOutput.Flush(); } } } }
private async Task <TwitchChatReplyMessage> ChallengeNPC(TwitchChatMessage twitchChatMessage) { LogOutput.LogInformation($"[AV-Fight] User requested to challenge a npc: {twitchChatMessage.TwitchUsername}, ID {twitchChatMessage.TwitchUserId}"); var user = await userService.GetUser(twitchChatMessage.TwitchUserId); var avName = twitchChatMessage.GetTargetUserName(); if (null == user) { return(new TwitchChatReplyMessage(twitchChatMessage.TwitchUsername, "Du bist noch nicht registriert. Schreibe !registrieren [Glumanda/Schiggy/Bisasam/Pikachu/Evoli] in den Chat, um dich zu registrieren.")); } if (!user.HasFullFightingTeam()) { return(new TwitchChatReplyMessage(twitchChatMessage.TwitchUsername, "Du hast noch kein vollständiges Team, fange weitere Pokemon!")); } if (await userService.CanFightAcievement(user.Id, avName)) { var virtualNPC = await achievementService.CreateVirtualNPC(avName); chatOutputService.SendMessage($"{user.DisplayName} fordert {virtualNPC.DisplayName} heraus!"); await userfightService.StartNPCFight(user, virtualNPC, avName); } else { return(new TwitchChatReplyMessage(twitchChatMessage.TwitchUsername, "Du hast dieses Achievement noch nicht freigeschaltet oder musst noch etwas bis zur nächsten Herausforderung warten!")); } return(null); }
/// <summary> /// Adds a new output to log to. Can't be removed due to some limitations. /// </summary> /// <param name="output"></param> public static void AddOutput(LogOutput output) { if (output != null) { outputs.Add(output); } }
public async Task JsonOutput_ShouldCreateNewProject() { CommandLineArgs.Add("--outputFormat=json"); Repository.ProjectGroups.FindByName(Arg.Any <string>()).Returns(new ProjectGroupResource { Name = groupName }); Repository.Lifecycles.FindOne(Arg.Any <Func <LifecycleResource, bool> >()) .Returns(new LifecycleResource { Id = Guid.NewGuid().ToString(), Name = lifecycleName }); Repository.Projects.Create(Arg.Any <ProjectResource>()) .Returns(new ProjectResource { Id = projectId, Name = projectName }); await createProjectCommand.Execute(CommandLineArgs.ToArray()).ConfigureAwait(false); string logoutput = LogOutput.ToString(); JsonConvert.DeserializeObject(logoutput); logoutput.Should().Contain(projectId); logoutput.Should().Contain(projectName); logoutput.Should().Contain(groupName); logoutput .Replace(Environment.NewLine, String.Empty) .Replace(" ", string.Empty) .Replace("\"", string.Empty) .Should().Contain("NewGroupCreated:false"); }
public static bool TryResolve(TypeReference typeReference, out TypeDefinition typeDefinition) { try { if (_resolvedTypes.ContainsKey(typeReference.FullName)) { typeDefinition = _resolvedTypes[typeReference.FullName]; return(true); } if (!_unresolvableTypes.Contains(typeReference.FullName)) { typeDefinition = typeReference.Resolve(); _resolvedTypes.Add(typeReference.FullName, typeDefinition); return(true); } else { typeDefinition = null; return(false); } } catch (Exception ex) { LogOutput.LogAnalysisMessage("ERROR Failed to resolve type " + typeReference.FullName); typeDefinition = null; _unresolvableTypes.Add(typeReference.FullName); return(false); } }
private void DispatcherTimer_Tick(object sender, EventArgs e) { // set Run button label RunButton.Content = ControlPressed ? "Debug" : "Run"; LogOutput.AppendText(_messageUpdate); _messageUpdate = ""; if (_runningBacktest) { Progress.Visibility = Visibility.Visible; Progress.Value = _currentAlgorithm.Progress; } else if (_runningOptimization) { Progress.Visibility = Visibility.Visible; Progress.Value = _optimizer.Progress; } else { Progress.Visibility = Visibility.Hidden; } }
/// <summary> /// 写入数据库 /// </summary> /// <param name="cmdStr"></param> /// <returns></returns> protected static bool WriteToDB(string cmdStr) { try { if (E_DB_CONNECT_MODE.DIRECT == Db_connect_mode) { // 直接写入数据库 DBConnectMySQL mysql_object = new DBConnectMySQL(DbServerInfo); mysql_object.ExecuteMySqlCommand(cmdStr); } else if (E_DB_CONNECT_MODE.RELAY == Db_connect_mode) { // 通过中继服务器 lock (SendBufferQueue) { SendBufferQueue.Enqueue(cmdStr); //LogOutput.LogAppend("WriteToDB SendBufferQueue.Enqueue : " + cmdStr); } } } catch (Exception ex) { System.Diagnostics.Trace.WriteLine(ex.ToString()); LogOutput.LogAppend(ex.ToString()); return(false); } return(true); }
private void CancelButton_Click(object sender, EventArgs e) { if (backgroundWorker1.IsBusy) { DialogResult dialogResult = MessageBox.Show("Вы действительно хотите отменить создание бэкапа?", "Отмена операции", MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { backgroundWorker1.CancelAsync(); stoped = true; LogOutput.AppendText(Environment.NewLine + "Создание бэкапа отменено"); if (!Program.FinishedBackups.Contains(Program.backupTime)) { Program.FinishedBackups.Add(Program.backupTime); } if (Properties.Settings.Default.bWautoclose) { Close(); } } } else { Close(); } }
public void Log(string message) { var now = DateTime.Now.TimeOfDay; LogOutput.AppendText($"{now}: {message}{Environment.NewLine}"); LogOutput.ScrollToEnd(); }
/// <summary> /// Constructor /// </summary> public LogViewModel(LogOutput parent) { Parent = parent; // Add handlers Parent.OutputViewer.SizeChanged += OutputViewerSizeChanged; Parent.Output.TextChanged += OnTextChanged; Parent.ClearButton.Click += OnClearButton; Parent.SaveButton.Click += OnSaveButton; // Update the internal state var document = new FlowDocument() { Background = new SolidColorBrush(Color.FromArgb(0xFF, 0x20, 0x20, 0x20)) }; _paragraph = new Paragraph(); document.Blocks.Add(_paragraph); Parent.Output.Document = document; // TODO: Can we dynamically add matchers *only* during dumping? _matchers = new List <Matcher?>(); AddAaruMatchers(); AddDiscImageCreatorMatchers(); logQueue = new ProcessingQueue <LogLine>(ProcessLogLine); }
/// <summary> /// Scan and show copy protection for the current disc /// </summary> private async void ScanAndShowProtection() { // Determine current environment, just in case if (Env == null) { Env = DetermineEnvironment(); } // Pull the drive letter from the UI directly, just in case var drive = DriveLetterComboBox.SelectedItem as Drive; if (drive.Letter != default(char)) { LogOutput.VerboseLogLn($"Scanning for copy protection in {drive.Letter}"); var tempContent = StatusLabel.Content; StatusLabel.Content = "Scanning for copy protection... this might take a while!"; StartStopButton.IsEnabled = false; MediaScanButton.IsEnabled = false; CopyProtectScanButton.IsEnabled = false; var progress = new Progress <ProtectionProgress>(); progress.ProgressChanged += ProgressUpdated; (bool success, string output) = await Validators.RunProtectionScanOnPath(drive.Letter + ":\\", progress); // If SmartE is detected on the current disc, remove `/sf` from the flags for DIC only if (Env.Options.InternalProgram == InternalProgram.DiscImageCreator && output.Contains("SmartE")) { ((DiscImageCreator.Parameters)Env.Parameters)[DiscImageCreator.Flag.ScanFileProtect] = false; LogOutput.VerboseLogLn($"SmartE detected, removing {DiscImageCreator.FlagStrings.ScanFileProtect} from parameters"); } if (!LogPanel.IsExpanded) { if (success) { MessageBox.Show(output, "Detected Protection(s)", MessageBoxButton.OK, MessageBoxImage.Information); } else { MessageBox.Show("An exception occurred, see the log for details", "Error!", MessageBoxButton.OK, MessageBoxImage.Error); } } if (success) { LogOutput.LogLn($"Detected the following protections in {drive.Letter}:\r\n\r\n{output}"); } else { LogOutput.ErrorLogLn($"Path could not be scanned! Exception information:\r\n\r\n{output}"); } StatusLabel.Content = tempContent; StartStopButton.IsEnabled = ShouldEnableDumpingButton(); MediaScanButton.IsEnabled = true; CopyProtectScanButton.IsEnabled = true; } }
public async Task JsonFormat_ShouldBeWellFormed() { Repository.Projects.FindByNames(Arg.Any <IEnumerable <string> >()).Returns(new List <ProjectResource> { new ProjectResource { Name = "ProjectA", Id = "projectaid" }, new ProjectResource { Name = "ProjectB", Id = "projectbid" }, new ProjectResource { Name = "Version controlled project", Id = VersionControlledProjectId } }); Repository.Releases.FindMany(Arg.Any <Func <ReleaseResource, bool> >()).Returns(new List <ReleaseResource> { new ReleaseResource { ProjectId = "projectaid", Version = "1.0", Assembled = DateTimeOffset.MinValue, ReleaseNotes = "Release Notes 1" }, new ReleaseResource { ProjectId = "projectaid", Version = "2.0", Assembled = DateTimeOffset.MaxValue, ReleaseNotes = "Release Notes 2" }, new ReleaseResource { ProjectId = "projectaid", Version = "whateverdockerversion", Assembled = DateTimeOffset.MaxValue, ReleaseNotes = "Release Notes 3" }, new ReleaseResource { ProjectId = VersionControlledProjectId, Version = "1.2.3", Assembled = DateTimeOffset.MaxValue, ReleaseNotes = "Version controlled release notes", VersionControlReference = new VersionControlReferenceResource { GitCommit = "87a072ad2b4a2e9bf2d7ff84d8636a032786394d", GitRef = "main" } } }); CommandLineArgs.Add("--project=ProjectA"); CommandLineArgs.Add("--outputFormat=json"); await listReleasesCommand.Execute(CommandLineArgs.ToArray()).ConfigureAwait(false); this.Assent(LogOutput.ToString().ScrubApprovalString()); }
/// <summary> /// Adds a new output to log to. Can't be removed due to some limitations. /// </summary> /// <param name="output"></param> public static void AddOutput(LogOutput output, LogLevel Level) { if (output != null) { outputs.Add(output); output.LogLevel = Level; } }
/// <summary> /// Handler for Result ProgressChanged event /// </summary> private void ProgressUpdated(object sender, string value) { try { value = value ?? string.Empty; LogOutput.LogLn(value); } catch { } }
public static void Initialize(bool verbose, bool logChat) { if (_output != null) { throw new InvalidOperationException("A logger has already been created"); } _output = new LogOutput(verbose ? LogEventLevel.Verbose : LogEventLevel.Information, logChat); }
private async Task <TwitchChatReplyMessage> ParticipateInUserFight(TwitchChatMessage twitchChatMessage, bool teamFight) { LogOutput.LogInformation($"[Userfight] User requested to participate in an user fight: {twitchChatMessage.TwitchUsername}, ID {twitchChatMessage.TwitchUserId}"); var challengingUser = await userService.GetUser(twitchChatMessage.TwitchUserId); var challengingUserName = twitchChatMessage.TwitchUsername; var challengedUser = await userService.GetUserByName(twitchChatMessage); var challengedUserName = twitchChatMessage.GetTargetUserName(); //Not registered var usersExisting = UserfightCheckService.CheckUsersExisting(challengingUser, challengingUserName, challengedUser, challengedUserName); if (null != usersExisting) { return(usersExisting); } //Full fighting team var fullFightingTeam = UserfightCheckService.CheckUserHasTeam(challengingUser, challengedUser, teamFight); if (null != fullFightingTeam) { return(fullFightingTeam); } //Cooldown var usersOnCooldown = UserfightCheckService.CheckUserTimeout(challengingUser, challengedUser, new TimeSpan(0, 10, 0)); if (null != usersOnCooldown) { return(usersOnCooldown); } //Challenger already challenging another person if (userfightService.User_IsChallenger(challengingUser)) { return(new TwitchChatReplyMessage(challengedUser.DisplayName, " du hast bereits einen anderen Kampf gestartet. Bitte warte, bis dieser Kampf zu Ende ist.")); } //Check if the challenged player already is challenged by the challenger if (userfightService.User_IsChallengedBy(challengingUser, challengedUser)) { chatOutputService.SendMessage(challengingUser.DisplayName + " hat die Herausforderung von " + challengedUser.DisplayName + " angenommen!"); await userfightService.StartFight(challengingUser, challengedUser); } else { chatOutputService.SendMessage(challengingUser.DisplayName + " fordert " + challengedUser.DisplayName + " zu einem Duell heraus! Schreibe !fight " + challengingUser.DisplayName + ", um den Kampf anzunehmen!"); //None of the users are in a fight or waiting for each other. Start a new fight round. userfightService.CreateFightRound(challengingUser, challengedUser, teamFight); } return(null); }
public TbLogTrace(LogOutput o) { out_log = o; }