Example #1
0
        public override void DataOperation()
        {
            base.DataOperation();

            foreach (var channel in _session.UserInfo.JoinedChannels)
            {
                channel.LeaveChannel(_session, _cmd.Reason);
            }
            ChatSessionManager.RemoveSession(_session);
        }
        protected override void OnDisconnected()
        {
            foreach (var channel in ChatChannelManager.Channels.Values)
            {
                channel.LeaveChannel(this, "Disconnected");
            }

            ChatSessionManager.RemoveSession(this);

            base.OnDisconnected();
        }
Example #3
0
        public override void DataOperation()
        {
            base.DataOperation();

            ChatChannelUser user;

            foreach (var channel in _session.UserInfo.JoinedChannels)
            {
                if (!channel.GetChannelUser(_session, out user))
                {
                    continue;
                }

                channel.RemoveBindOnUserAndChannel(user);
                channel.MultiCastLeave(user, _cmd.Reason);
            }
            ChatSessionManager.RemoveSession(_session);
        }
Example #4
0
        protected override void OnDisconnected()
        {
            foreach (var channel in ChatChannelManager.Channels.Values)
            {
                ChatChannelUser user;

                if (!channel.GetChannelUser(this, out user))
                {
                    continue;
                }

                channel.RemoveBindOnUserAndChannel(user);
                channel.MultiCastLeave(user, "Disconnected");
            }

            ChatSessionManager.RemoveSession(this);

            base.OnDisconnected();
        }