private void client_UserSpoke(object sender, ChatMessageEventArgs e) { Match m = m_speakingTest.Match(e.Text); if (m.Success) { string contents = m.Groups["commandText"].Value; ProcessCommand(e, contents); } }
static void client_MessageSent(object sender, ChatMessageEventArgs e) { if (e.EventType == ChatEventType.Emote) { Console.WriteLine("<{0} {1}>", e.Username, e.Text); } else { Console.WriteLine("[{0}]: {1}", e.Username, e.Text); } }
public void AddSent(ChatMessageEventArgs e) { if (ready) { this.chatBox1.AddChat( new ChatNode(MyUsername + ": ", Color.Lime), new ChatNode(e.Text, Color.LightSlateGray) ); } else { outstanding.Enqueue(new Message { Direction = Direction.Sent, Args = e }); } }
public void AddReceived(ChatMessageEventArgs e) { if (ready) { this.chatBox1.AddChat( new ChatNode(e.Username, Color.SteelBlue), new ChatNode(": ", Color.SteelBlue), new ChatNode(e.Text, Color.LightSteelBlue) ); } else { outstanding.Enqueue(new Message { Args = e, Direction = Direction.Recv }); } }
private void ProcessCommand(ChatMessageEventArgs e, string contents) { string[] commandParts = contents.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); string command = null; string[] parameters = new string[commandParts.Length - 1]; if (commandParts.Length > 0) command = commandParts[0]; if (commandParts.Length > 1) { Array.Copy(commandParts, 1, parameters, 0, parameters.Length); } IJinxBotPrincipal commander = m_client.Database.FindUsers(e.Username).FirstOrDefault(); if (commander != null) { foreach (ICommandHandler handler in m_client.CommandHandlers) { if (handler.HandleCommand(commander, command, parameters)) break; } } }
void WhisperSent(object sender, ChatMessageEventArgs e) { chat.AddChat(new ChatNode("You whisper to ", CssClasses.WhisperHeader), new ChatNode(e.Username, CssClasses.WhisperOtherUser), new ChatNode(": ", CssClasses.WhisperHeader), new ChatNode(e.Text, CssClasses.WhisperText)); }
void Client_MessageSent(object sender, ChatMessageEventArgs e) { if (__messageSent != null) __messageSent.Call(_host.ClientHost, ConvObj(e)); }
void Client_UserEmoted(object sender, ChatMessageEventArgs e) { if (__userEmoted != null) __userEmoted.Call(_host.ClientHost, ConvObj(e)); }
void Client_UserSpoke(object sender, ChatMessageEventArgs e) { if (__userSpoke != null) __userSpoke.Call(_host.ClientHost, ConvObj(e)); }
void Client_WhisperReceived(object sender, ChatMessageEventArgs e) { if (__whisperReceived != null) __whisperReceived.Call(_host.ClientHost, ConvObj(e)); }
void UserEmoted(object sender, ChatMessageEventArgs e) { PostEvent(new ClientEvent { EventType = ClientEventType.UserEmoted, EventData = e }); }
static void client_UserSpoke(object sender, ChatMessageEventArgs e) { Console.WriteLine("{0}: {1}", e.Username, e.Text); }
void UserSpoke(object sender, ChatMessageEventArgs e) { PostEvent(new ClientEvent { EventData = e, EventType = ClientEventType.UserSpoke }); }
void UserEmoted(object sender, ChatMessageEventArgs e) { chat.AddChat(new ChatNode("<", CssClasses.EmoteText), new ChatNode(e.Username, CssClasses.EmoteOtherUsername), new ChatNode(string.Concat(" ", e.Text, ">"), CssClasses.EmoteText)); }
void WhisperReceived(object sender, ChatMessageEventArgs e) { chat.AddChat(new ChatNode(e.Username, CssClasses.WhisperOtherUser), new ChatNode(" whispers: ", CssClasses.WhisperHeader), new ChatNode(e.Text, CssClasses.WhisperText)); }
private void client_WhisperReceived(object sender, ChatMessageEventArgs e) { ProcessCommand(e, e.Text); }
void MessageSent(object sender, ChatMessageEventArgs e) { PostEvent(new ClientEvent { EventData = e, EventType = ClientEventType.MessageSent }); }
private void HandleChat(object sender, ChatMessageEventArgs e) { Match m = ClanSearch.Match(e.Text); if (m.Success) { string tag = m.Groups["tag"].Value; NoteTag(tag, e.Username, m_client.Client.ChannelName, e.Text); } }
private void client_WhisperReceived(object sender, ChatMessageEventArgs e) { Invokee del = delegate { lock (m_forms) { WhisperTab tab = null; if (!m_forms.ContainsKey(e.Username)) { tab = new WhisperTab(m_client); tab.OtherPerson = e.Username; tab.MyUsername = m_client.Client.UniqueUsername; m_profileDoc.AddDocument(tab); tab.TabText = tab.Text = e.Username; tab.Disposed += tab_Disposed; m_forms.Add(e.Username, tab); } else { tab = m_forms[e.Username]; } tab.AddReceived(e); } }; ISynchronizeInvoke sync = m_profileDoc as ISynchronizeInvoke; if (sync.InvokeRequired) sync.BeginInvoke(del, new object[0]); else del(); }
void UserSpoke(object sender, ChatMessageEventArgs e) { chat.AddChat(new ChatNode("[", CssClasses.SpeakBracketsOtherUsers), new ChatNode(e.Username, CssClasses.SpeakOtherUsername), new ChatNode("]: ", CssClasses.SpeakBracketsOtherUsers), new ChatNode(e.Text, CssClasses.SpeakText)); }
static void client_UserEmoted(object sender, ChatMessageEventArgs e) { Console.WriteLine("<{0} {1}>", e.Username, e.Text); }
void MessageSent(object sender, ChatMessageEventArgs e) { if (m_inChat) { chat.AddChat(new ChatNode("[", CssClasses.SpeakBracketsOtherUsers), new ChatNode(m_userName, CssClasses.SpeakOtherUsername), new ChatNode("]: ", CssClasses.SpeakBracketsOtherUsers), new ChatNode(e.Text, CssClasses.SpeakText)); } }
void WhisperReceived(object sender, ChatMessageEventArgs e) { PostEvent(new ClientEvent { EventType = ClientEventType.WhisperReceived, EventData = e }); }