VERSION 5.00 Begin VB.Form Window AutoRedraw = -1 'True BackColor = &H00FFFFFF& Caption = "X-Bot 2003 by Overtech Technologies ( www.OvertechTechnologies.com )" ClientHeight = 6345 ClientLeft = 60 ClientTop = 2670 ClientWidth = 8265 ForeColor = &H00000000& Icon = "Bot-Solutions.frx":0000 LinkTopic = "Form1" MaxButton = 0 'False PaletteMode = 1 'UseZOrder ScaleHeight = 6345 ScaleWidth = 8265 StartUpPosition = 2 'CenterScreen Begin VB.CommandButton butHelp Caption = "Get &Help" DisabledPicture = "Bot-Solutions.frx":000C DownPicture = "Bot-Solutions.frx":145D2 BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 255 Left = 3240 Style = 1 'Graphical TabIndex = 25 Top = 4560 Width = 975 End Begin VB.CommandButton butRunBot Caption = "Step 2: &Run Locally" DisabledPicture = "Bot-Solutions.frx":28B98 DownPicture = "Bot-Solutions.frx":3D15E BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = 120 Style = 1 'Graphical TabIndex = 21 Top = 4320 Width = 2895 End Begin VB.CommandButton butCompile Caption = "Step 1: &Compile" DisabledPicture = "Bot-Solutions.frx":51724 DownPicture = "Bot-Solutions.frx":65CEA BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = 120 Style = 1 'Graphical TabIndex = 20 Top = 3840 Width = 2895 End Begin VB.CheckBox chkSeparateUserfiles BackColor = &H00FFFFFF& Caption = "Use Separate Userfiles than other Bots" Height = 255 Left = 4680 TabIndex = 16 Top = 2160 Width = 3495 End Begin VB.CommandButton butShell Caption = "&Shell..." BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = 120 TabIndex = 22 Top = 4800 Width = 2175 End Begin VB.CheckBox ChkDeOpWarn BackColor = &H00FFFFFF& Caption = "Warn Users About DeOpping This Bot" Height = 255 Left = 4680 TabIndex = 15 Top = 1920 Width = 3015 End Begin VB.CheckBox ChkMsChatWarn BackColor = &H00FFFFFF& Caption = "Warn Users About Using Comic Chat" Height = 255 Left = 4680 TabIndex = 14 Top = 1680 Width = 3015 End Begin VB.CheckBox ChkBCast BackColor = &H00FFFFFF& Caption = "Broadcast Bot Usage to Home Channel" Height = 255 Left = 4680 TabIndex = 13 Top = 1440 Width = 3135 End Begin VB.CheckBox ChkKWarn BackColor = &H00FFFFFF& Caption = "Warn Users About Kicking the Bot" Height = 255 Left = 4680 TabIndex = 12 Top = 1200 Width = 2775 End Begin VB.TextBox txtTelnet Height = 285 Left = 5760 TabIndex = 9 Text = "3333" Top = 840 Width = 615 End Begin VB.CommandButton butRemScript BackColor = &H00FFFFFF& Caption = "&Remove Script" DisabledPicture = "Bot-Solutions.frx":7A2B0 DownPicture = "Bot-Solutions.frx":80D42 Height = 315 Left = 3600 MaskColor = &H008080FF& Style = 1 'Graphical TabIndex = 57 Top = 5520 Visible = 0 'False Width = 1215 End Begin VB.FileListBox ScriptFile Height = 285 Left = 1080 Pattern = "*.tcl" TabIndex = 56 Top = 0 Visible = 0 'False Width = 855 End Begin VB.CheckBox CustomScript BackColor = &H00E0E0E0& BeginProperty Font Name = "Comic Sans MS" Size = 8.25 Charset = 0 Weight = 400 Underline = -1 'True Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 255 Index = 7 Left = 4680 TabIndex = 35 Top = 4660 Width = 3130 End Begin VB.CheckBox CustomScript BackColor = &H00E0E0E0& BeginProperty Font Name = "Comic Sans MS" Size = 8.25 Charset = 0 Weight = 400 Underline = -1 'True Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 225 Index = 6 Left = 4680 TabIndex = 34 Top = 4440 Width = 3130 End Begin VB.CheckBox CustomScript BackColor = &H00E0E0E0& BeginProperty Font Name = "Comic Sans MS" Size = 8.25 Charset = 0 Weight = 400 Underline = -1 'True Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 255 Index = 5 Left = 4680 TabIndex = 33 Top = 4200 Width = 3130 End Begin VB.CheckBox CustomScript BackColor = &H00E0E0E0& BeginProperty Font Name = "Comic Sans MS" Size = 8.25 Charset = 0 Weight = 400 Underline = -1 'True Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 255 Index = 4 Left = 4680 TabIndex = 32 Top = 3960 Width = 3130 End Begin VB.CheckBox CustomScript BackColor = &H00E0E0E0& BeginProperty Font Name = "Comic Sans MS" Size = 8.25 Charset = 0 Weight = 400 Underline = -1 'True Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 255 Index = 3 Left = 4680 TabIndex = 31 Top = 3720 Width = 3130 End Begin VB.CheckBox CustomScript BackColor = &H00E0E0E0& BeginProperty Font Name = "Comic Sans MS" Size = 8.25 Charset = 0 Weight = 400 Underline = -1 'True Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 255 Index = 2 Left = 4680 TabIndex = 30 Top = 3480 Width = 3130 End Begin VB.CheckBox CustomScript BackColor = &H00E0E0E0& BeginProperty Font Name = "Comic Sans MS" Size = 8.25 Charset = 0 Weight = 400 Underline = -1 'True Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 255 Index = 1 Left = 4680 TabIndex = 29 Top = 3240 Width = 3130 End Begin VB.VScrollBar VScroll1 Height = 1935 Left = 7800 TabIndex = 36 Top = 3000 Width = 255 End Begin VB.CheckBox CustomScript BackColor = &H00E0E0E0& BeginProperty Font Name = "Comic Sans MS" Size = 8.25 Charset = 0 Weight = 400 Underline = -1 'True Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00800000& Height = 255 Index = 0 Left = 4680 TabIndex = 28 Top = 3000 Width = 3130 End Begin VB.CommandButton butSaveProfile Caption = "&Save" DisabledPicture = "Bot-Solutions.frx":877D4 DownPicture = "Bot-Solutions.frx":9BD9A BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 255 Left = 3240 Style = 1 'Graphical TabIndex = 23 Top = 3840 Width = 975 End Begin VB.CommandButton butRevertProfile Caption = "&Revert" DisabledPicture = "Bot-Solutions.frx":B0360 DownPicture = "Bot-Solutions.frx":C4926 BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 255 Left = 3240 Style = 1 'Graphical TabIndex = 24 Top = 4200 Width = 975 End Begin VB.Timer Timer1 Interval = 50 Left = 7440 Top = 5280 End Begin VB.CommandButton butAddScript BackColor = &H00FFFFFF& Caption = "&Edit This Custom Script" DisabledPicture = "Bot-Solutions.frx":D8EEC DownPicture = "Bot-Solutions.frx":DF97E Enabled = 0 'False Height = 315 Left = 4680 MaskColor = &H00004040& Style = 1 'Graphical TabIndex = 37 Top = 4920 Width = 3375 End Begin VB.ListBox lstScripts Height = 645 Left = 4800 TabIndex = 52 Top = 5760 Visible = 0 'False Width = 3135 End Begin VB.CommandButton butAdvanced Caption = "&More Commands..." BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 255 Left = 2520 Style = 1 'Graphical TabIndex = 26 Top = 4920 Width = 1695 End Begin VB.TextBox txtBotNick Height = 285 Left = 1320 MaxLength = 32 TabIndex = 6 Text = "BSol_TCL3" Top = 1920 Width = 2535 End Begin VB.TextBox txtTimeZone Height = 285 Left = 5760 TabIndex = 8 Text = "EST" Top = 480 Width = 615 End Begin VB.ListBox lstServers Height = 645 Left = 120 TabIndex = 17 Top = 3000 Width = 2775 End Begin VB.CommandButton butAddServer BackColor = &H00FFFFFF& Caption = "&Add IRC Server" DisabledPicture = "Bot-Solutions.frx":E6410 DownPicture = "Bot-Solutions.frx":ECEA2 Height = 315 Left = 3000 MaskColor = &H00004040& Style = 1 'Graphical TabIndex = 18 Top = 3000 Width = 1335 End Begin VB.CommandButton butRemServer BackColor = &H00FFFFFF& Caption = "&Remove Server" DisabledPicture = "Bot-Solutions.frx":F3934 DownPicture = "Bot-Solutions.frx":FA3C6 Height = 315 Left = 3000 MaskColor = &H008080FF& Style = 1 'Graphical TabIndex = 19 Top = 3360 Width = 1335 End Begin VB.TextBox txtEasyKey Height = 285 Left = 7800 TabIndex = 10 Text = "u" Top = 480 Width = 375 End Begin VB.TextBox txtOrganization Height = 285 Left = 1320 TabIndex = 3 Text = "Acme Bot Loaning" Top = 840 Width = 2535 End Begin VB.TextBox txtEasyBotnet Height = 285 Left = 7800 TabIndex = 11 Text = "*" Top = 840 Width = 375 End Begin VB.TextBox txtCryptKey Height = 285 Left = 1320 TabIndex = 4 Text = "bsolutions" Top = 1200 Width = 2535 End Begin VB.TextBox txtBotAdmin Height = 285 Left = 1320 TabIndex = 2 Text = "Change This " Top = 480 Width = 2535 End Begin VB.TextBox txtHome Height = 285 Left = 1320 TabIndex = 5 Text = "#bot-solutions_ROCKS" Top = 1560 Width = 2535 End Begin VB.FileListBox File1 Height = 285 Left = 0 Pattern = "*.bs3" TabIndex = 41 Top = 0 Visible = 0 'False Width = 975 End Begin VB.PictureBox Picture2 Height = 415 Left = 0 Picture = "Bot-Solutions.frx":100E58 ScaleHeight = 360 ScaleWidth = 8235 TabIndex = 0 Top = 0 Width = 8295 Begin VB.CommandButton butAddProfile Caption = "&New Profile" DisabledPicture = "Bot-Solutions.frx":11859A DownPicture = "Bot-Solutions.frx":12FCDC BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 255 Left = 4800 Style = 1 'Graphical TabIndex = 38 Top = 45 Width = 1650 End Begin VB.CommandButton butDelProfile Caption = "Delete Profile" DisabledPicture = "Bot-Solutions.frx":14741E DownPicture = "Bot-Solutions.frx":15EB60 Enabled = 0 'False BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 255 Left = 6600 Style = 1 'Graphical TabIndex = 39 Top = 40 Width = 1455 End Begin VB.ComboBox lstProfile Appearance = 0 'Flat BackColor = &H00FFFFFF& BeginProperty Font Name = "Comic Sans MS" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 345 Left = 2400 Style = 2 'Dropdown List TabIndex = 1 Top = 0 Width = 2295 End Begin VB.Label lblCEditing BackStyle = 0 'Transparent Caption = "Currenly Editing Bot Profile:" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 255 Left = 0 TabIndex = 40 Top = 75 Width = 2535 End End Begin VB.CommandButton butImport BackColor = &H00FFFFFF& Caption = "&Import Script" Height = 315 Left = 6840 Style = 1 'Graphical TabIndex = 27 Top = 2685 Width = 1215 End Begin VB.TextBox txtAltNick Height = 285 Left = 1560 MaxLength = 32 TabIndex = 7 Text = "BotSol3" Top = 2200 Width = 2295 End Begin VB.Shape Shape3 BackColor = &H00000000& BackStyle = 1 'Opaque BorderStyle = 0 'Transparent Height = 615 Left = 120 Top = 4080 Width = 2895 End Begin VB.Label lblTelnet Alignment = 1 'Right Justify BackColor = &H00C0C0C0& BackStyle = 0 'Transparent Caption = "Telnet Port:" Height = 255 Left = 4680 TabIndex = 58 Top = 840 Width = 975 End Begin VB.Label lblDescription BackColor = &H00C0FFFF& Caption = $"Bot-Solutions.frx":1762A2 BeginProperty Font Name = "Microsoft Sans Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 1215 Left = 120 TabIndex = 54 Top = 5640 Width = 7935 End Begin VB.Shape HighlightCover BackColor = &H00C0FFFF& BackStyle = 1 'Opaque BorderStyle = 0 'Transparent Height = 255 Left = 1680 Top = 5400 Width = 7815 End Begin VB.Label lblCustomScripts BackColor = &H00C0C0C0& BackStyle = 0 'Transparent Caption = "Custom Scripts to use:" Height = 255 Left = 4560 TabIndex = 53 Top = 2760 Width = 3135 End Begin VB.Image ConstructionImage Height = 1575 Left = 0 Stretch = -1 'True Top = 3720 Width = 4395 End Begin VB.Label lblBotNick Alignment = 1 'Right Justify BackColor = &H00C0C0C0& BackStyle = 0 'Transparent Caption = "Bot's Nickname:" Height = 255 Left = 0 TabIndex = 51 Top = 1920 Width = 1215 End Begin VB.Label lblTimeZone Alignment = 1 'Right Justify BackColor = &H00C0C0C0& BackStyle = 0 'Transparent Caption = "Bot's Timezone:" Height = 255 Left = 4440 TabIndex = 50 Top = 480 Width = 1215 End Begin VB.Label lblAltNick Alignment = 1 'Right Justify BackColor = &H00C0C0C0& BackStyle = 0 'Transparent Caption = "Alt. Nickname:" Height = 255 Left = 240 TabIndex = 49 Top = 2200 Width = 1215 End Begin VB.Label lblServers BackColor = &H00C0C0C0& BackStyle = 0 'Transparent Caption = "IRC server(s) this bot is to use" Height = 255 Left = 120 TabIndex = 48 Top = 2760 Width = 3135 End Begin VB.Label lblEasyKey Alignment = 1 'Right Justify BackStyle = 0 'Transparent Caption = "Easy Key:" Height = 255 Left = 6720 TabIndex = 47 Top = 480 Width = 975 End Begin VB.Label lblOrganization Alignment = 1 'Right Justify BackColor = &H00C0C0C0& BackStyle = 0 'Transparent Caption = "Organization:" Height = 255 Left = -360 TabIndex = 46 Top = 840 Width = 1575 End Begin VB.Label lblEasyBotnet Alignment = 1 'Right Justify BackStyle = 0 'Transparent Caption = "Easy Botnet:" Height = 255 Left = 6720 TabIndex = 45 Top = 840 Width = 975 End Begin VB.Label lblCryptKey Alignment = 1 'Right Justify BackColor = &H00C0C0C0& BackStyle = 0 'Transparent Caption = "Encryption Key:" Height = 255 Left = -360 TabIndex = 44 Top = 1200 Width = 1575 End Begin VB.Label lblBotAdmin Alignment = 1 'Right Justify BackColor = &H00C0C0C0& BackStyle = 0 'Transparent Caption = "Admin. Contact:" Height = 255 Left = -360 TabIndex = 43 Top = 480 Width = 1575 End Begin VB.Label lblHome Alignment = 1 'Right Justify BackColor = &H00C0C0C0& BackStyle = 0 'Transparent Caption = "Home Channel:" Height = 255 Left = -360 TabIndex = 42 Top = 1560 Width = 1575 End Begin VB.Line BasicBorder BorderColor = &H80000002& BorderWidth = 2 X1 = 0 X2 = 8280 Y1 = 2640 Y2 = 2640 End Begin VB.Label lblHighlightedItem AutoSize = -1 'True BackColor = &H00C0FFFF& Caption = "Welcome to X-Bot" BeginProperty Font Name = "Comic Sans MS" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 240 Left = 0 TabIndex = 55 Top = 5400 Width = 1515 End Begin VB.Shape Shape1 BackColor = &H00C0FFFF& BackStyle = 1 'Opaque BorderStyle = 0 'Transparent Height = 1260 Left = -120 Top = 5400 Width = 9000 End Begin VB.Menu mnuAdvanced Caption = "Advanced" Begin VB.Menu butAdvConfig Caption = "&Advanced Configuration for This Bot [PROBABLY WILL NOT BE IN FINAL VERSION]" Visible = 0 'False End Begin VB.Menu divider7 Caption = "-" Visible = 0 'False End Begin VB.Menu butUpload Caption = "&Upload Bot to Shell" End Begin VB.Menu smnuRunBot Caption = "&Run Compiled Bot on This Computer..." Begin VB.Menu cmdRunBot Caption = "...With Debug Messages" End Begin VB.Menu cmdRunInBkg Caption = "...As Background Process (Hidden)" End End Begin VB.Menu divide2 Caption = "-" End Begin VB.Menu smnuImport Caption = "&Import Bot Files Locally..." Begin VB.Menu cmdImportUsers Caption = "Import .&USER File" End Begin VB.Menu cmdImportChans Caption = "Import .&CHAN File" End Begin VB.Menu cmdImportNotes Caption = "Import .&NOTES File" End End Begin VB.Menu smnuExport Caption = "E&xport Local Bot Files..." Begin VB.Menu cmdExportUsers Caption = "Export .&USER File" End Begin VB.Menu cmdExportChans Caption = "Export .&CHAN File" End Begin VB.Menu cmdExportNotes Caption = "Export .&NOTES File" End Begin VB.Menu divider4 Caption = "-" End Begin VB.Menu cmdExportEggdropConf Caption = "Export Eggdrop.CONF File" End End Begin VB.Menu divider5 Caption = "-" End Begin VB.Menu cmdDNSConfig Caption = "Run Automatic DNS Configuration Utility" End Begin VB.Menu divide6 Caption = "-" End Begin VB.Menu cmdEditConfs Caption = "&Edit Configuration Files Manually..." Begin VB.Menu cmdEditEggdropConf Caption = "Edit Eggdrop &Configuration File" End Begin VB.Menu cmdEditResolvConf Caption = "Edit DNS &Resolution File" End End End End Attribute VB_Name = "Window" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit Dim CScriptsArr(32767, 3) As Integer ' rownum = listindex ' 1 = Checkbox Value ' 2 = Highlighted ' 3 = Disabled Dim CFile As String Dim CSub As String Function GetIP(ByVal DNS As String) As String CSub = "GetIP" Dim Counter As Long Beginning: frmDNS.txtName = DNS ' fill in name frmDNS.cmdToIP_Click ' click convert to IP ' wait until converts to IP Counter = 0 'initialize DNS error flag to 0 (ok) frmDNS.chkError.Value = 0 Do Until Trim(frmDNS.txtIP) <> "" Or frmDNS.chkError.Value <> 0 DoEvents frmDNS.cmdToIP_Click Loop ' if getting IP failed, display an error and ask user what to do Dim Response As Integer If frmDNS.chkError.Value <> 0 Then 'if anything other than ok then error message Response = MsgBox("Sorry, X-Bot was unable to automatically find the IP address of " & DNS & vbCrLf & vbCrLf & "Please ensure you are connected to the internet." & vbCrLf & vbCrLf & "Click 'retry' to have X-bot try to get the IP again. Click 'cancel' to have X-Bot remove this server address from the compiled version of the bot", vbRetryCancel + vbExclamation, "Error in getting IP Address") If Response = vbRetry Then GoTo Beginning Else ' clicked cancel - omit address from file by setting IP to 0 GetIP = 0 End If Else 'getting IP was successful GetIP = frmDNS.txtIP End If End Function Sub CompileFile(ByVal Filename As String) On Error GoTo errorhandler CSub = "CompileFile" Dim OutputFile As String Dim Incoming As String Dim ProcessedIncoming As String Dim Counter As Integer Dim TempStr As String TempStr = "" OutputFile = "" Dim NewKilo As Integer Dim OldKilo As Integer OldKilo = -2 NewKilo = 0 'Compiler.Command1.Enabled = True Open App.Path & "\" & Filename For Input As #1 CFile = App.Path & "\" & Filename Do Until EOF(1) Line Input #1, Incoming CFile = App.Path & "\" & Filename & " [File was being processed]" ProcessedIncoming = Parse(Incoming, "%port", txtTelnet.Text) Incoming = ProcessedIncoming ProcessedIncoming = Parse(Incoming, "%botnick", txtBotNick.Text) Incoming = ProcessedIncoming ProcessedIncoming = Parse(Incoming, "%altnick", txtAltNick.Text) Incoming = ProcessedIncoming ProcessedIncoming = Parse(Incoming, "%timezone", txtTimeZone.Text) Incoming = ProcessedIncoming Dim IpAddy As String If InStr(Incoming, "%servers") Then For Counter = 0 To (lstServers.ListCount - 1) lstServers.ListIndex = Counter Compiler.lblBuilding.Caption = "Getting the IP Address of: " & lstServers IpAddy = GetIP(lstServers) CSub = "CompileFile" If IpAddy <> "0" Then 'only add successful IP addresses to the config file ' got ip, add to list TempStr = TempStr & " " & IpAddy & Chr(13) & Chr(10) End If 'Compiler.lblBuilding.Caption = "Building " & Filename & "... < Building Channel List >" Next End If ProcessedIncoming = Parse(Incoming, "%servers", TempStr) Incoming = ProcessedIncoming ' if want separate userfiles, change "Main to " ' note, will maintain pid.Main for all bots If chkSeparateUserfiles.Value = 1 Then ProcessedIncoming = Parse(Incoming, Chr(34) & "Main", Chr(34) & Window.lstProfile) Incoming = ProcessedIncoming End If TempStr = "" ' Script Imports If InStr(Incoming, "%imports") Then If lstScripts.ListCount > 0 Then For Counter = 0 To (lstScripts.ListCount - 1) lstScripts.ListIndex = Counter TempStr = TempStr & "source scripts/" & lstScripts & Chr(13) & Chr(10) 'Compiler.lblBuilding.Caption = "Building " & Filename & "... < Building Channel List >" Next End If End If ProcessedIncoming = Parse(Incoming, "%imports", TempStr) Incoming = ProcessedIncoming ProcessedIncoming = Parse(Incoming, "%easykey", txtEasyKey.Text) Incoming = ProcessedIncoming ProcessedIncoming = Parse(Incoming, "%easybotnet", txtEasyBotnet.Text) Incoming = ProcessedIncoming ProcessedIncoming = Parse(Incoming, "%organization", txtOrganization.Text) Incoming = ProcessedIncoming ProcessedIncoming = Parse(Incoming, "%home", txtHome.Text) Incoming = ProcessedIncoming ProcessedIncoming = Parse(Incoming, "%cryptkey", txtCryptKey.Text) Incoming = ProcessedIncoming ProcessedIncoming = Parse(Incoming, "%easykey", txtEasyKey.Text) Incoming = ProcessedIncoming ProcessedIncoming = Parse(Incoming, "%deopwarn", CInt(ChkDeOpWarn.Value)) Incoming = ProcessedIncoming ProcessedIncoming = Parse(Incoming, "%mschatwarn", CInt(ChkMsChatWarn.Value)) Incoming = ProcessedIncoming ProcessedIncoming = Parse(Incoming, "%kwarn", CInt(ChkKWarn.Value)) Incoming = ProcessedIncoming ProcessedIncoming = Parse(Incoming, "%bcast", CInt(ChkBCast.Value)) Incoming = ProcessedIncoming ProcessedIncoming = Parse(Incoming, "%contact", txtBotAdmin.Text) Incoming = ProcessedIncoming ProcessedIncoming = Parse(Incoming, "%botadmin", txtBotAdmin.Text) Incoming = ProcessedIncoming ProcessedIncoming = Parse(Incoming, "%config", "scripts/" & Parse(LCase(Window.lstProfile.Text), " ", "") & ".bs.3.0.conf") Incoming = ProcessedIncoming OutputFile = OutputFile & Incoming & Chr(13) & Chr(10) CFile = App.Path & "\" & Filename & " [File statistics were being updated]" NewKilo = CInt(Len(OutputFile) / 1024) If NewKilo > OldKilo Then Compiler.lblBuilding.Caption = "Building " & Filename & "... [ " & NewKilo & " KB ]" Compiler.ProgressBar.Width = Compiler.ProgressBar.Width + (Compiler.Width / 100) * (NewKilo / (FileLen(App.Path & "\" & Filename) / 1024)) OldKilo = NewKilo DoEvents End If ' If Window.Visible = True Then Exit Sub Loop Close #1 ' Build Batch File so can run bot Compiler.lblBuilding.Caption = "Building batch file..." BuildBatchFile 'Compiler.Command1.Enabled = False If LCase(Filename) = "eggdrop.conf" Then CFile = App.Path & "\windrop\" & Parse(LCase(Window.lstProfile.Text), " ", "") & ".conf" Open (App.Path & "\windrop\" & Parse(LCase(Window.lstProfile.Text), " ", "") & ".conf") For Output As #1 Print #1, OutputFile Close #1 ElseIf LCase(Filename) = "bot-solutions.3.0.conf" Then CFile = App.Path & "\windrop\scripts\" & Parse(LCase(Window.lstProfile.Text), " ", "") & ".bs.3.0.conf" 'CFile = App.Path & "\windrop\scripts\bot-solutions.3.0.conf" Open App.Path & "\windrop\scripts\" & Parse(LCase(Window.lstProfile.Text), " ", "") & ".bs.3.0.conf" For Output As #1 Print #1, OutputFile Close #1 End If DoEvents CFile = "" errorhandler: If Err.Number > 0 Then Severe_Error_Msg (Me.Name) Resume Next End If End Sub Sub Severe_Error_Msg(ByVal Module As String) MsgBox "SEVERE ERROR!" & Chr(13) & Chr(10) & Chr(13) & Chr(10) & _ "Occured in Module: " & Module & "." & CSub & Chr(13) & Chr(10) & _ "Last File Accessed: " & CFile & Chr(13) & Chr(10) & Chr(13) & Chr(10) & _ "Program will attempt to continue normal operation...", vbCritical + vbOKOnly, "SEVERE ERROR: " & _ App.ProductName & " " & App.Major & "." & App.Minor & "." & App.Revision & " [Thread " & App.ThreadID & "]" End Sub Sub GetProfiles() 'refresh dropdown list lstProfile.Clear 'refresh file list File1.Path = App.Path File1.Path = App.Path & "\windrop" 'get all configurations Dim Counter As Integer For Counter = 0 To (File1.ListCount - 1) File1.ListIndex = Counter lstProfile.AddItem Left(File1, Len(File1) - 4) Next 'Make sure u load at least 1 profile If lstProfile.ListCount = 0 Then FileCopy App.Path & "\default.bs3", App.Path & "\windrop\Default.bs3" GetProfiles End If lstProfile.ListIndex = 0 lstProfile_Change lstProfile_Click ' now have default profile when all profiles are deleted butDelProfile.Enabled = True End Sub Sub Basic_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) End Sub Private Sub butAddProfile_Click() Dim ProfileName As String Dim DefaultName As String Dim CurrentProfile As Integer CurrentProfile = lstProfile.ListIndex DefaultName = "My Bot Profile" NamePrompt: ProfileName = InputBox("Enter the name of the bot profile you wish to create", "Create New Profile", DefaultName) If ProfileName = "" Then Exit Sub 'see if meets length requirements If Len(ProfileName) > 256 Then MsgBox "Sorry, profile names cannot be more than 256 characters in length", vbInformation, App.ProductName DefaultName = ProfileName GoTo NamePrompt End If 'make sure contains no illegal characters If ((InStr(ProfileName, "/")) Or (InStr(ProfileName, "\")) Or (InStr(ProfileName, "?")) Or (InStr(ProfileName, "*")) Or (InStr(ProfileName, ":")) Or (InStr(ProfileName, Chr(34))) Or (InStr(ProfileName, "<")) Or (InStr(ProfileName, ">")) Or (InStr(ProfileName, "|"))) Then MsgBox "Sorry, profile names cannot contain < / | \ > ? * : " & Chr(34), vbInformation DefaultName = ProfileName GoTo NamePrompt End If 'make sure not taken already Dim Counter As Integer For Counter = 0 To (lstProfile.ListCount - 1) lstProfile.ListIndex = Counter If LCase(lstProfile) = LCase(ProfileName) Then MsgBox "Sorry, the name " & Chr(34) & ProfileName & Chr(34) & " is already taken, please chose another name for your new profile", vbInformation, App.ProductName DefaultName = ProfileName GoTo NamePrompt End If Next 'passed all tests, make new profile lstProfile.ListIndex = CurrentProfile Dim BaseOnCurrent As Integer If lstProfile = "" Then 'Do not allow to be based on a profile that does not exist BaseOnCurrent = vbNo ProfileName = "Default" Else BaseOnCurrent = MsgBox("Do you want the new profile to be entitled " & Chr(34) & ProfileName & Chr(34) & " to be based on the profile entitled " & Chr(34) & lstProfile & Chr(34) & "?", vbQuestion + vbYesNoCancel, App.ProductName) End If If BaseOnCurrent = vbCancel Then Exit Sub If BaseOnCurrent = vbYes Then FileCopy App.Path & "\windrop\" & lstProfile & ".bs3", App.Path & "\windrop\" & ProfileName & ".bs3" ElseIf BaseOnCurrent = vbNo Then FileCopy App.Path & "\default.bs3", App.Path & "\windrop\" & ProfileName & ".bs3" End If DoEvents GetProfiles DoEvents lstProfile.Enabled = True ' highlight new profile Counter = 0 Do Until lstProfile = ProfileName lstProfile.ListIndex = Counter Counter = Counter + 1 Loop butSaveProfile.Enabled = True butRevertProfile.Enabled = True butCompile.Enabled = True butDelProfile.Enabled = True End Sub Private Sub butAddProfile_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblHighlightedItem.Caption = Parse(butAddProfile.Caption, "&", "") lblDescription.Caption = "Click here to create an entire new set of settings for a bot you may be running. This is useful for running multiple bots on different rooms that need different things." End Sub Private Sub butAddScript_Click() Dim PrevCaption As String PrevCaption = butAddScript.Caption butAddScript.Enabled = False butAddScript.Caption = "Working" Dim Counter As Integer For Counter = 0 To 7 If CustomScript(Counter).ForeColor = RGB(255, 0, 0) Then Shell "write.exe " & Chr(34) & App.Path & "\windrop\scripts\" & CustomScript(Counter).Caption & Chr(34), vbNormalFocus DoEvents End If Next Counter butAddScript.Caption = PrevCaption 'butAddScript.Enabled = True 'Load ScriptLoader 'ScriptLoader.Visible = True End Sub Private Sub butAddScript_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblHighlightedItem.Caption = Parse(butAddScript.Caption, "&", "") lblDescription.Caption = "Click here to add, edit or configure a Eggdrop/Windrop TCL scripting module for this bot." End Sub Private Sub butAddServer_Click() Dim NewServer As String NewServer = InputBox("Enter the address of the IRC server you wish this bot to reside.", "Add IRC Server", "irc.dal.net") If NewServer = "" Then Exit Sub lstServers.AddItem NewServer lstServers.ListIndex = lstServers.ListCount - 1 butRemServer.Enabled = True End Sub Private Sub butAddServer_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) 'lblshell.ForeColor = RGB(0, 0, 255) 'lblshell.FontBold = False lblHighlightedItem.Caption = Parse(butAddServer.Caption, "&", "") lblDescription.Caption = "Click here to add another IRC server this bot may attempt to connect to." End Sub Private Sub butAdvanced_Click() 'PopupMenu mnuAdvanced, , butAdvanced.Left + butAdvanced.Width, butAdvanced.Top frmAdvanced.Visible = False Load frmAdvanced frmAdvanced.Visible = True End Sub Private Sub butAdvanced_MouseDown(button As Integer, Shift As Integer, x As Single, y As Single) If button <> 1 Then PopupMenu mnuAdvanced, , butAdvanced.Left + x, butAdvanced.Top + y End Sub Private Sub butAdvanced_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblHighlightedItem.Caption = Parse(butAdvanced.Caption, "&", "") lblDescription.Caption = "Click here to gain access to X-Bot's advanced features designed for those that have already mastered making X-Bots." End Sub Private Sub butAdvConfig_Click() 'Load AdvancedConfig 'AdvancedConfig.Visible = True End Sub Private Sub butCompile_Click() On Error Resume Next butSaveProfile_Click DoEvents Me.Visible = False Load Compiler butRunBot.Enabled = True End Sub Private Sub butCompile_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblHighlightedItem.Caption = Parse(butCompile.Caption, "&", "") lblDescription.Caption = "Click here to compile a bot with all of the settings you have supplied. YOU MUST COMPILE THIS BOT BEFORE RUNNING OR UPLOADING IT!" End Sub Private Sub butDelProfile_Click() On Error Resume Next Dim Confirm As Integer Confirm = MsgBox("Are you sure you want to destroy the profile entitled " & Chr(34) & lstProfile & Chr(34) & " and delete it?", vbYesNoCancel + vbQuestion, App.ProductName) If Confirm = vbNo Then Exit Sub If Confirm = vbCancel Then Exit Sub lstProfile.Enabled = False butSaveProfile.Enabled = False butRevertProfile.Enabled = False butCompile.Enabled = False Kill App.Path & "\windrop\" & lstProfile & ".bs3" Kill App.Path & "\windrop\" & Parse(lstProfile, " ", "") & ".conf" Kill App.Path & "\" & lstProfile.Text & ".bat" DoEvents GetProfiles DoEvents lstProfile.Enabled = True butSaveProfile.Enabled = True butRevertProfile.Enabled = True butCompile.Enabled = True End Sub Private Sub butDelProfile_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblHighlightedItem.Caption = Parse(butDelProfile.Caption, "&", "") lblDescription.Caption = "Click here to delete all current settings to never be recoverable ever again." End Sub Private Sub butHelp_Click() Shell App.Path & "\helpdesk\help.exe", vbNormalFocus End Sub Private Sub butImport_Click() On Error Resume Next Dim ImportFile As String Dim ActualFileName As String Dim Counter As Integer ImportFile = OT_GetFile(Me, App.Path & "\windrop\scripts", ".TCL", "Eggdrop TCL Script (*.tcl)" & Chr(0) & "*.tcl" & Chr(0) & Chr(0), 0, "Import Script", False) ImportFile = Trim(ImportFile) If ImportFile = "" Then Exit Sub ImportFile = Parse(ImportFile, Chr(0), "") ActualFileName = "" 'MsgBox "ImportFile: " & ImportFile & Chr(13) & Chr(10) & "ActualFileName: " & ActualFileName & Chr(13) & Chr(10) & "Counter:" & Counter Counter = 1 Do Until InStr(ActualFileName, "\") ActualFileName = Right(ImportFile, Counter) 'MsgBox "ImportFile: " & ImportFile & "-" & "Counter:" & Counter & "-" & "ActualFileName: " & ActualFileName 'MsgBox ActualFileName ImportFile = Trim(ImportFile) ImportFile = Parse(ImportFile, Chr(0), "") Counter = Counter + 1 Loop On Error Resume Next FileCopy ImportFile, App.Path & "\windrop\scripts" & ActualFileName LoadScripts lstProfile_Click End Sub Private Sub butImport_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblHighlightedItem.Caption = butImport.Caption lblDescription.Caption = "Copies a Eggdrop/Windrop TCL script from anywhere on your computer to the X-Bot TCL Scripts Repository so you may use it in your X-Bots." End Sub Private Sub butRemScript_Click() On Error Resume Next Dim ConfirmDelete As Variant ConfirmDelete = MsgBox("Are you sure you want to remove the script '" & lstScripts & "' from this bot?" & Chr(13) & Chr(10) & Chr(13) & Chr(10) & "Removing this script may remove key features from your bot the next time this bot is compiled.", vbYesNoCancel + vbQuestion, "Delete Script?") If ConfirmDelete = vbCancel Then Exit Sub If ConfirmDelete = vbNo Then Exit Sub ' Don't try to delete last remaining script If lstScripts.ListCount <= 0 Then Exit Sub lstScripts.RemoveItem lstScripts.ListIndex lstScripts.ListIndex = 0 If lstScripts.ListCount < 1 Then butRemScript.Enabled = False End Sub Private Sub butRemScript_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblHighlightedItem.Caption = Parse(butRemScript.Caption, "&", "") lblDescription.Caption = "Click here to remove a scripting module from this bot. This will NOT permanently delete the module from the script library. The script you remove here may be added again later or added to other bots even after it is removed from this bot." End Sub Private Sub butRemServer_Click() On Error Resume Next If lstServers.ListCount = 1 Then 'if only 1 server left MsgBox "Sorry, you may not delete the last remaining IRC server on your server list." & Chr(13) & Chr(10) & Chr(13) & Chr(10) & "X-Bot requires that a bot connect to an IRC server in order to function.", vbExclamation, App.ProductName Exit Sub End If If lstServers.ListIndex = -1 Then 'if nothing selected MsgBox "You must select a server to remove!", vbExclamation, App.ProductName Exit Sub End If lstServers.RemoveItem lstServers.ListIndex lstServers.ListIndex = 0 If lstServers.ListCount = 1 Then butRemServer.Enabled = False End If End Sub Private Sub butRemServer_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblHighlightedItem.Caption = Parse(butRemServer.Caption, "&", "") lblDescription.Caption = "Click here to remove " & lstServers & " from the list of servers this bot may attempt to connect to." 'lblshell.ForeColor = RGB(0, 0, 255) 'lblshell.FontBold = False End Sub Private Sub butRevertProfile_Click() Dim OldCaption As String OldCaption = butRevertProfile.Caption Dim Confirm As Integer Confirm = MsgBox("Are you sure you want to disguard all changes and revert back to the settings in the last saved version of this profile?", vbYesNoCancel + vbQuestion, App.ProductName) If Confirm = vbCancel Then Exit Sub If Confirm = vbNo Then Exit Sub If Confirm = vbYes Then lstProfile.Enabled = False butSaveProfile.Enabled = False butRevertProfile.Enabled = False butCompile.Enabled = False butRevertProfile.Caption = "Reverting..." lstProfile_Change DoEvents butRevertProfile.Caption = OldCaption lstProfile.Enabled = True butSaveProfile.Enabled = True butRevertProfile.Enabled = True butCompile.Enabled = True End If End Sub Private Sub butRevertProfile_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblHighlightedItem.Caption = Parse(butRevertProfile.Caption, "&", "") lblDescription.Caption = "Click here to revert to the previously saved settings for this bot. Note: ALL CHANGES MADE SINCE YOU LAST SAVED THIS BOT WILL BE LOST" End Sub Sub butRunBot_Click() butRunBot.Enabled = True 'Well if the user got this far, the bot probably can be run CSub = "botRunBot_click" If Window.Visible And butRunBot.Enabled = False Then Exit Sub On Error GoTo errorhandler CFile = App.Path & "\" & Window.lstProfile.Text & ".bat" BuildBatchFile CFile = App.Path & "\" & Window.lstProfile.Text & ".bat (Executing)" Dim ReturnValue As String ReturnValue = Shell(App.Path & "\" & Window.lstProfile.Text & ".bat", vbNormalNoFocus) CFile = "" errorhandler: If Err.Number > 0 Then Severe_Error_Msg (Me.Name) Resume Next End If End Sub Sub BuildBatchFile() Open App.Path & "\" & Window.lstProfile.Text & ".bat" For Output As #1 Print #1, "@ECHO off" Print #1, "ECHO Please Stand By: Loading Bot..." Print #1, "TITLE " & Window.lstProfile.Text; " & - X-Bot [Loading... ( 0%)]" Print #1, Left(App.Path, 2) Print #1, "TITLE " & Window.lstProfile.Text & " - X-Bot [Loading... ( 30%)]" Print #1, "" Print #1, "IF EXIST " & App.Path & "\windrop\pid." & Window.lstProfile.Text & " (" Print #1, " ECHO Cleaning up temporary files from last run..." Print #1, " DEL " & App.Path & "\windrop\pid." & Window.lstProfile.Text Print #1, ")" Print #1, "IF EXIST " & App.Path & "\windrop\pid." & txtBotNick.Text & " (" Print #1, " ECHO Cleaning up temporary files from last run..." Print #1, " DEL " & App.Path & "\windrop\pid." & txtBotNick.Text Print #1, ")" Print #1, "IF EXIST " & App.Path & "\windrop\pid." & txtAltNick.Text & " (" Print #1, " ECHO Cleaning up temporary files from last run..." Print #1, " DEL " & App.Path & "\windrop\pid." & txtAltNick.Text Print #1, ")" Print #1, "TITLE " & Window.lstProfile.Text & " - X-Bot [Loading... ( 70%)]" Print #1, "" Print #1, "cd " & App.Path & "\windrop" Print #1, "TITLE " & Window.lstProfile.Text & " - X-Bot [Loading... ( 90%)]" Print #1, "Cls" Print #1, "" If Window.chkSeparateUserfiles.Value = 0 Then 'unchecked - use main userfile Print #1, "IF EXIST " & App.Path & "\windrop\main.user (" Else 'checked - use bots userfile Print #1, "IF EXIST " & App.Path & "\windrop\" & lstProfile & ".user (" End If Print #1, " TITLE " & Window.lstProfile.Text & " - X-Bot [Running]" Print #1, "" Print #1, " ECHO Running X-Bot in normal mode..." Print #1, " ECHO X-Bot is now showing the debug console..." Print #1, " ECHO ----------------------------------------------------------------------" Print #1, "" Print #1, " eggdrop -nt " & Window.lstProfile.Text & ".conf" Print #1, "" Print #1, ") ELSE (" Print #1, " TITLE " & Window.lstProfile.Text & " - X-Bot [Running - Userfile Creation Mode]" Print #1, "" Print #1, " ECHO Running X-Bot in userfile creation mode..." Print #1, " ECHO X-Bot will not display any debug messages until the next time this bot is used." Print #1, " ECHO ----------------------------------------------------------------------" Print #1, "" Print #1, " eggdrop -m " & Window.lstProfile.Text & ".conf" Print #1, ")" Print #1, "" Print #1, "TITLE " & Window.lstProfile.Text & " - X-Bot [No longer running]" Print #1, "ECHO ----------------------------------------------------------------------" Print #1, "ECHO Your bot is no longer running." Print #1, "ECHO ." Print #1, "ECHO You may run your bot again by going to the start menu and clicking run" Print #1, "ECHO and typing the following:" Print #1, "ECHO ." Print #1, "ECHO " & App.Path & "\" & Window.lstProfile.Text & ".bat" Print #1, "ECHO ." Print #1, "ECHO Thank you for using Overtech Technologies Products" Print #1, "ECHO Visit us online at: www.OvertechTechnologies.com" Print #1, "ECHO ." Print #1, "ECHO You may now close this window by clicking the X" Print #1, "ECHO in the upper right corner" Print #1, "ECHO ----------------------------------------------------------------------" Print #1, "cmd" Close End Sub Private Sub butRunBot_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblHighlightedItem.Caption = Parse(butRunBot.Caption, "&", "") lblDescription.Caption = "Click here to run the compiled version of this bot on this computer. PLEASE FOLLOW ALL ON-SCREEN DIRECTIONS IF ANY SHALL FOLLOW." End Sub Sub butSaveProfile_Click() On Error GoTo errorhandler CSub = "butSaveProfile_Click" CFile = App.Path & "\windrop\" & lstProfile.Text & ".bs3" lstProfile.Enabled = False butSaveProfile.Enabled = False butRevertProfile.Enabled = False butCompile.Enabled = False txtBotNick.Text = Trim(txtBotNick.Text) txtAltNick.Text = Trim(txtAltNick.Text) 'butSaveProfile.Caption = "Saving..." ProfileSaveItem "bot-solutions", "botadmin", txtBotAdmin.Text, App.Path & "\windrop\" & lstProfile.Text & ".bs3" ProfileSaveItem "bot-solutions", "organization", txtOrganization.Text, App.Path & "\windrop\" & lstProfile.Text & ".bs3" ProfileSaveItem "bot-solutions", "cryptkey", txtCryptKey.Text, App.Path & "\windrop\" & lstProfile.Text & ".bs3" ProfileSaveItem "bot-solutions", "home", txtHome.Text, App.Path & "\windrop\" & lstProfile.Text & ".bs3" ProfileSaveItem "bot-solutions", "kwarn", Int(ChkKWarn.Value), App.Path & "\windrop\" & lstProfile.Text & ".bs3" ProfileSaveItem "bot-solutions", "mschatwarn", Int(ChkMsChatWarn.Value), App.Path & "\windrop\" & lstProfile.Text & ".bs3" ProfileSaveItem "bot-solutions", "deopwarn", Int(ChkDeOpWarn.Value), App.Path & "\windrop\" & lstProfile.Text & ".bs3" ProfileSaveItem "bot-solutions", "bcast", Int(ChkBCast.Value), App.Path & "\windrop\" & lstProfile.Text & ".bs3" ProfileSaveItem "bot-solutions", "easykey", txtEasyKey.Text, App.Path & "\windrop\" & lstProfile.Text & ".bs3" ProfileSaveItem "bot-solutions", "easybotnet", txtEasyBotnet.Text, App.Path & "\windrop\" & lstProfile.Text & ".bs3" ProfileSaveItem "eggdrop", "botnick", txtBotNick.Text, App.Path & "\windrop\" & lstProfile.Text & ".bs3" ProfileSaveItem "eggdrop", "altnick", txtAltNick.Text, App.Path & "\windrop\" & lstProfile.Text & ".bs3" ProfileSaveItem "eggdrop", "timezone", txtTimeZone.Text, App.Path & "\windrop\" & lstProfile.Text & ".bs3" ProfileSaveItem "eggdrop", "port", txtTelnet.Text, App.Path & "\windrop\" & lstProfile.Text & ".bs3" ProfileSaveItem "eggdrop", "suserfiles", Int(chkSeparateUserfiles.Value), App.Path & "\windrop\" & lstProfile.Text & ".bs3" ProfileSaveItem "eggdrop-servers", "total", lstServers.ListCount, App.Path & "\windrop\" & lstProfile.Text & ".bs3" Dim Counter As Integer For Counter = 0 To (lstServers.ListCount - 1) lstServers.ListIndex = Counter ProfileSaveItem "eggdrop-servers", "server" & (Counter + 1), lstServers, App.Path & "\windrop\" & lstProfile.Text & ".bs3" Next Counter 'Special Scripts ' Maintain bkg list of scripts for ease of file manipulation lstScripts.Clear 'Dim Counter As Integer For Counter = 0 To ScriptFile.ListCount - 1 If CScriptsArr(Counter, 1) <> 0 Then ScriptFile.ListIndex = Counter lstScripts.AddItem ScriptFile End If Next Counter ' done maintaining background script list ProfileSaveItem "custom-scripts", "total", lstScripts.ListCount, App.Path & "\windrop\" & lstProfile.Text & ".bs3" For Counter = 0 To (lstScripts.ListCount - 1) lstScripts.ListIndex = Counter ProfileSaveItem "custom-scripts", "script" & (Counter + 1), lstScripts, App.Path & "\windrop\" & lstProfile.Text & ".bs3" Next Counter DoEvents lstProfile_Change DoEvents 'butSaveProfile.Caption = "&Save These Settings" butSaveProfile.Enabled = True lstProfile.Enabled = True butRevertProfile.Enabled = True butCompile.Enabled = True CFile = "" errorhandler: If Err.Number > 0 Then Severe_Error_Msg (Me.Name) Resume Next End If End Sub Private Sub butSaveProfile_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblHighlightedItem.Caption = Parse(butSaveProfile.Caption, "&", "") lblDescription.Caption = "This saves all the settings for this profile for future use." End Sub Private Sub butShell_Click() frmShell.Visible = False Load frmShell frmShell.Visible = True End Sub Private Sub butShell_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblHighlightedItem.Caption = Parse(butShell.Caption, "&", "") lblDescription.Caption = "Click here to post your bots to a shell." End Sub Private Sub butUpload_Click() MsgBox "Sorry, this feature has not yet been implemented", vbOKOnly + vbInformation, "Upload Bot to Shell..." End Sub Private Sub ChkBCast_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblHighlightedItem.Caption = ChkBCast.Caption lblDescription.Caption = "Do you want the bot to broadcast all authentication notifications as well as bot usage to the bot's home channel?" End Sub Private Sub ChkDeOpWarn_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblHighlightedItem.Caption = ChkDeOpWarn.Caption lblDescription.Caption = "Do you want the bot to warn users deopping this bot and report such activities to the bot's home channel?" End Sub Private Sub ChkKWarn_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblHighlightedItem.Caption = ChkKWarn.Caption lblDescription.Caption = "Do you want the bot to warn users about kicking the bot? If the bot is kicked from any channel, it will alert the home channel, warn the user who kicked it, and warn the channel it was kicked from." End Sub Private Sub ChkMsChatWarn_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblHighlightedItem.Caption = ChkMsChatWarn.Caption lblDescription.Caption = "Do you want the bot to warn users about using Microsoft Chat and tell them how to disable it?" End Sub Private Sub chkSeparateUserfiles_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblHighlightedItem.Caption = chkSeparateUserfiles.Caption lblDescription.Caption = "Do you want the bot to use the same userfile (share the same users) as the other bots you're making or do you wish for this bot to use it's own userfile (separate from all other bots you make)?" End Sub Sub cmdDNSConfig_Click() Shell App.Path & "\dnsconfig.exe " & App.Path, vbNormalFocus DoEvents End Sub Sub cmdEditEggdropConf_Click() On Error Resume Next Shell "write " & Chr(34) & App.Path & "\windrop\" & lstProfile.Text & ".conf" & Chr(34), vbNormalFocus End Sub Sub cmdEditResolvConf_Click() On Error Resume Next Shell "write " & Chr(34) & App.Path & "\windrop\resolv.conf" & Chr(34), vbNormalFocus End Sub Sub cmdExportChans_Click() Dim FromFile As String Dim ToFile As String FromFile = Trim(Parse(OT_GetFile(Me, App.Path & "\windrop", ".CHAN", "X-Bot and Eggdrop Channel Files (.CHAN)" & Chr(0) & "*.CHAN" & Chr(0) & Chr(0), 0, "Select Channel File to Export", False), Chr(0), "")) If FromFile = "" Then Exit Sub ToFile = Trim(Parse(OT_GetFile(Me, App.Path & "\windrop", ".CHAN", "X-Bot and Eggdrop Channel Files (.CHAN)" & Chr(0) & "*.CHAN" & Chr(0) & Chr(0), 0, "Export Channel File As... - Exporting from: " & FromFile, True), Chr(0), "")) If ToFile = "" Then Exit Sub If ToFile <> FromFile Then On Error Resume Next Kill ToFile FileCopy FromFile, ToFile End If MsgBox "Successfully exported channel file '" & FromFile & "' to '" & ToFile & "'", vbInformation + vbOKOnly, "Export X-Bot Channel File" End Sub Sub cmdExportEggdropConf_Click() Dim FromFile As String Dim ToFile As String GetNewFromFile: FromFile = Trim(Parse(OT_GetFile(Me, App.Path & "\windrop", ".CONF", "Eggdrop Configuration Files (.CONF)" & Chr(0) & "*.CONF" & Chr(0) & Chr(0), 0, "Select Eggdrop Configuration File to Export", False), Chr(0), "")) If FromFile = "" Then Exit Sub ' Don't allow to export template If LCase(FromFile) = LCase(App.Path & "eggdrop.conf") Then FromFile = MsgBox("'" & FromFile & "' is a X-Bot Template Configuration File and therefore cannot be exported." & Chr(13) & Chr(10) & Chr(13) & Chr(10) & "Reasons we do not allow this file to be exported:" & Chr(13) & Chr(10) & "- Not Compatible with Eggdrop clients" & Chr(13) & Chr(10) & "- No one else can make any practical use of this file", vbInformation + vbOKCancel, "Export Eggdrop .CONF File") If FromFile = vbCancel Then Exit Sub GoTo GetNewFromFile End If ToFile = Trim(Parse(OT_GetFile(Me, App.Path & "\windrop", ".CONF", "Eggdrop User Files (.CONF)" & Chr(0) & "*.CONF" & Chr(0) & Chr(0), 0, "Export Eggdrop Configuration File As... - Exporting from: " & FromFile, True), Chr(0), "")) If ToFile = "" Then Exit Sub If ToFile <> FromFile Then On Error Resume Next Kill ToFile FileCopy FromFile, ToFile End If MsgBox "Successfully exported eggdrop configuration file '" & FromFile & "' to '" & ToFile & "'", vbInformation + vbOKOnly, "Export Eggdrop Configuration File" End Sub Sub cmdExportNotes_Click() Dim FromFile As String Dim ToFile As String FromFile = Trim(Parse(OT_GetFile(Me, App.Path & "\windrop", ".NOTES", "X-Bot and Eggdrop Notes Files (.NOTES)" & Chr(0) & "*.NOTES" & Chr(0) & Chr(0), 0, "Select Notes File to Export", False), Chr(0), "")) If FromFile = "" Then Exit Sub ToFile = Trim(Parse(OT_GetFile(Me, App.Path & "\windrop", ".NOTES", "X-Bot and Eggdrop Notes Files (.NOTES)" & Chr(0) & "*.NOTES" & Chr(0) & Chr(0), 0, "Export Notes File As... - Exporting from: " & FromFile, True), Chr(0), "")) If ToFile = "" Then Exit Sub If ToFile <> FromFile Then On Error Resume Next Kill ToFile FileCopy FromFile, ToFile End If MsgBox "Successfully exported notes file '" & FromFile & "' to '" & ToFile & "'", vbInformation + vbOKOnly, "Export X-Bot Notes File" End Sub Sub cmdExportUsers_Click() Dim FromFile As String Dim ToFile As String FromFile = Trim(Parse(OT_GetFile(Me, App.Path & "\windrop", ".USER", "X-Bot and Eggdrop User Files (.USER)" & Chr(0) & "*.USER" & Chr(0) & Chr(0), 0, "Select User File to Export", False), Chr(0), "")) If FromFile = "" Then Exit Sub ToFile = Trim(Parse(OT_GetFile(Me, App.Path & "\windrop", ".USER", "X-Bot and Eggdrop User Files (.USER)" & Chr(0) & "*.USER" & Chr(0) & Chr(0), 0, "Export User File As... - Exporting from: " & FromFile, True), Chr(0), "")) If ToFile = "" Then Exit Sub If ToFile <> FromFile Then On Error Resume Next Kill ToFile FileCopy FromFile, ToFile End If MsgBox "Successfully exported user file '" & FromFile & "' to '" & ToFile & "'", vbInformation + vbOKOnly, "Export X-Bot User File" End Sub Sub cmdImportChans_Click() Dim FromFile As String FromFile = Trim(Parse(OT_GetFile(Me, App.Path & "\windrop", ".CHAN", "X-Bot and Eggdrop Channel Files (.CHAN)" & Chr(0) & "*.CHAN" & Chr(0) & Chr(0), 0, "Select Channel File to Import", False), Chr(0), "")) If FromFile = "" Then Exit Sub Load ImportWindow ImportWindow.FileType.Caption = ".CHAN" ImportWindow.OldFile.Caption = FromFile ImportWindow.Visible = True End Sub Sub cmdImportNotes_Click() Dim FromFile As String FromFile = Trim(Parse(OT_GetFile(Me, App.Path & "\windrop", ".NOTES", "X-Bot and Eggdrop Notes Files (.NOTES)" & Chr(0) & "*.NOTES" & Chr(0) & Chr(0), 0, "Select Notes File to Import", False), Chr(0), "")) If FromFile = "" Then Exit Sub Load ImportWindow ImportWindow.FileType.Caption = ".NOTES" ImportWindow.OldFile.Caption = FromFile ImportWindow.Visible = True End Sub Sub cmdImportUsers_Click() Dim FromFile As String FromFile = Trim(Parse(OT_GetFile(Me, App.Path & "\windrop", ".USER", "X-Bot and Eggdrop User Files (.USER)" & Chr(0) & "*.USER" & Chr(0) & Chr(0), 0, "Select User File to Import", False), Chr(0), "")) If FromFile = "" Then Exit Sub Load ImportWindow ImportWindow.FileType.Caption = ".USER" ImportWindow.OldFile.Caption = FromFile ImportWindow.Visible = True End Sub Sub cmdRunInBkg_Click() ChDrive Left(App.Path, 1) & ":" ChDir App.Path & "\windrop\" Open App.Path & "\" & Window.lstProfile.Text & ".bkg.bat" For Output As #1 Print #1, "@ECHO off" Print #1, "ECHO Please Stand By: Loading Bot..." Print #1, "TITLE " & Window.lstProfile.Text & " - X-Bot [Loading... ( 0%)]" Print #1, Left(App.Path, 2) Print #1, "TITLE " & Window.lstProfile.Text & " - X-Bot [Loading... ( 30%)]" Print #1, "" Print #1, "IF EXIST " & App.Path & "\windrop\pid." & Window.lstProfile.Text & " (" Print #1, " ECHO Cleaning up temporary files from last run..." Print #1, " DEL " & App.Path & "\windrop\pid." & Window.lstProfile.Text Print #1, ")" Print #1, "IF EXIST " & App.Path & "\windrop\pid." & txtBotNick.Text & " (" Print #1, " ECHO Cleaning up temporary files from last run..." Print #1, " DEL " & App.Path & "\windrop\pid." & txtBotNick.Text Print #1, ")" Print #1, "IF EXIST " & App.Path & "\windrop\pid." & txtAltNick.Text & " (" Print #1, " ECHO Cleaning up temporary files from last run..." Print #1, " DEL " & App.Path & "\windrop\pid." & txtAltNick.Text Print #1, ")" Print #1, "TITLE " & Window.lstProfile.Text & " - X-Bot [Loading... ( 70%)]" Print #1, "" Print #1, "cd " & App.Path & "\windrop" Print #1, "TITLE " & Window.lstProfile.Text & " - X-Bot [Loading... ( 90%)]" Print #1, "Cls" Print #1, "" Print #1, "IF EXIST " & App.Path & "\windrop\main.user (" Print #1, " TITLE " & Window.lstProfile.Text & " - X-Bot [Running]" Print #1, "" Print #1, " ECHO Running X-Bot in normal mode..." Print #1, " ECHO X-Bot is now showing the debug console..." Print #1, " ECHO ----------------------------------------------------------------------" Print #1, "" Print #1, " start eggdrop.exe " & Window.lstProfile.Text & ".conf" Print #1, "" Print #1, ") ELSE (" Print #1, " TITLE " & Window.lstProfile.Text & " - X-Bot [Running - Userfile Creation Mode]" Print #1, "" Print #1, " ECHO Running X-Bot in userfile creation mode..." Print #1, " ECHO X-Bot will not display any debug messages until the next time this bot is used." Print #1, " ECHO ----------------------------------------------------------------------" Print #1, "" Print #1, " start eggdrop -m " & Window.lstProfile.Text & ".conf" Print #1, ")" Print #1, "Exit" Print #1, "Close" Close CFile = App.Path & "\" & Window.lstProfile.Text & ".bkg.bat (Executing)" Dim ReturnValue As String ReturnValue = Shell(App.Path & "\" & Window.lstProfile.Text & ".bkg.bat", vbNormalNoFocus) CFile = "" End Sub Private Sub CustomScript_Click(Index As Integer) ' This doesn't do too well with the active Dim Counter As Integer For Counter = 0 To ScriptFile.ListCount - 1 If Index + VScroll1.Value = Counter Then CScriptsArr(Counter, 1) = CustomScript(Index).Value End If Next Counter VScroll1_Change butAddScript.Enabled = True End Sub Private Sub CustomScript_MouseDown(Index As Integer, button As Integer, Shift As Integer, x As Single, y As Single) ' Doesn't do so great with checkboxes Dim Counter As Integer For Counter = 0 To 32766 If Index + VScroll1.Value = Counter Then CScriptsArr(Counter, 2) = 1 ScriptFile.ListIndex = Counter butAddScript.Caption = "&Edit " & ScriptFile & "..." Else CScriptsArr(Counter, 2) = 0 End If Next Counter VScroll1_Change butAddScript.Enabled = True End Sub Private Sub CustomScript_MouseMove(Index As Integer, button As Integer, Shift As Integer, x As Single, y As Single) 'Dim Counter As Integer ' 'For Counter = 0 To 7 ' If Counter = Index Then ' CustomScript(Index).FontUnderline = True ' Else ' CustomScript(Counter).FontUnderline = True ' End If 'Next Counter End Sub Private Sub Form_Load() On Error Resume Next 'load this to enable demo mode 'Load DemoMode frmSplash.Caption = "Loading...." mnuAdvanced.Visible = False ' Finalize Installation First 'Finalize_Install 'Unload Install ' Load Images Me.Icon = xsplash.Icon ConstructionImage.Picture = xsplash.ConstructionImage.Picture butHelp.Picture = xsplash.button.Picture butAddProfile.Picture = xsplash.button.Picture butDelProfile.Picture = xsplash.button.Picture butSaveProfile.Picture = xsplash.button.Picture butRevertProfile.Picture = xsplash.button.Picture 'butRunBot.Picture = xsplash.Button.Picture butCompile.Picture = xsplash.button.Picture butAdvanced.Picture = xsplash.button.Picture butAddProfile.Picture = xsplash.button.Picture butAddServer.Picture = xsplash.button.Picture butRemServer.Picture = xsplash.button.Picture butAddScript.Picture = xsplash.button.Picture butImport.Picture = xsplash.button.Picture butRunBot.Picture = xsplash.button.Picture 'Me.Left = (Screen.Width - Me.Width) / 2 'Me.Top = (Screen.Height - Me.Height) / 2 'txtDeOpWarn.AddItem "0 - No" 'txtDeOpWarn.AddItem "1 - Yes" 'txtDeOpWarn.Text = "1 - Yes" 'txtMsChatWarn.AddItem "0 - No" 'txtMsChatWarn.AddItem "1 - Yes" 'txtMsChatWarn.Text = "1 - Yes" 'txtKWarn.AddItem "0 - No" 'txtKWarn.AddItem "1 - Yes" 'txtKWarn.Text = "1 - Yes" 'txtBCast.AddItem "0 - No" 'txtBCast.AddItem "1 - Yes" 'txtBCast.Text = "0 - No" 'lstFiles.AddItem "Eggdrop.conf" 'lstFiles.AddItem "bot-solutions.3.0.conf" 'lstFiles.Text = "bot-solutions.3.0.conf" ' Files frmSplash.Caption = "Gathering list of available scripts..." LoadScripts File1.Path = App.Path & "\windrop" frmSplash.Caption = "Loading list of configuration profiles..." GetProfiles frmSplash.Caption = "Done." 'GentleOpen Me 'Me.Visible = True 'lstFiles_Click lblDescription.Caption = lblDescription.Caption & " " End Sub Sub LoadScripts() On Error Resume Next ScriptFile.Path = App.Path & "\windrop\" ScriptFile.Path = App.Path & "\windrop\scripts" ScriptFile.ListIndex = 0 Dim Counter As Integer For Counter = 0 To ScriptFile.ListCount - 1 CScriptsArr(Counter, 1) = 0 CScriptsArr(Counter, 2) = 0 CScriptsArr(Counter, 3) = 0 Next Counter VScroll1.Min = 1 If ScriptFile.ListCount < 8 Then VScroll1.Max = 1 Else VScroll1.Max = ScriptFile.ListCount - 8 End If butAddScript.Caption = "&Edit This Custom Script" butAddScript.Enabled = False VScroll1_Change End Sub Private Sub Form_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) 'lblshell.ForeColor = RGB(0, 0, 255) 'lblshell.FontBold = False End Sub Private Sub Form_Resize() On Error Resume Next 'Advanced 'Advanced.Height = Window.Height - Highlight.Height - 350 'FileContents.Width = Advanced.Width 'AdvancedBottom.Width = Advanced.Width + 100 'butSave.Left = Advanced.Width - butSave.Width - 100 ' 'AdvancedBottom.Top = Advanced.Height - AdvancedBottom.Height 'butRevert.Top = AdvancedBottom.Top + 60 'butSave.Top = butRevert.Top ' 'FileContents.Height = Advanced.Height - AdvancedBottom.Height - (lstFiles.Top + lstFiles.Height) 'Window 'butAbout.Left = Advanced.Width - butAbout.Width - 100 'Basic 'Basic.Width = Advanced.Width 'Basic.Height = Advanced.Height 'Header.Width = Basic.Width butDelProfile.Left = Window.ScaleWidth - butDelProfile.Width - 50 butAddProfile.Left = butDelProfile.Left - butAddProfile.Width - 50 lstProfile.Width = butAddProfile.Left - lstProfile.Left - 50 BasicBorder.X2 = Window.ScaleWidth lblHighlightedItem.Width = Window.ScaleWidth 'lblDescription.Width = Basic.Width 'lblDescription.Height = Basic.Height - lblDescription.Top End Sub Private Sub Form_Unload(Cancel As Integer) GentleClose Me End End Sub Private Sub lblAltNick_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblHighlightedItem.Caption = lblAltNick.Caption lblDescription.Caption = "If the bot cannot receive the nickname stated above due to an error on the IRC server, invalid nick or the fact that nick is already taken - this nick will be used as the bot's nickname on IRC." End Sub Private Sub lblBotAdmin_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblHighlightedItem.Caption = lblBotAdmin.Caption lblDescription.Caption = "Who is the bot's admin? This info will be used when some requests it from the admin command. It is strongly suggested you change the default." End Sub Private Sub lblBotNick_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblHighlightedItem.Caption = lblBotNick.Caption lblDescription.Caption = "This will the nickname/screenname of the bot once it is on IRC or communicating with other bots on a botnet." End Sub Private Sub lblCEditing_MouseDown(button As Integer, Shift As Integer, x As Single, y As Single) 'If Button = 2 Then ' TestInterface.Visible = True 'End If End Sub Sub lblCryptKey_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblHighlightedItem.Caption = lblCryptKey.Caption lblDescription.Caption = "When you use the global authing ability, the tcl encrypts your password before sending it out across the internet. Set this item to a key to use for encrypting. Note, All bots on your botnet must use the same key. KEEP THIS KEY CONFIDENTIAL WITH ONLY TRUSTED PEOPLE OR IT COULD LEAD TO A NETWORK COMPROMISE!!!!" End Sub Sub lblCustomScripts_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblHighlightedItem.Caption = lblCustomScripts.Caption lblDescription.Caption = "This is a list of eggdrop/windrop TCL scripting modules which you have added to this bot to enhance it's functionality." End Sub Private Sub lblDescription_Change() HighlightCover.Left = 15 'lblDescription.Height = 15 Timer1.Enabled = True End Sub Private Sub lblDescription_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) 'lblshell.ForeColor = RGB(0, 0, 255) 'lblshell.FontBold = False End Sub Private Sub lblEasyBotnet_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblHighlightedItem.Caption = lblEasyBotnet.Caption lblDescription.Caption = "Want other bots you own to respond to the same string to save time? Then you need to set easybotnet in each bot exactly alike. For example if you set it to * here, you need to set it to * on your other bots." End Sub Sub lblEasyKey_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblHighlightedItem.Caption = lblEasyKey.Caption lblDescription.Caption = "The easykey feature. This is a shortcut. Whatever you set this to you can type like if the bot's nick is Bot and you set easykey to b you can type b instead of Bot - I think it's pretty nifty." End Sub Private Sub lblHighlightedItem_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) 'lblshell.ForeColor = RGB(0, 0, 255) 'lblshell.FontBold = False End Sub Private Sub lblHome_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblHighlightedItem.Caption = lblHome.Caption lblDescription.Caption = "What's the administrative channel for this bot to report all errors and all that other good stuff to?" End Sub Private Sub lblOrganization_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblHighlightedItem.Caption = lblOrganization.Caption lblDescription.Caption = "Whats the name of the organization this copy of X-Bot is registered to? (E.G Acme Bot Company.)" End Sub Private Sub lblServers_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblHighlightedItem.Caption = lblServers.Caption lblDescription.Caption = "This is a list if the IRC servers your bot will attempt to connect to. It is suggested you specify specific servers instead of a general IRC network address to allow the bot to connect and re-connect faster." End Sub Sub lblTelnet_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblHighlightedItem.Caption = lblTelnet.Caption lblDescription.Caption = "This is the port number that the bot should use to communicate with other bots through the telnet protocol." End Sub Private Sub lblTimeZone_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblHighlightedItem.Caption = lblTimeZone.Caption lblDescription.Caption = "This is a THREE DIGIT timezone code for the timezone your bot is located in (Your timezone)(i.e. CET, CDT, CST, GMT)." End Sub Sub lstProfile_Change() lstProfile_Click End Sub Sub lstProfile_Click() ' used to load all settings On Error GoTo Errorhandler2 CSub = "lstProfile_Click" butRunBot.Enabled = False lstServers.Clear lstScripts.Clear CFile = App.Path & "\windrop\" & lstProfile.Text & ".bs3" txtBotAdmin.Text = ProfileGetItem("bot-solutions", "botadmin", "", App.Path & "\windrop\" & lstProfile.Text & ".bs3") txtOrganization.Text = ProfileGetItem("bot-solutions", "organization", "", App.Path & "\windrop\" & lstProfile.Text & ".bs3") txtCryptKey.Text = ProfileGetItem("bot-solutions", "cryptkey", "", App.Path & "\windrop\" & lstProfile.Text & ".bs3") txtHome.Text = ProfileGetItem("bot-solutions", "home", "", App.Path & "\windrop\" & lstProfile.Text & ".bs3") ChkKWarn.Value = CInt(ProfileGetItem("bot-solutions", "kwarn", "1", App.Path & "\windrop\" & lstProfile.Text & ".bs3")) ChkMsChatWarn.Value = CInt(ProfileGetItem("bot-solutions", "mschatwarn", "1", App.Path & "\windrop\" & lstProfile.Text & ".bs3")) ChkDeOpWarn.Value = CInt(ProfileGetItem("bot-solutions", "deopwarn", "1", App.Path & "\windrop\" & lstProfile.Text & ".bs3")) ChkBCast.Value = CInt(ProfileGetItem("bot-solutions", "bcast", "0", App.Path & "\windrop\" & lstProfile.Text & ".bs3")) txtEasyKey.Text = ProfileGetItem("bot-solutions", "easykey", "", App.Path & "\windrop\" & lstProfile.Text & ".bs3") txtEasyBotnet.Text = ProfileGetItem("bot-solutions", "easybotnet", "", App.Path & "\windrop\" & lstProfile.Text & ".bs3") txtBotNick.Text = ProfileGetItem("eggdrop", "botnick", "", App.Path & "\windrop\" & lstProfile.Text & ".bs3") txtAltNick.Text = ProfileGetItem("eggdrop", "altnick", "", App.Path & "\windrop\" & lstProfile.Text & ".bs3") txtTimeZone.Text = ProfileGetItem("eggdrop", "timezone", "", App.Path & "\windrop\" & lstProfile.Text & ".bs3") txtTelnet.Text = ProfileGetItem("eggdrop", "port", "3333", App.Path & "\windrop\" & lstProfile.Text & ".bs3") chkSeparateUserfiles.Value = ProfileGetItem("eggdrop", "suserfiles", "0", App.Path & "\windrop\" & lstProfile.Text & ".bs3") Dim Counter As Integer For Counter = 1 To CInt(ProfileGetItem("eggdrop-servers", "total", "0", App.Path & "\windrop\" & lstProfile.Text & ".bs3")) lstServers.AddItem ProfileGetItem("eggdrop-servers", "server" & Counter, "", App.Path & "\windrop\" & lstProfile.Text & ".bs3") Next Counter lstServers.ListIndex = 0 On Error Resume Next ' Load scripts into background listbox For Counter = 1 To CInt(ProfileGetItem("custom-scripts", "total", "0", App.Path & "\windrop\" & lstProfile.Text & ".bs3")) lstScripts.AddItem ProfileGetItem("custom-scripts", "script" & Counter, "", App.Path & "\windrop\" & lstProfile.Text & ".bs3") Next Counter lstScripts.ListIndex = 0 ' Load into Cscripts array Dim Counter2 As Integer For Counter = 0 To ScriptFile.ListCount For Counter2 = 0 To lstScripts.ListCount ScriptFile.ListIndex = Counter lstScripts.ListIndex = Counter2 If ScriptFile = lstScripts Then CScriptsArr(Counter, 1) = 1 End If Next Counter2 ' permanent scripts, shouldn't be disabled If LCase(ScriptFile) = "bot-solutions.3.0.tcl" Or _ LCase(ScriptFile) = "alltools.tcl" Or _ LCase(ScriptFile) = "action.fix.tcl" Or _ LCase(ScriptFile) = "compat.tcl" Then CScriptsArr(Counter, 3) = 1 End If Next Counter 'show contents of array properly VScroll1_Change If lstScripts.ListCount < 1 Then butRemScript.Enabled = False On Error GoTo Errorhandler2 'Check if previously compiled Dim Garbage As String On Error GoTo errorhandler: Open App.Path & "\" & lstProfile & ".bat" For Input As #1 Line Input #1, Garbage butRunBot.Enabled = True Close #1 If lstServers.ListCount = 1 Then butRemServer.Enabled = False Else butRemServer.Enabled = True End If errorhandler: If Err.Number > 0 Then Exit Sub CFile = "" Errorhandler2: If Err.Number > 0 Then Severe_Error_Msg (Me.Name) Resume Next End If End Sub Private Sub lstScripts_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblCustomScripts_MouseMove 1, 1, 1, 1 End Sub Private Sub lstServers_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblServers_MouseMove button, Shift, x, y 'lblshell.ForeColor = RGB(0, 0, 255) 'lblshell.FontBold = False End Sub Private Sub Timer1_Timer() If HighlightCover.Left <= lblHighlightedItem.Width + lblHighlightedItem.Left Then HighlightCover.Left = HighlightCover.Left + 100 Else Timer1.Enabled = False End If End Sub Private Sub txtAltNick_KeyPress(KeyAscii As Integer) If InStr(txtAltNick.Text, " ") Then MsgBox "Sorry, spaces are not allowed in nicknames!", vbInformation, App.ProductName End Sub Private Sub txtAltNick_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblAltNick_MouseMove button, Shift, x, y End Sub Private Sub txtBotAdmin_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblBotAdmin_MouseMove button, Shift, x, y End Sub Private Sub txtBotNick_KeyPress(KeyAscii As Integer) If InStr(txtBotNick.Text, " ") Then MsgBox "Sorry, spaces are not allowed in nicknames!", vbInformation, App.ProductName End Sub Private Sub txtBotNick_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblBotNick_MouseMove button, Shift, x, y End Sub Private Sub txtCryptKey_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblCryptKey_MouseMove button, Shift, x, y End Sub Private Sub txtEasyBotnet_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblEasyBotnet_MouseMove button, Shift, x, y End Sub Private Sub txtEasyKey_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblEasyKey_MouseMove button, Shift, x, y End Sub Private Sub txtHome_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblHome_MouseMove button, Shift, x, y End Sub Private Sub txtOrganization_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblOrganization_MouseMove button, Shift, x, y End Sub Private Sub txtTelnet_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblTelnet_MouseMove button, Shift, x, y End Sub Private Sub txtTimeZone_MouseMove(button As Integer, Shift As Integer, x As Single, y As Single) lblTimeZone_MouseMove button, Shift, x, y End Sub Sub VScroll1_Change() On Error Resume Next Dim Counter As Integer For Counter = 0 To 8 If Counter + VScroll1.Value >= ScriptFile.ListCount Then CustomScript(Counter).Visible = False Else ' if disabled (locked) then... If CScriptsArr(Counter + VScroll1.Value, 3) = 1 Then 'change to greyed checkbox CScriptsArr(Counter + VScroll1.Value, 1) = 2 'disable the box CustomScript(Counter).Enabled = False Else CustomScript(Counter).Enabled = True End If CustomScript(Counter).Value = CScriptsArr(Counter + VScroll1.Value, 1) If CScriptsArr(Counter + VScroll1.Value, 2) = 1 Then CustomScript(Counter).ForeColor = RGB(255, 0, 0) CustomScript(Counter).BackColor = &HC0C0C0 CustomScript(Counter).FontBold = True Else 'If CScriptsArr(Counter + VScroll1.Value, 2) = 0 Then CustomScript(Counter).ForeColor = RGB(0, 0, 255) CustomScript(Counter).BackColor = &HE0E0E0 CustomScript(Counter).FontBold = False End If ScriptFile.ListIndex = (Counter + VScroll1.Value) CustomScript(Counter).Caption = ScriptFile CustomScript(Counter).Visible = True End If Next Counter ' combat a bug If butAddScript.Caption = "&Edit This Custom Script" Then butAddScript.Enabled = False End Sub Private Sub VScroll1_Scroll() VScroll1_Change End Sub