private void Listen(IWorld source, MRMChatEventArgs args) { if (args.Channel != 0) Host.Object.Say(args.Text + " @ " + args.Channel); if (args.Channel == CHAN && args.Text.Equals(PING)) Host.Object.Say(PING_ACK, CHAN); }
private void Listen(IWorld source, MRMChatEventArgs args) { if (args.Channel != 0) { Host.Object.Say(args.Text + " @ " + args.Channel); } if (args.Channel == CHAN && args.Text.Equals(PING)) { Host.Object.Say(PING_ACK, CHAN); } }
private void Listen(IWorld source, ChatEventArgs args) { if (!args.Text.StartsWith(SELECT) || !args.Sender.Equals(Host.Object.Root)) return; string[] msg = args.Text.Split(','); if (msg.Length == 3 && msg[1].Equals(_name)) { float glow; if (float.TryParse(msg[2], out glow)) foreach (IObjectMaterial mat in Host.Object.Materials) //mat.Color = glow > 0 ? Color.White : Color.DarkGray; mat.Bright = glow > 0; } }
void World_OnChat(IWorld sender, ChatEventArgs e) { if (e.Sender is IAvatar) { if (!e.Text.Contains("hic!")) { e.Text = e.Text.Replace("s", "sh"); e.Text = e.Text.Replace("S", "Sh"); e.Text += " ...hic!"; Host.Object.Say(e.Text); } } if (e.Sender is IObject) { // Ignore } }
private void TriggerChat(IWorld world, ChatEventArgs args) { _world = world; Root.QueueEvent(() => _OnChat(this, args)); }