Example #1
0
        private void OnMsg(object sender, object packet)
        {
            Packet     P   = (Packet)packet;
            Wo1fSocket WS  = (Wo1fSocket)sender;
            Client     C   = Clients[WS];
            string     msg = P.Arguments[0];

            if (msg == "") //spam
            {
            }
            else
            {
                Clients.SendToAll(new Packet("Msg", new string[] { C.Name, msg }));
                TryChat(string.Format("[{0}] {1}", C.Name, msg));
            }
        }