private static void OnNewChatLogEntry(object sender, ChatLogEntryEvent chatLogEntryEvent) { // delegate event from chat log, not required to subsribe // this updates 100 times a second and only sends a line when it gets a new one if (sender == null) { return; } var chatLogEntry = chatLogEntryEvent.ChatLogEntry; }
private static void OnNewChatLogEntry(object sender, ChatLogEntryEvent chatLogEntryEvent) { // delegate event from chat log, not required to subsribe // this updates 100 times a second and only sends a line when it gets a new one if (sender == null) { return; } var chatLogEntry = chatLogEntryEvent.ChatLogEntry; try { LogPublisher.Process(chatLogEntry); } catch (Exception ex) { } }
private static void OnNewChatLogEntry(object sender, ChatLogEntryEvent chatLogEntryEvent) { // delegate event from chat log, not required to subsribe // this updates 100 times a second and only sends a line when it gets a new one if (sender == null) { return; } var chatLogEntry = chatLogEntryEvent.ChatLogEntry; try { /*if (chatLogEntry.Line.ToLower() .StartsWith("com:")) { LogPublisher.HandleCommands(chatLogEntry); }*/ LogPublisher.Process(chatLogEntry); } catch (Exception ex) { LogHelper.Log(Logger, ex, LogLevel.Error); } }
private void PluginHostOnNewChatLogEntry(object sender, ChatLogEntryEvent chatLogEntryEvent) { // delegate event from chat log, not required to subsribe // this updates 100 times a second and only sends a line when it gets a new one if (sender == null) { return; } var chatLogEntry = chatLogEntryEvent.ChatLogEntry; try { LogPublisher.Process(chatLogEntry); } catch (Exception ex) { //Logging.Log(LogManager.GetCurrentClassLogger(), "", ex); Notice = ex.Message; } }
public virtual void RaiseNewChatLogEntry(ChatLogEntry e) { var chatLogEntryEvent = new ChatLogEntryEvent(this, e); var handler = NewChatLogEntry; if (handler != null) { handler(this, chatLogEntryEvent); } }
public static void OnNewChatLogEntry(object sender, ChatLogEntryEvent chatLogEntryEvent) { try { // delegate event from chat log, not required to subsribe // this updates 100 times a second and only sends a line when it gets a new one if (sender == null || chatLogEntryEvent == null || chatLogEntryEvent.ChatLogEntry == null || !setupDone) { return; } string chatLogEntry = logStripper.Replace(chatLogEntryEvent.ChatLogEntry.Line, ""); if (testString.IsMatch(chatLogEntry)) { /* if (!encounterStarted) { tts("DBM Ready"); } else { * */ foreach (ActorEntity pActor in _agroList) { debug("Dump Mob: " + pActor.Name + " (" + (pActor.IsValid ? "valid" : "not valid") + ", " + (pActor.IsClaimed ? "claimed" : "not claimed") + ", by id: " + pActor.ClaimedByID + ")", DBMErrorLevel.Trace); } foreach (EnmityEntry enmity in playerEntity.EnmityEntries) { debug("Dump Enmity: " + enmity.Name + " ID: " + enmity.ID + "", DBMErrorLevel.Trace); } //} } if (chatLogEntry.StartsWith("@")) { tts(chatLogEntry.Trim('@')); } if (!encounterStarted) { return; } if (endString.IsMatch(chatLogEntry)) { foreach (ActorEntity pActor in _agroList) { handleRemoveEntry = 99; handleRemoveAgro(pActor, pActor); } } lock (accessControl) { dispatchChatLogEntry(chatLogEntry); if (youGain.regex != null && youGain.regex.IsMatch(chatLogEntry)) { chatLogEntry = youGain.regex.Replace(chatLogEntry, CurrentUser.Name + youGain.replacement); dispatchChatLogEntry(chatLogEntry); } else if (youLose.regex != null && youLose.regex.IsMatch(chatLogEntry)) { chatLogEntry = youLose.regex.Replace(chatLogEntry, CurrentUser.Name + youLose.replacement); dispatchChatLogEntry(chatLogEntry); } else if (youSuffer.regex != null && youSuffer.regex.IsMatch(chatLogEntry)) { chatLogEntry = youSuffer.regex.Replace(chatLogEntry, CurrentUser.Name + youSuffer.replacement); dispatchChatLogEntry(chatLogEntry); } else if (youRecover.regex != null && youRecover.regex.IsMatch(chatLogEntry)) { chatLogEntry = youRecover.regex.Replace(chatLogEntry, CurrentUser.Name + youRecover.replacement); dispatchChatLogEntry(chatLogEntry); } if (sealedOff != null && (DateTime.Now - started).Duration() > TimeSpan.FromSeconds(1) && sealedOff.IsMatch(chatLogEntry)) { handleRemoveEntryName = "Sealed Off"; endEncounter(); handleRemoveEntryName = ""; } } } catch(Exception ex) { debug("OnNewChatLogEntry", DBMErrorLevel.EngineErrors, ex); } }