Difference between revisions of "User object"

From StealthBot Wiki Backup
Jump to: navigation, search
m (Game property: Added example to clear up confusion on actual orientation)
 
m (1 revision imported)
 
(No difference)

Latest revision as of 08:20, 1 December 2017

This object exposes information on a user in the current Battle.net channel at the time of access.

History

This object was added in StealthBot version 2.7 by Eric to create an object-oriented experience in scripting.

How to use

Example: Put the number of users in the channel into the Count variable.

Count = Channel.Users.Count

Example: Get the value of a property of a user in channel at index Index.

Value = Channel.Users(Index).PropertyName

Properties

List of properties

Name property

This property returns the person's actual name on Battle.net.

DisplayName property

This property returns the person's displayed name on Battle.net. This is affected by nameing conventions.

CharacterName property

This property returns the Diablo II character name if available for this user.

Game property

This property returns the person's 4-character product code oriented backwards. (WAR3, W3XP, D2DV, etc)

Ping property

This property returns the person's numeric ping at logon, in milliseconds.

Flags property

This property returns the person's Battle.net user flags within the channel.

Stats property

This property returns a UserStats object for the user.

Statstring property

This property returns a string containing the parsed statstring, also available as ChannelUserObj.UserStats.ToString.

JoinTime property

This property returns a time and date object for the time this user entered the channel. If the bot did not see the user join, this is the time the bot joined.

LastTalkTime property

This property returns a time and date object for the last time this user has talked. If the user has not talked, this is the time they joined.

Clan property

String representing the clan (if any) the user is in. Clan-less users will be represented with am empty string.

IsOperator property

This property returns a boolean which determines if the user has flags 0x02 (channel operator, hammer, etc).

IsSquelched property

This property returns a boolean which determines if the user has flags 0x20 (ignored a.k.a. squelched).

IsUsingDII property

This property returns True if the user is on Diablo II or its expansion, and False otherwise.

IsUsingWarIII property

This property returns True if the user is on WarCraft III or its expansion, and False otherwise.

PassedChannelAuth property

This property returns True if the user has passed the channel password check when the bot has one set.

PendingBan property

This property returns True if the user is planned to be banned by this bot.

Functions

List of functions

TimeInChannel function

This function returns the number of seconds since this user joined the channel. If the bot did not see the user join, the number of seconds will be the bot's own seconds since join.

TimeSinceTalk function

This function returns the number of seconds since this user last talked. If the bot did not see the user talk since he/she joined, the number of seconds will be the user's TimeInChannel value.

See also