コード例 #1
0
            internal ChatEnterCallback(MsgClientChatEnter msg)
            {
                ChatID   = msg.SteamIdChat;
                FriendID = msg.SteamIdFriend;

                ChatRoomType = msg.ChatRoomType;

                OwnerID = msg.SteamIdOwner;
                ClanID  = msg.SteamIdClan;

                ChatFlags = msg.ChatFlags;

                EnterResponse = msg.EnterResponse;
            }
コード例 #2
0
ファイル: Callbacks.cs プロジェクト: zhanggvi/SteamKit
            internal ChatEnterCallback(MsgClientChatEnter msg, byte[] payload)
            {
                ChatID   = msg.SteamIdChat;
                FriendID = msg.SteamIdFriend;

                ChatRoomType = msg.ChatRoomType;

                OwnerID = msg.SteamIdOwner;
                ClanID  = msg.SteamIdClan;

                ChatFlags = msg.ChatFlags;

                EnterResponse = msg.EnterResponse;

                NumChatMembers = msg.NumMembers;

                using (var ms = new MemoryStream(payload))
                {
                    // steamclient always attempts to read the chat room name, regardless of the enter response
                    ChatRoomName = ms.ReadNullTermString(Encoding.UTF8);

                    if (EnterResponse != EChatRoomEnterResponse.Success)
                    {
                        // the rest of the payload depends on a successful chat enter
                        return;
                    }

                    var memberList = new List <ChatMemberInfo>();

                    for (int x = 0; x < NumChatMembers; ++x)
                    {
                        var memberInfo = new ChatMemberInfo();
                        memberInfo.ReadFromStream(ms);

                        memberList.Add(memberInfo);
                    }

                    ChatMembers = new ReadOnlyCollection <ChatMemberInfo>(memberList);
                }
            }
コード例 #3
0
ファイル: Callbacks.cs プロジェクト: Starbucksbot/SteamBot
 internal ChatEnterCallback(SteamClient client, MsgClientChatEnter msg)
     : base(client)