private void Session_PrivateMessaged(object sender, IrcDialogEventArgs e) { if (!this.IsServer) { if ((this.Target.Type == IrcTargetType.Channel && this.Target.Equals(e.To)) || (this.Target.Type == IrcTargetType.Nickname && this.Target.Equals(new IrcTarget(e.From)) && e.To.Type == IrcTargetType.Nickname)) { this.BeginInvoke(() => { bool attn = false; if (App.IsAttentionMatch(this.Session.Nickname, e.Text)) { attn = true; if (_window != null) { Interop.WindowHelper.FlashWindow(_window); } } this.Write("Default", e.From, e.Text, attn); if (this.Target.Type == IrcTargetType.Nickname) { if (e.From.Prefix != _prefix) { _prefix = e.From.Prefix; this.SetTitle(); } } if (this.Target.Type == IrcTargetType.Nickname) { Interop.WindowHelper.FlashWindow(_window); } }); } } }
private void Session_Noticed(object sender, IrcDialogEventArgs e) { if (this.IsServer) { this.BeginInvoke(() => { if (e.From is IrcPeer) { this.Write("Notice", (IrcPeer)e.From, e.Text, false); } else if (this.IsServer) { this.Write("Notice", e.Text); } }); } }