Channel function

From StealthBot Wiki
Jump to: navigation, search

The Channel() Script Support Class function returns the Channel object.


This function was added by Eric in version 2.7.


'// Returns the channel object
Public Function Channel() As Object

    Set Channel = g_Channel.Clone()

End Function


To call a subroutine of the Channel object:


To store a value that the Channel object can retrieve:

Variable = Channel().GetSomething

Advanced Note: When the Channel function is called, a copy of the Channel object is made so that you cannot cause the bot to send bad information to by changing properties of the internal channel object. Normally, the convention is to get values (like Channel.Name) from the bot's channel object, not from a channel object that you stored before using Set ChannelObj = Channel(). This also guarantees that the information is more up to date.

See the Channel object article for examples and usage of the Channel object.

See also