private void OnChatMessage(object sender, ChatMessageEventArgs e) { if (!PlayerHId.Contains(e.Username) && e.Username != Client.Avatar.Username) { Client.SendChatMessage(string.Format("{0}, {1}.", MessagePrefix, e.Username)); PlayerHId.Add(e.Username); } }
private static void OnChatMessage(object sender, ChatMessageEventArgs e) { //TODO: Give flexibilty for plugin dev to remove this. if (e.ClanName == null) Console.WriteLine("<[Lvl:{0}]{1}>: {2}", e.Packet.Level, e.Username, e.Message); else { Console.Write("<["); Console.ForegroundColor = ConsoleColor.DarkMagenta; Console.Write(e.ClanName); Console.ResetColor(); Console.Write("][Lvl:{0}]", e.Packet.Level); Console.WriteLine("{0}>: {1}", e.Username, e.Message); } }
protected internal virtual void OnChatMessage(ChatMessageEventArgs e) { if (ChatMessage != null) ChatMessage(this, e); }