Channel object

From StealthBot Wiki
Revision as of 15:36, 3 September 2009 by Ribose (talk | contribs) (Created page with 'The Channel object exposes the channel and its users to you. You may want to use these, for example, to find a player's game statstring. ==History== This object was added in…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The Channel object exposes the channel and its users to you. You may want to use these, for example, to find a player's game statstring.

History

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

How to use

Example: Get the value of a property of the current channel.

Value = Channel.Banlist(Index).PropertyName

Properties

List of properties

Name property

This property returns the current channel name.

Banlist property

This property returns a collection of BanlistUser objects.

Users property

This property returns a collection of ChannelUser objects, one for each user in the current channel.

=Self property

This property returns a ChannelUser object containing information about the bot (self) in the current channel.

Example: Output your bot's username and channel name.

AddChat vbGreen, "I am " & Channel.Self.Name & " in " & Channel.Name & "!"

IsSilent property

This property returns True if the Battle.net flags specify that the current channel is silent. Users cannot talk in silent channels.

Flags property

This property returns the Battle.net channel flags for the current channel.

JoinDate property

This function represents a time and date object for the time you entered the channel.

Functions

List of functions

ClearBanlist function

This function clears your bot's internal ban list. This functions like the cbl command.

Example:

Call Channel.ClearBanlist()

GetUserIndex function

This function returns the user's index in the channel or the integer value 0 if not found. This is affected by naming conventions.

GetUserIndexEx function

This function returns the user's index in the channel or the integer value 0 if not found.

IsOnBanList function

This function returns the user's index in the channel or the integer value 0 if not found for the specified ban list entry.

RemoveBansFromOperator function

This function removes all bans on the internal ban list executed by the specified operator.

See also