C# Class SteamKit2.SteamFriends

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

Méthodes publiques

Méthode 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

Méthode 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 méthode

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

AddFriend() public méthode

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

BanChatMember() public méthode

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.
Résultat void

GetClanAvatar() public méthode

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.
Résultat byte[]

GetClanByIndex() public méthode

Gets a clan SteamID by index.
public GetClanByIndex ( int index ) : SteamID
index int The index.
Résultat SteamID

GetClanCount() public méthode

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

GetClanName() public méthode

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

GetClanRelationship() public méthode

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

GetFriendAvatar() public méthode

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.
Résultat byte[]

GetFriendByIndex() public méthode

Gets a friend by index.
public GetFriendByIndex ( int index ) : SteamID
index int The index.
Résultat SteamID

GetFriendCount() public méthode

Gets the friend count of the local user.
public GetFriendCount ( ) : int
Résultat int

GetFriendGamePlayed() public méthode

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

GetFriendGamePlayedName() public méthode

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

GetFriendPersonaName() public méthode

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

GetFriendPersonaState() public méthode

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

GetFriendRelationship() public méthode

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

GetPersonaName() public méthode

Gets the local user's persona name.
public GetPersonaName ( ) : string
Résultat string

GetPersonaState() public méthode

Gets the local user's persona state.
public GetPersonaState ( ) : EPersonaState
Résultat EPersonaState

HandleMsg() public méthode

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

JoinChat() public méthode

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

KickChatMember() public méthode

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.
Résultat void

LeaveChat() public méthode

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

RemoveFriend() public méthode

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

RequestFriendInfo() public méthode

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.
Résultat void

RequestFriendInfo() public méthode

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.
Résultat void

SendChatMessage() public méthode

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.
Résultat void

SendChatRoomMessage() public méthode

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.
Résultat void

SetPersonaName() public méthode

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

SetPersonaState() public méthode

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

getFriends() public méthode

public getFriends ( ) : List
Résultat List