public override void OnEvent(ChatEvent evnt) { ChatEvent chatEvent = ChatEvent.Raise(GlobalTargets.AllClients); chatEvent.Sender = evnt.Sender; chatEvent.Message = evnt.Message; chatEvent.Send(); }
private void OnChat(byte id, string message) { if (status != OnlineStatus.Ready || !Group.CanChat || message == "") { return; } if (!RegexHelper.IsValidChat(message)) { new Message("&eInvalid characters in chat message.").Send(this); } else if (message[0] == '/') { message = message.Remove(0, 1); try { CommandEvent(this, message, true); } catch (CommandException e) { new Message("&e" + e.Message).Send(this); } } else { ChatEvent.Raise(server, this, message); } }