Exemple #1
0
        public bool HandleMessage(IClient sender, string message)
        {
            if (user == null)
            {
                return(false);
            }

            if (sender.Nickname != user.Nickname)
            {
                return(false);
            }

            if (message == null || message.Length == 0)
            {
                MessageBox.Show(sender.RealName + " has left the conversation.", "User disconnected", MessageBoxButtons.OK);
                Terminate();
            }

            control.ReceiveMessage(message);

            return(true);
        }
Exemple #2
0
        public bool HandleMessage(IClient sender, string message)
        {
            if (user == null)
            {
                return(false);
            }

            if (sender.Nickname != user.Nickname)
            {
                return(false);
            }

            if (message == null || message.Length == 0)
            {
                MessageBox.Show(sender.Nickname + " HAS LEFT THE CONVERSATION", "USER DISCONNECTED", MessageBoxButtons.OK);
                Terminate();
            }

            control.ReceiveMessage(message);

            return(true);
        }