VERSION 5.00 Begin VB.Form Window AutoRedraw = -1 'True BackColor = &H00FFFFFF& Caption = "X-Bot by LogicX Software" 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.CheckBox ChkDeOpWarn BackColor = &H00FFFFFF& Caption = "Warn Users About DeOpping This Bot" Height = 255 Left = 4680 TabIndex = 54 Top = 2280 Width = 3015 End Begin VB.CheckBox ChkMsChatWarn BackColor = &H00FFFFFF& Caption = "Warn Users About Using Comic Chat" Height = 255 Left = 4680 TabIndex = 53 Top = 2040 Width = 3015 End Begin VB.CheckBox ChkBCast BackColor = &H00FFFFFF& Caption = "Broadcast Bot Usage to Home Channel" Height = 255 Left = 4680 TabIndex = 52 Top = 1800 Width = 3135 End Begin VB.CheckBox ChkKWarn BackColor = &H00FFFFFF& Caption = "Warn Users About Kicking the Bot" Height = 255 Left = 4680 TabIndex = 51 Top = 1560 Width = 2775 End Begin VB.TextBox txtTelnet Height = 285 Left = 5760 TabIndex = 49 Text = "3333" Top = 840 Width = 615 End Begin VB.CommandButton butRemScript BackColor = &H00FFFFFF& Caption = "&Remove Script" DisabledPicture = "Bot-Solutions.frx":000C DownPicture = "Bot-Solutions.frx":6A9E Height = 315 Left = 3840 MaskColor = &H008080FF& Style = 1 'Graphical TabIndex = 48 Top = 5400 Visible = 0 'False Width = 1215 End Begin VB.FileListBox ScriptFile Height = 285 Left = 1080 Pattern = "*.tcl" TabIndex = 46 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 = 45 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 = 44 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 = 43 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 = 42 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 = 41 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 = 40 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 = 39 Top = 3240 Width = 3130 End Begin VB.VScrollBar VScroll1 Height = 1935 Left = 7800 TabIndex = 38 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 = 37 Top = 3000 Width = 3130 End Begin VB.CommandButton butSaveProfile Caption = "&Save These Settings" DisabledPicture = "Bot-Solutions.frx":D530 DownPicture = "Bot-Solutions.frx":21AF6 Height = 255 Left = 120 Style = 1 'Graphical TabIndex = 33 Top = 3960 Width = 1695 End Begin VB.CommandButton butRevertProfile Caption = "&Revert to Previous Settings" DisabledPicture = "Bot-Solutions.frx":360BC DownPicture = "Bot-Solutions.frx":4A682 Height = 255 Left = 1920 Style = 1 'Graphical TabIndex = 32 Top = 3960 Width = 2295 End Begin VB.CommandButton butCompile Cancel = -1 'True Caption = "Save && &Compile Bot With Above Settings And Run on This Computer." Default = -1 'True DisabledPicture = "Bot-Solutions.frx":5EC48 DownPicture = "Bot-Solutions.frx":7320E BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 465 Left = 120 Style = 1 'Graphical TabIndex = 31 Top = 4320 Width = 4095 End Begin VB.Timer Timer1 Interval = 50 Left = 7320 Top = 5280 End Begin VB.CommandButton butAddScript BackColor = &H00FFFFFF& Caption = "&Edit This Custom Script" DisabledPicture = "Bot-Solutions.frx":877D4 DownPicture = "Bot-Solutions.frx":8E266 Enabled = 0 'False Height = 315 Left = 4680 MaskColor = &H00004040& Style = 1 'Graphical TabIndex = 30 Top = 4920 Width = 3375 End Begin VB.ListBox lstScripts Height = 645 Left = 4920 TabIndex = 29 Top = 5400 Visible = 0 'False Width = 3135 End Begin VB.CommandButton butAdvanced Caption = "Advanced Commands..." Height = 255 Left = 120 Style = 1 'Graphical TabIndex = 28 Top = 4920 Width = 4095 End Begin VB.TextBox txtBotNick Height = 285 Left = 1320 MaxLength = 32 TabIndex = 23 Text = "BSol_TCL3" Top = 1920 Width = 2535 End Begin VB.TextBox txtTimeZone Height = 285 Left = 5760 TabIndex = 22 Text = "EST" Top = 480 Width = 615 End Begin VB.ListBox lstServers Height = 645 Left = 120 TabIndex = 20 Top = 3000 Width = 2775 End Begin VB.CommandButton butAddServer BackColor = &H00FFFFFF& Caption = "&Add IRC Server" DisabledPicture = "Bot-Solutions.frx":94CF8 DownPicture = "Bot-Solutions.frx":9B78A Height = 315 Left = 3000 MaskColor = &H00004040& Style = 1 'Graphical TabIndex = 19 Top = 3000 Width = 1335 End Begin VB.CommandButton butRemServer BackColor = &H00FFFFFF& Caption = "&Remove Server" DisabledPicture = "Bot-Solutions.frx":A221C DownPicture = "Bot-Solutions.frx":A8CAE Height = 315 Left = 3000 MaskColor = &H008080FF& Style = 1 'Graphical TabIndex = 18 Top = 3360 Width = 1335 End Begin VB.TextBox txtEasyKey Height = 285 Left = 7800 TabIndex = 11 Text = "u" Top = 480 Width = 375 End Begin VB.TextBox txtOrganization Height = 285 Left = 1320 TabIndex = 10 Text = "Acme Bot Loaning" Top = 840 Width = 2535 End Begin VB.TextBox txtEasyBotnet Height = 285 Left = 7800 TabIndex = 9 Text = "*" Top = 840 Width = 375 End Begin VB.TextBox txtCryptKey Height = 285 Left = 1320 TabIndex = 8 Text = "bsolutions" Top = 1200 Width = 2535 End Begin VB.TextBox txtBotAdmin Height = 285 Left = 1320 TabIndex = 7 Text = "Change This " Top = 480 Width = 2535 End Begin VB.TextBox txtHome Height = 285 Left = 1320 TabIndex = 6 Text = "#bot-solutions_ROCKS" Top = 1560 Width = 2535 End Begin VB.FileListBox File1 Height = 285 Left = 0 Pattern = "*.bs3" TabIndex = 5 Top = 0 Visible = 0 'False Width = 975 End Begin VB.PictureBox Picture2 Height = 415 Left = 0 Picture = "Bot-Solutions.frx":AF740 ScaleHeight = 360 ScaleWidth = 8235 TabIndex = 0 Top = 0 Width = 8295 Begin VB.CommandButton butAddProfile Caption = "&Create New Profile" DisabledPicture = "Bot-Solutions.frx":C6E82 DownPicture = "Bot-Solutions.frx":DE5C4 Height = 255 Left = 4800 Style = 1 'Graphical TabIndex = 3 Top = 45 Width = 1650 End Begin VB.CommandButton butDelProfile Caption = "Delete This Profile" DisabledPicture = "Bot-Solutions.frx":F5D06 DownPicture = "Bot-Solutions.frx":10D448 Enabled = 0 'False Height = 255 Left = 6600 Style = 1 'Graphical TabIndex = 2 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 = 4 Top = 75 Width = 2535 End End Begin VB.CommandButton butImport BackColor = &H00FFFFFF& Caption = "&Import Script" Height = 315 Left = 6840 Style = 1 'Graphical TabIndex = 47 Top = 2685 Width = 1215 End Begin VB.TextBox txtAltNick Height = 285 Left = 1560 MaxLength = 32 TabIndex = 21 Text = "BotSol3" Top = 2200 Width = 2295 End Begin VB.Label lblTelnet Alignment = 1 'Right Justify BackColor = &H00C0C0C0& BackStyle = 0 'Transparent Caption = "Telnet Port:" Height = 255 Left = 4680 TabIndex = 50 Top = 840 Width = 975 End Begin VB.Label lblDescription BackStyle = 0 'Transparent Caption = $"Bot-Solutions.frx":124B8A 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 = 35 Top = 5640 Width = 7935 End Begin VB.Shape HighlightCover BackColor = &H00C0FFFF& BackStyle = 1 'Opaque BorderStyle = 0 'Transparent Height = 255 Left = 1440 Top = 5400 Width = 8055 End Begin VB.Label lblCustomScripts BackColor = &H00C0C0C0& BackStyle = 0 'Transparent Caption = "Custom Scripts to use:" Height = 255 Left = 4560 TabIndex = 34 Top = 2760 Width = 3135 End Begin VB.Image ConstructionImage Height = 1455 Left = 45 Stretch = -1 'True Top = 3840 Width = 4275 End Begin VB.Label lblBotNick Alignment = 1 'Right Justify BackColor = &H00C0C0C0& BackStyle = 0 'Transparent Caption = "Bot's Nickname:" Height = 255 Left = 0 TabIndex = 27 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 = 26 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 = 25 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 = 24 Top = 2760 Width = 3135 End Begin VB.Label lblEasyKey Alignment = 1 'Right Justify BackStyle = 0 'Transparent Caption = "Easy Key:" Height = 255 Left = 6720 TabIndex = 17 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 = 16 Top = 840 Width = 1575 End Begin VB.Label lblEasyBotnet Alignment = 1 'Right Justify BackStyle = 0 'Transparent Caption = "Easy Botnet:" Height = 255 Left = 6720 TabIndex = 15 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 = 14 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 = 13 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 = 12 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 BackStyle = 0 'Transparent 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 = 36 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" End Begin VB.Menu divider7 Caption = "-" End Begin VB.Menu butUpload Caption = "&Upload Bot to Shell" End Begin VB.Menu smnuRunBot Caption = "&Run Bot on This Computer..." Begin VB.Menu butRunBot 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..." 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 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 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 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 If InStr(Incoming, "%servers") Then For Counter = 0 To (lstServers.ListCount - 1) lstServers.ListIndex = Counter TempStr = TempStr & " " & lstServers & Chr(13) & Chr(10) 'Compiler.lblBuilding.Caption = "Building " & Filename & "... < Building Channel List >" Next End If ProcessedIncoming = Parse(Incoming, "%servers", TempStr) Incoming = ProcessedIncoming 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", Left(txtDeOpWarn.Text, 1)) Incoming = ProcessedIncoming ProcessedIncoming = Parse(Incoming, "%mschatwarn", Left(txtMsChatWarn.Text, 1)) Incoming = ProcessedIncoming ProcessedIncoming = Parse(Incoming, "%kwarn", Left(txtKWarn.Text, 1)) Incoming = ProcessedIncoming ProcessedIncoming = Parse(Incoming, "%bcast", Left(txtBCast.Text, 1)) 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 '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 If lstProfile.ListCount > 1 Then butDelProfile.Enabled = False End If End Sub Sub Basic_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) End Sub Private Sub butAbout_Click() Load About About.Homepage = "http://ottech.cjb.net/bsol-exe" 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 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 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 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. Afterwards, the bot will automatically run. PLEASE FOLLOW ALL ON-SCREEN DIRECTIONS IF ANY SHALL FOLLOW." 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 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") 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 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" 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, "" 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, " 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 LogicX Software and OverTech Technologies Products" Print #1, "ECHO Visit us online at: http://ottech.cjb.net/logicx" 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 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 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 a previously compiled version of the bot. WARNING: ALL CHANGES MADE SINCE THE LAST COMPILATION WILL BE LOST AND WILL NOT BE SAVED!" 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 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-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 butUpload_Click() MsgBox "Sorry, this feature has not yet been implemented", vbOKOnly + vbInformation, "Upload Bot to Shell..." 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 cmdEditEggdropConf_Click() On Error Resume Next Shell "write " & Chr(34) & App.Path & "\windrop\" & lstProfile.Text & ".conf" & Chr(34), vbNormalFocus End Sub Private Sub cmdEditResolvConf_Click() On Error Resume Next Shell "write " & Chr(34) & App.Path & "\windrop\resolv.conf" & Chr(34), vbNormalFocus End Sub Private 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, "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 mnuAdvanced.Visible = False ' Finalize Installation First 'Finalize_Install 'Unload Install ' Load Images Me.Icon = xsplash.Icon ConstructionImage.Picture = xsplash.ConstructionImage.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 '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 LoadScripts File1.Path = App.Path & "\windrop" GetProfiles 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) 'Unload ScriptLoader Unload xsplash Unload AdvancedConfig 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 lblBCast_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) lblHighlightedItem.Caption = lblBCast.Caption lblDescription.Caption = "Do you want the bot to report the usage of it? It will report everything including kicks, bans, op, deop, etc. to the home channel. This is a great feature for bot services. If you use this bot for personal usage it is recomended you turn this off. The main purpose this was created was for bot services to know what was happening to their bots when they lend them to channels. Mainly to track down bot abuse. By default, this feature is turned off." 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 lblDeOpWarn_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) lblHighlightedItem.Caption = lblDeOpWarn.Caption lblDescription.Caption = "Do you want the bot to send a message to home and warn a channel that the bot was DeOped on? The defualt is on." 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 lblKWarn_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) lblHighlightedItem.Caption = lblKWarn.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 lblMsChatWarn_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) lblHighlightedItem.Caption = lblMsChatWarn.Caption lblDescription.Caption = "Do you want the bot to warn users of using comic mode in Microsoft Chat to switch to text mode?" 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 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 lstFiles_Click() 'CSub = "lstFiles_Click" 'On Error GoTo Errorhandler ' 'Dim Incoming As String 'Dim CachedContents As String 'Dim PauseCounter As String ' ''FileContents.Visible = False ''FileContents.Text = "" 'CachedContents = "" 'PauseCounter = 0 ' 'Close 'If lstFiles.Text = "bot-solutions.3.0.conf" Then ' CFile = App.Path & "\windrop\scripts\bot-solutions.3.0.conf" ' Open App.Path & "\windrop\scripts\bot-solutions.3.0.conf" For Input As #1 ' Do Until EOF(1) ' Line Input #1, Incoming ' CachedContents = CachedContents & Incoming & Chr(13) & Chr(10) ' ' 'do events every so often ' PauseCounter = PauseCounter + 1 ' If PauseCounter Mod 100 = 0 Then DoEvents ' Loop ' Close #1 'ElseIf lstFiles.Text = "Eggdrop.conf" Then ' CFile = App.Path & "\windrop\Eggdrop.conf" ' Open App.Path & "\windrop\Eggdrop.conf" For Input As #1 ' Do Until EOF(1) ' Line Input #1, Incoming ' CachedContents = CachedContents & Incoming & Chr(13) & Chr(10) ' ' 'do events every so often ' PauseCounter = PauseCounter + 1 ' If PauseCounter Mod 100 = 0 Then DoEvents ' Loop ' Close #1 'End If ' 'FileContents.Text = CachedContents 'FileContents.Visible = True ' 'CFile = "" 'Errorhandler: 'If Err.Number > 0 Then ' Severe_Error_Msg (Me.Name) ' Resume Next 'End If End Sub Private Sub Text1_Change() 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") 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) = "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.Text & ".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_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_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 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