'---------------------------------------------------------------------------------------
' Module    : clsBotVars
' DateTime  : 1/22/2005 16:09
' Author    : Andy (andy@stealthbot.net)
' Purpose   : stores bot variables at runtime and is exposed to the scripting subsystem
' Access these using BotVars.PropertyName
'---------------------------------------------------------------------------------------
Option Explicit

'You can ignore this section -- these are the internal class declarations
' If you have any problems or questions regarding these variables direct them
' to stealth@stealthbot.net or our scripting forums at http://www.stealthbot.net

Private m_sUsername                     As String
Private m_sPassword                     As String
Private m_sCDKey                        As String
Private m_sLODKey                       As String
Private m_sProduct                      As String
Private m_sServer                       As String
Private m_byBanUnderLevel               As Byte
Private m_byBanD2UnderLevel             As Byte
Private m_byKickOnYell                  As Byte
Private m_sHashFilePath                 As String
Private m_bBNLS                         As Boolean
Private m_byLogging                     As Byte
Private m_bySpoof                       As Byte
Private m_bDisableMP3Commands           As Boolean
Private m_bUseUDP                       As Boolean
Private m_byFlashOnEvents               As Byte
Private m_bUseProxy                     As Boolean
Private m_sProxyIP                      As String
Private m_lProxyPort                    As Long
Private m_eProxyStatus                  As enuProxyStatus
Private m_bProxyIsSocks5                As Boolean
Private m_lMaxLogfileSize               As Long
Private m_bUseGreet                     As Boolean
Private m_sGreetMsg                     As String
Private m_bWhisperGreet                 As Boolean
Private m_bUseRealm                     As Boolean
Private m_bNoTray                       As Boolean
Private m_bShowOfflineFriends           As Boolean
Private m_lReconnectDelay               As Long
Private m_bUsingPacketFList             As Boolean
Private m_lAutofilterMS                 As Long
Private m_bNoAutocompletion             As Boolean
Private m_bNoColoring                   As Boolean
Private m_lSecondsToIdle                As Long
Private m_sTrigger                      As String
Private m_bScriptMessageVeto            As Boolean
Private m_bIPBans                       As Boolean
Private m_bPlugBan                      As Boolean
Private m_bClientBans                   As Boolean
Private m_byTSSetting                   As Byte
Private m_sHomeChannel                  As String
Private m_bQuietTime                    As Boolean
Private m_bUseBackupChan                As Boolean
Private m_sBackupChan                   As String
Private m_byIB_On                       As Byte
Private m_iIB_Wait                      As Integer
Private m_bIB_Kick                      As Boolean
Private m_sChannelPassword              As String
Private m_byChannelPasswordDelay        As Byte


'#######################################################
'# Fun Stuff Begins Here			       #
'#######################################################



'##### username in config.ini

Public Property Get Username() As String

    Username = m_sUsername

End Property

Public Property Let Username(ByVal sUsername As String)

    m_sUsername = sUsername

End Property


'##### password in config.ini
Public Property Get Password() As String

    Password = m_sPassword

End Property

Public Property Let Password(ByVal sPassword As String)

    m_sPassword = sPassword

End Property


'##### cdkey in config.ini
Public Property Get CDKey() As String

    CDKey = m_sCDKey

End Property

Public Property Let CDKey(ByVal sCDKey As String)

    m_sCDKey = sCDKey

End Property


'##### expansion cdkey in config.ini
Public Property Get LODKey() As String

    LODKey = m_sLODKey

End Property

Public Property Let LODKey(ByVal sLODKey As String)

    m_sLODKey = sLODKey

End Property


'##### product in config.ini
Public Property Get Product() As String

    Product = m_sProduct

End Property

Public Property Let Product(ByVal sProduct As String)

    m_sProduct = sProduct

End Property


'##### server
Public Property Get Server() As String

    Server = m_sServer

End Property

Public Property Let Server(ByVal sServer As String)

    m_sServer = sServer

End Property


'##### ban Warcraft III under this level
Public Property Get BanUnderLevel() As Byte

    BanUnderLevel = m_byBanUnderLevel

End Property

Public Property Let BanUnderLevel(ByVal byBanUnderLevel As Byte)

    m_byBanUnderLevel = byBanUnderLevel

End Property

'##### ban D2 under this level
Public Property Get BanD2UnderLevel() As Byte

    BanD2UnderLevel = m_byBanD2UnderLevel

End Property

Public Property Let BanD2UnderLevel(ByVal byBanD2UnderLevel As Byte)

    m_byBanD2UnderLevel = byBanD2UnderLevel

End Property



'##### boolean 1/0 - kick on yell activated (1) or not (0)
Public Property Get KickOnYell() As Byte

    KickOnYell = m_byKickOnYell

End Property

Public Property Let KickOnYell(ByVal byKickOnYell As Byte)

    m_byKickOnYell = byKickOnYell

End Property


'##### path to the hash files
Public Property Get HashFilePath() As String

    HashFilePath = m_sHashFilePath

End Property

Public Property Let HashFilePath(ByVal sHashFilePath As String)

    m_sHashFilePath = sHashFilePath

End Property


'##### true = use BNLS; false = use local hashing
Public Property Get BNLS() As Boolean

    BNLS = m_bBNLS

End Property

Public Property Let BNLS(ByVal bBNLS As Boolean)

    m_bBNLS = bBNLS

End Property


'##### Logging setting: 0=normal, 1=shutdown, 2=none
Public Property Get Logging() As Byte

    Logging = m_byLogging

End Property

Public Property Let Logging(ByVal byLogging As Byte)

    m_byLogging = byLogging

End Property


'##### ping spoof: 0=none, 1=plug, 2=0ms
Public Property Get Spoof() As Byte

    Spoof = m_bySpoof

End Property

Public Property Let Spoof(ByVal bySpoof As Byte)

    m_bySpoof = bySpoof

End Property


'##### true=no mp3 commands allowed, false=the reverse
Public Property Get DisableMP3Commands() As Boolean

    DisableMP3Commands = m_bDisableMP3Commands

End Property

Public Property Let DisableMP3Commands(ByVal bDisableMP3Commands As Boolean)

    m_bDisableMP3Commands = bDisableMP3Commands

End Property


'##### UDP plug or not?
Public Property Get UseUDP() As Boolean

    UseUDP = m_bUseUDP

End Property

Public Property Let UseUDP(ByVal bUseUDP As Boolean)

    m_bUseUDP = bUseUDP

End Property

'##### Flash the bot window on events or not?
Public Property Get FlashOnEvents() As Byte

    FlashOnEvents = m_byFlashOnEvents

End Property

Public Property Let FlashOnEvents(ByVal byFlashOnEvents As Byte)

    m_byFlashOnEvents = byFlashOnEvents

End Property


'##### Use the following proxy settings?
Public Property Get UseProxy() As Boolean

    UseProxy = m_bUseProxy

End Property

Public Property Let UseProxy(ByVal bUseProxy As Boolean)

    m_bUseProxy = bUseProxy

End Property

'##### Proxy port?
Public Property Get ProxyPort() As Long

    ProxyPort = m_lProxyPort

End Property

Public Property Let ProxyPort(ByVal lProxyPort As Long)

    m_lProxyPort = lProxyPort

End Property

'##### Don't alter this or things will break
Public Property Get ProxyStatus() As enuProxyStatus

    ProxyStatus = m_eProxyStatus

End Property

Public Property Let ProxyStatus(ByVal eProxyStatus As enuProxyStatus)

    m_eProxyStatus = eProxyStatus

End Property


'##### Proxy IP address (as a string X.X.X.X)
Public Property Get ProxyIP() As String

    ProxyIP = m_sProxyIP

End Property

Public Property Let ProxyIP(ByVal sProxyIP As String)

    m_sProxyIP = sProxyIP

End Property

'##### true=SOCKS5, false=SOCKS4
Public Property Get ProxyIsSocks5() As Boolean

    ProxyIsSocks5 = m_bProxyIsSocks5

End Property

Public Property Let ProxyIsSocks5(ByVal bProxyIsSocks5 As Boolean)

    m_bProxyIsSocks5 = bProxyIsSocks5

End Property

'##### maximum logfile size in bytes, default 0
Public Property Get MaxLogfileSize() As Long

    MaxLogfileSize = m_lMaxLogfileSize

End Property

Public Property Let MaxLogfileSize(ByVal lMaxLogfileSize As Long)

    m_lMaxLogfileSize = lMaxLogfileSize

End Property


'##### greet message true/false
Public Property Get UseGreet() As Boolean

    UseGreet = m_bUseGreet

End Property

Public Property Let UseGreet(ByVal bUseGreet As Boolean)

    m_bUseGreet = bUseGreet

End Property


'##### set the greet message
Public Property Get GreetMsg() As String

    GreetMsg = m_sGreetMsg

End Property

Public Property Let GreetMsg(ByVal sGreetMsg As String)

    m_sGreetMsg = sGreetMsg

End Property


'##### connect d2 using realms
Public Property Get UseRealm() As Boolean

    UseRealm = m_bUseRealm

End Property

Public Property Let UseRealm(ByVal bUseRealm As Boolean)

    m_bUseRealm = bUseRealm

End Property


'##### whisper the greet message
Public Property Get WhisperGreet() As Boolean

    WhisperGreet = m_bWhisperGreet

End Property

Public Property Let WhisperGreet(ByVal bWhisperGreet As Boolean)

    m_bWhisperGreet = bWhisperGreet

End Property


'##### stay out of the system tray true/false
Public Property Get NoTray() As Boolean

    NoTray = m_bNoTray

End Property

Public Property Let NoTray(ByVal bNoTray As Boolean)

    m_bNoTray = bNoTray

End Property


'##### show offline friends true/false
Public Property Get ShowOfflineFriends() As Boolean

    ShowOfflineFriends = m_bShowOfflineFriends

End Property

Public Property Let ShowOfflineFriends(ByVal bShowOfflineFriends As Boolean)

    m_bShowOfflineFriends = bShowOfflineFriends

End Property


'##### time to wait before reconnecting when disconnected
Public Property Get ReconnectDelay() As Long

    ReconnectDelay = m_lReconnectDelay

End Property

Public Property Let ReconnectDelay(ByVal lReconnectDelay As Long)

    m_lReconnectDelay = lReconnectDelay

End Property


'##### use 0x65 friends list
Public Property Get UsingPacketFList() As Boolean

    UsingPacketFList = m_bUsingPacketFList

End Property

Public Property Let UsingPacketFList(ByVal bUsingPacketFList As Boolean)

    m_bUsingPacketFList = bUsingPacketFList

End Property


'##### time to block messages after someone joins the channel
'##### for floodbot protection
Public Property Get AutofilterMS() As Long

    AutofilterMS = m_lAutofilterMS

End Property

Public Property Let AutofilterMS(ByVal lAutofilterMS As Long)

    m_lAutofilterMS = lAutofilterMS

End Property


'##### disable channel list coloring=true, default false
Public Property Get NoColoring() As Boolean

    NoColoring = m_bNoColoring

End Property

Public Property Let NoColoring(ByVal bNoColoring As Boolean)

    m_bNoColoring = bNoColoring

End Property


'##### used by the scripting system, don't change through BotVars
Public Property Get ScriptMessageVeto() As Boolean

    ScriptMessageVeto = m_bScriptMessageVeto

End Property

Public Property Let ScriptMessageVeto(ByVal bScriptMessageVeto As Boolean)

    m_bScriptMessageVeto = bScriptMessageVeto

End Property


'##### disable autocompletion in the send box
Public Property Get NoAutocompletion() As Boolean

    NoAutocompletion = m_bNoAutocompletion

End Property

Public Property Let NoAutocompletion(ByVal bNoAutocompletion As Boolean)

    m_bNoAutocompletion = bNoAutocompletion

End Property


'##### seconds to wait before marking someone in the channel list idle-colored
Public Property Get SecondsToIdle() As Long

    SecondsToIdle = m_lSecondsToIdle

End Property

Public Property Let SecondsToIdle(ByVal lSecondsToIdle As Long)

    m_lSecondsToIdle = lSecondsToIdle

End Property


'##### bot's trigger
Public Property Get Trigger() As String

    Trigger = m_sTrigger

End Property

Public Property Let Trigger(ByVal sTrigger As String)

    'Triggers longer or shorter than 1 character will break some stuff
    If Len(sTrigger) = 1 Then m_sTrigger = sTrigger

End Property


'##### ipbans on/off-true/false
Public Property Get IPBans() As Boolean

    IPBans = m_bIPBans

End Property

Public Property Let IPBans(ByVal bIPBans As Boolean)

    m_bIPBans = bIPBans

End Property


'##### plugbans on/off-true/false
Public Property Get PlugBan() As Boolean

    PlugBan = m_bPlugBan

End Property

Public Property Let PlugBan(ByVal bPlugBan As Boolean)

    m_bPlugBan = bPlugBan

End Property


'##### clientbans on/off-true/false
Public Property Get ClientBans() As Boolean

    ClientBans = m_bClientBans

End Property

Public Property Let ClientBans(ByVal bClientBans As Boolean)

    m_bClientBans = bClientBans

End Property

'##### chat window timestamp setting
'0 = HH:MM:SS AM/PM (default)
'1 = HH:MM:SS
'2 = HH:MM:SS:mmmm milliseconds
'3 = none
Public Property Get TSSetting() As Byte

    TSSetting = m_byTSSetting

End Property

Public Property Let TSSetting(ByVal byTSSetting As Byte)

    m_byTSSetting = byTSSetting

End Property

'##### bot's home channel
Public Property Get HomeChannel() As String

    HomeChannel = m_sHomeChannel

End Property

Public Property Let HomeChannel(ByVal sHomeChannel As String)

    m_sHomeChannel = sHomeChannel

End Property


'##### quiettime on/off true/false
Public Property Get QuietTime() As Boolean

    QuietTime = m_bQuietTime

End Property

Public Property Let QuietTime(ByVal bQuietTime As Boolean)

    m_bQuietTime = bQuietTime

End Property


'##### use a backup channel true/false
Public Property Get UseBackupChan() As Boolean

    UseBackupChan = m_bUseBackupChan

End Property

Public Property Let UseBackupChan(ByVal bUseBackupChan As Boolean)

    m_bUseBackupChan = bUseBackupChan

End Property


'##### backup channel name
Public Property Get BackupChan() As String

    BackupChan = m_sBackupChan

End Property

Public Property Let BackupChan(ByVal sBackupChan As String)

    m_sBackupChan = sBackupChan

End Property


'##### boolean byte again, IdleBans on = 1, off=0
Public Property Get IB_On() As Byte

    IB_On = m_byIB_On

End Property

Public Property Let IB_On(ByVal byIB_On As Byte)

    m_byIB_On = byIB_On

End Property


'##### time to wait before someone is banned for being idle
Public Property Get IB_Wait() As Integer

    IB_Wait = m_iIB_Wait

End Property

Public Property Let IB_Wait(ByVal iIB_Wait As Integer)

    m_iIB_Wait = iIB_Wait

End Property


'##### boolean byte, 1=kick users when idle, 0=ban users when idle
'#####  (if idlebans are on)
Public Property Get IB_Kick() As Boolean

    IB_Kick = m_bIB_Kick

End Property

Public Property Let IB_Kick(ByVal bIB_Kick As Boolean)

    m_bIB_Kick = bIB_Kick

End Property


'##### channel password string
Public Property Get ChannelPassword() As String

    ChannelPassword = m_sChannelPassword

End Property

Public Property Let ChannelPassword(ByVal sChannelPassword As String)

    m_sChannelPassword = sChannelPassword

End Property


'##### channel password time before the person is banned (0-255 seconds)
Public Property Get ChannelPasswordDelay() As Byte

    ChannelPasswordDelay = m_byChannelPasswordDelay

End Property

Public Property Let ChannelPasswordDelay(ByVal byChannelPasswordDelay As Byte)

    m_byChannelPasswordDelay = byChannelPasswordDelay

End Property
