C# Class SteamKit2.SteamFriends

This handler handles all interaction with other users on the Steam3 network.
Inheritance: ClientMsgHandler
Exibir arquivo Open project: Top-Cat/SteamBot Class Usage Examples

Public Methods

Method Description
AddFriend ( SteamID steamId ) : void

Sends a friend request to a user.

AddFriend ( string accountNameOrEmail ) : void

Sends a friend request to a user.

BanChatMember ( SteamID steamIdChat, SteamID steamIdMember ) : void

Bans the specified chat member from the given chat room.

GetClanAvatar ( SteamID steamId ) : byte[]

Gets a SHA-1 hash representing the clan's avatar.

GetClanByIndex ( int index ) : SteamID

Gets a clan SteamID by index.

GetClanCount ( ) : int

Gets the count of clans the local user is a member of.

GetClanName ( SteamID steamId ) : string

Gets the name of a clan.

GetClanRelationship ( SteamID steamId ) : EClanRelationship

Gets the relationship of a clan.

GetFriendAvatar ( SteamID steamId ) : byte[]

Gets a SHA-1 hash representing the friend's avatar.

GetFriendByIndex ( int index ) : SteamID

Gets a friend by index.

GetFriendCount ( ) : int

Gets the friend count of the local user.

GetFriendGamePlayed ( SteamID steamId ) : GameID

Gets the GameID of a friend playing a game.

GetFriendGamePlayedName ( SteamID steamId ) : string

Gets the game name of a friend playing a game.

GetFriendPersonaName ( SteamID steamId ) : string

Gets the persona name of a friend.

GetFriendPersonaState ( SteamID steamId ) : EPersonaState

Gets the persona state of a friend.

GetFriendRelationship ( SteamID steamId ) : EFriendRelationship

Gets the relationship of a friend.

GetPersonaName ( ) : string

Gets the local user's persona name.

GetPersonaState ( ) : EPersonaState

Gets the local user's persona state.

HandleMsg ( IPacketMsg packetMsg ) : void

Handles a client message. This should not be called directly.

JoinChat ( SteamID steamId ) : void

Attempts to join a chat room.

KickChatMember ( SteamID steamIdChat, SteamID steamIdMember ) : void

Kicks the specified chat member from the given chat room.

LeaveChat ( SteamID steamId ) : void

Attempts to leave a chat room.

RemoveFriend ( SteamID steamId ) : void

Removes a friend from your friends list.

RequestFriendInfo ( IEnumerable steamIdList, EClientPersonaStateFlag requestedInfo = defaultInfoRequest ) : void

Requests persona state for a list of specified SteamID. Results are returned in SteamFriends.PersonaStateCallback.

RequestFriendInfo ( SteamID steamId, EClientPersonaStateFlag requestedInfo = defaultInfoRequest ) : void

Requests persona state for a specified SteamID. Results are returned in SteamFriends.PersonaStateCallback.

SendChatMessage ( SteamID target, EChatEntryType type, string message ) : void

Sends a chat message to a friend.

SendChatRoomMessage ( SteamID steamIdChat, EChatEntryType type, string message ) : void

Sends a message to a chat room.

SetPersonaName ( string name ) : void

Sets the local user's persona name and broadcasts it over the network.

SetPersonaState ( EPersonaState state ) : void

Sets the local user's persona state and broadcasts it over the network.

getFriends ( ) : List

Private Methods

Method Description
HandleAccountInfo ( IPacketMsg packetMsg ) : void
HandleChatActionResult ( IPacketMsg packetMsg ) : void
HandleChatEnter ( IPacketMsg packetMsg ) : void
HandleChatInvite ( IPacketMsg packetMsg ) : void
HandleChatMemberInfo ( IPacketMsg packetMsg ) : void
HandleChatMsg ( IPacketMsg packetMsg ) : void
HandleFriendMsg ( IPacketMsg packetMsg ) : void
HandleFriendResponse ( IPacketMsg packetMsg ) : void
HandleFriendsList ( IPacketMsg packetMsg ) : void
HandlePersonaState ( IPacketMsg packetMsg ) : void
SteamFriends ( ) : System.Collections.Generic

Method Details

AddFriend() public method

Sends a friend request to a user.
public AddFriend ( SteamID steamId ) : void
steamId SteamID The SteamID of the friend to add.
return void

AddFriend() public method

Sends a friend request to a user.
public AddFriend ( string accountNameOrEmail ) : void
accountNameOrEmail string The account name or email of the user.
return void

BanChatMember() public method

Bans the specified chat member from the given chat room.
public BanChatMember ( SteamID steamIdChat, SteamID steamIdMember ) : void
steamIdChat SteamID The SteamID of chat room to ban the member from.
steamIdMember SteamID The SteamID of the member to ban from the chat.
return void

GetClanAvatar() public method

Gets a SHA-1 hash representing the clan's avatar.
public GetClanAvatar ( SteamID steamId ) : byte[]
steamId SteamID The SteamID of the clan to get the avatar of.
return byte[]

GetClanByIndex() public method

Gets a clan SteamID by index.
public GetClanByIndex ( int index ) : SteamID
index int The index.
return SteamID

GetClanCount() public method

Gets the count of clans the local user is a member of.
public GetClanCount ( ) : int
return int

GetClanName() public method

Gets the name of a clan.
public GetClanName ( SteamID steamId ) : string
steamId SteamID The clan SteamID.
return string

GetClanRelationship() public method

Gets the relationship of a clan.
public GetClanRelationship ( SteamID steamId ) : EClanRelationship
steamId SteamID The clan steamid.
return EClanRelationship

GetFriendAvatar() public method

Gets a SHA-1 hash representing the friend's avatar.
public GetFriendAvatar ( SteamID steamId ) : byte[]
steamId SteamID The SteamID of the friend to get the avatar of.
return byte[]

GetFriendByIndex() public method

Gets a friend by index.
public GetFriendByIndex ( int index ) : SteamID
index int The index.
return SteamID

GetFriendCount() public method

Gets the friend count of the local user.
public GetFriendCount ( ) : int
return int

GetFriendGamePlayed() public method

Gets the GameID of a friend playing a game.
public GetFriendGamePlayed ( SteamID steamId ) : GameID
steamId SteamID The steam id.
return GameID

GetFriendGamePlayedName() public method

Gets the game name of a friend playing a game.
public GetFriendGamePlayedName ( SteamID steamId ) : string
steamId SteamID The steam id.
return string

GetFriendPersonaName() public method

Gets the persona name of a friend.
public GetFriendPersonaName ( SteamID steamId ) : string
steamId SteamID The steam id.
return string

GetFriendPersonaState() public method

Gets the persona state of a friend.
public GetFriendPersonaState ( SteamID steamId ) : EPersonaState
steamId SteamID The steam id.
return EPersonaState

GetFriendRelationship() public method

Gets the relationship of a friend.
public GetFriendRelationship ( SteamID steamId ) : EFriendRelationship
steamId SteamID The steam id.
return EFriendRelationship

GetPersonaName() public method

Gets the local user's persona name.
public GetPersonaName ( ) : string
return string

GetPersonaState() public method

Gets the local user's persona state.
public GetPersonaState ( ) : EPersonaState
return EPersonaState

HandleMsg() public method

Handles a client message. This should not be called directly.
public HandleMsg ( IPacketMsg packetMsg ) : void
packetMsg IPacketMsg The packet message that contains the data.
return void

JoinChat() public method

Attempts to join a chat room.
public JoinChat ( SteamID steamId ) : void
steamId SteamID The SteamID of the chat room.
return void

KickChatMember() public method

Kicks the specified chat member from the given chat room.
public KickChatMember ( SteamID steamIdChat, SteamID steamIdMember ) : void
steamIdChat SteamID The SteamID of chat room to kick the member from.
steamIdMember SteamID The SteamID of the member to kick from the chat.
return void

LeaveChat() public method

Attempts to leave a chat room.
public LeaveChat ( SteamID steamId ) : void
steamId SteamID The SteamID of the chat room.
return void

RemoveFriend() public method

Removes a friend from your friends list.
public RemoveFriend ( SteamID steamId ) : void
steamId SteamID The SteamID of the friend to remove.
return void

RequestFriendInfo() public method

Requests persona state for a list of specified SteamID. Results are returned in SteamFriends.PersonaStateCallback.
public RequestFriendInfo ( IEnumerable steamIdList, EClientPersonaStateFlag requestedInfo = defaultInfoRequest ) : void
steamIdList IEnumerable A list of SteamIDs to request the info of.
requestedInfo EClientPersonaStateFlag The requested info flags.
return void

RequestFriendInfo() public method

Requests persona state for a specified SteamID. Results are returned in SteamFriends.PersonaStateCallback.
public RequestFriendInfo ( SteamID steamId, EClientPersonaStateFlag requestedInfo = defaultInfoRequest ) : void
steamId SteamID A SteamID to request the info of.
requestedInfo EClientPersonaStateFlag The requested info flags.
return void

SendChatMessage() public method

Sends a chat message to a friend.
public SendChatMessage ( SteamID target, EChatEntryType type, string message ) : void
target SteamID The target to send to.
type EChatEntryType The type of message to send.
message string The message to send.
return void

SendChatRoomMessage() public method

Sends a message to a chat room.
public SendChatRoomMessage ( SteamID steamIdChat, EChatEntryType type, string message ) : void
steamIdChat SteamID The SteamID of the chat room.
type EChatEntryType The message type.
message string The message.
return void

SetPersonaName() public method

Sets the local user's persona name and broadcasts it over the network.
public SetPersonaName ( string name ) : void
name string The name.
return void

SetPersonaState() public method

Sets the local user's persona state and broadcasts it over the network.
public SetPersonaState ( EPersonaState state ) : void
state EPersonaState The state.
return void

getFriends() public method

public getFriends ( ) : List
return List