├── .gitignore ├── Docs ├── BBS Server 1.2 Manual.pdf └── commodore64bbs.ppt ├── LICENSE ├── README ├── Runtime ├── BBS Server.exe ├── MSCOMM32.OCX ├── Mswinsck.ocx ├── ascii_petscii.ini ├── ascii_petscii_ebbs.ini ├── busy.txt ├── c64bbsaway.ini ├── connect.wav ├── disconnect.wav ├── phonebook.ini └── telnetbbs.ini └── Source ├── Advanced.frm ├── Advanced.frx ├── AwayMessage.frm ├── AwayMessage.frx ├── C64telnetproject.vbp ├── C64telnetproject.vbw ├── HayesEmulation.bas ├── INIRoutines.bas ├── LocalIPAddressesFunction.bas ├── PhoneBook.bas ├── Prompt.frm ├── Prompt.frx ├── Telnet.bas ├── Translation.bas ├── TrayIcon.bas ├── WindowsStuff.bas ├── telnet.frm └── telnet.frx /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Eclipse 3 | ################# 4 | 5 | *.pydevproject 6 | .project 7 | .metadata 8 | bin/ 9 | tmp/ 10 | *.tmp 11 | *.bak 12 | *.swp 13 | *~.nib 14 | local.properties 15 | .classpath 16 | .settings/ 17 | .loadpath 18 | 19 | # External tool builders 20 | .externalToolBuilders/ 21 | 22 | # Locally stored "Eclipse launch configurations" 23 | *.launch 24 | 25 | # CDT-specific 26 | .cproject 27 | 28 | # PDT-specific 29 | .buildpath 30 | 31 | 32 | ################# 33 | ## Visual Studio 34 | ################# 35 | 36 | ## Ignore Visual Studio temporary files, build results, and 37 | ## files generated by popular Visual Studio add-ons. 38 | 39 | # User-specific files 40 | *.suo 41 | *.user 42 | *.sln.docstates 43 | 44 | # Build results 45 | [Dd]ebug/ 46 | [Rr]elease/ 47 | *_i.c 48 | *_p.c 49 | *.ilk 50 | *.meta 51 | *.obj 52 | *.pch 53 | *.pdb 54 | *.pgc 55 | *.pgd 56 | *.rsp 57 | *.sbr 58 | *.tlb 59 | *.tli 60 | *.tlh 61 | *.tmp 62 | *.vspscc 63 | .builds 64 | *.dotCover 65 | 66 | ## TODO: If you have NuGet Package Restore enabled, uncomment this 67 | #packages/ 68 | 69 | # Visual C++ cache files 70 | ipch/ 71 | *.aps 72 | *.ncb 73 | *.opensdf 74 | *.sdf 75 | 76 | # Visual Studio profiler 77 | *.psess 78 | *.vsp 79 | 80 | # ReSharper is a .NET coding add-in 81 | _ReSharper* 82 | 83 | # Installshield output folder 84 | [Ee]xpress 85 | 86 | # DocProject is a documentation generator add-in 87 | DocProject/buildhelp/ 88 | DocProject/Help/*.HxT 89 | DocProject/Help/*.HxC 90 | DocProject/Help/*.hhc 91 | DocProject/Help/*.hhk 92 | DocProject/Help/*.hhp 93 | DocProject/Help/Html2 94 | DocProject/Help/html 95 | 96 | # Click-Once directory 97 | publish 98 | 99 | # Others 100 | [Bb]in 101 | [Oo]bj 102 | sql 103 | TestResults 104 | *.Cache 105 | ClientBin 106 | stylecop.* 107 | ~$* 108 | *.dbmdl 109 | Generated_Code #added for RIA/Silverlight projects 110 | 111 | # Backup & report files from converting an old project file to a newer 112 | # Visual Studio version. Backup files are not needed, because we have git ;-) 113 | _UpgradeReport_Files/ 114 | Backup*/ 115 | UpgradeLog*.XML 116 | 117 | 118 | 119 | ############ 120 | ## Windows 121 | ############ 122 | 123 | # Windows image file caches 124 | Thumbs.db 125 | 126 | # Folder config file 127 | Desktop.ini 128 | 129 | 130 | ############# 131 | ## Python 132 | ############# 133 | 134 | *.py[co] 135 | 136 | # Packages 137 | *.egg 138 | *.egg-info 139 | dist 140 | build 141 | eggs 142 | parts 143 | bin 144 | var 145 | sdist 146 | develop-eggs 147 | .installed.cfg 148 | 149 | # Installer logs 150 | pip-log.txt 151 | 152 | # Unit test / coverage reports 153 | .coverage 154 | .tox 155 | 156 | #Translations 157 | *.mo 158 | 159 | #Mr Developer 160 | .mr.developer.cfg 161 | 162 | # Mac crap 163 | .DS_Store 164 | -------------------------------------------------------------------------------- /Docs/BBS Server 1.2 Manual.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeifBloomquist/BBSServer/ba913455f262aa632201e302ead52afa4bee333e/Docs/BBS Server 1.2 Manual.pdf -------------------------------------------------------------------------------- /Docs/commodore64bbs.ppt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeifBloomquist/BBSServer/ba913455f262aa632201e302ead52afa4bee333e/Docs/commodore64bbs.ppt -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | [MIT License] 2 | 3 | Copyright (C) 2003-2008 Leif Bloomquist 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Commodore Telnet BBS Server 2 | 3 | A simple Windows program that acts as a 'bridge' between serial and TCP/IP, allowing you to set up a Commodore BBS that can be Telnetted to (really just a raw TCP connection). Also allows a C64 to "dial out" over Telnet. Yeah, yeah, it's Visual Basic 6. 4 | 5 | A list of Telnetable BBSes can be found here. 6 | http://cbbsoutpost.servebbs.com/ 7 | 8 | My own BBS is still up and running, telnet to bbs.jammingsignal.com port 23 . -------------------------------------------------------------------------------- /Runtime/BBS Server.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeifBloomquist/BBSServer/ba913455f262aa632201e302ead52afa4bee333e/Runtime/BBS Server.exe -------------------------------------------------------------------------------- /Runtime/MSCOMM32.OCX: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeifBloomquist/BBSServer/ba913455f262aa632201e302ead52afa4bee333e/Runtime/MSCOMM32.OCX -------------------------------------------------------------------------------- /Runtime/Mswinsck.ocx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeifBloomquist/BBSServer/ba913455f262aa632201e302ead52afa4bee333e/Runtime/Mswinsck.ocx -------------------------------------------------------------------------------- /Runtime/ascii_petscii.ini: -------------------------------------------------------------------------------- 1 | ## Telnet BBS Server Termcap Translation Table 2 | ## 3 | ## When a character arrives through telnet, it looks 4 | ## up the ascii code on the left and sends the ascii code on 5 | ## the right to the serial port. 6 | ## 7 | ## When a character arrives through the serial port, it looks 8 | ## up the ascii code on the right and sends the ascii code on 9 | ## the left to Telnet. 10 | ## 11 | ## Codes conversions not listed are passed thru 1=1, 2=2, 3=3, etc. 12 | ## 13 | ## File Format: 14 | ## 15 | ## Commodore Ascii (Petscii)=Standard Ascii 16 | ## 17 | ## 18 | 19 | ## Commodore 'left arrow' = Standard Escape 20 | 95=27 21 | 22 | ## Commodore DEL = Standard Backspace 23 | 148=8 24 | 25 | ## CBMTerm Delete = ASCII delete 26 | 20=8 27 | 28 | ## Commodore clear-screen = ANSI "Form Feed" 29 | 147=12 30 | 31 | ## Up-arrow = Tilde (As in Adam Dunkel's Contiki) 32 | 94=126 33 | 34 | 35 | ## Commodore LOWERcase/upperCASE 36 | 65=97 37 | 66=98 38 | 67=99 39 | 68=100 40 | 69=101 41 | 70=102 42 | 71=103 43 | 72=104 44 | 73=105 45 | 74=106 46 | 75=107 47 | 76=108 48 | 77=109 49 | 78=110 50 | 79=111 51 | 80=112 52 | 81=113 53 | 82=114 54 | 83=115 55 | 84=116 56 | 85=117 57 | 86=118 58 | 87=119 59 | 88=120 60 | 89=121 61 | 90=122 62 | 63 | 97=65 64 | 98=66 65 | 99=67 66 | 100=68 67 | 101=69 68 | 102=70 69 | 103=71 70 | 104=72 71 | 105=73 72 | 106=74 73 | 107=75 74 | 108=76 75 | 109=77 76 | 110=78 77 | 111=79 78 | 112=80 79 | 113=81 80 | 114=82 81 | 115=83 82 | 116=84 83 | 117=85 84 | 118=86 85 | 119=87 86 | 120=88 87 | 121=89 88 | 122=90 89 | -------------------------------------------------------------------------------- /Runtime/ascii_petscii_ebbs.ini: -------------------------------------------------------------------------------- 1 | ## Telnet BBS Server Termcap Translation Table 2 | ## 3 | ## When a character arrives through telnet, it looks 4 | ## up the ascii code on the left and sends the ascii code on 5 | ## the right to the serial port. 6 | ## 7 | ## When a character arrives through the serial port, it looks 8 | ## up the ascii code on the right and sends the ascii code on 9 | ## the left to Telnet. 10 | ## 11 | ## Codes conversions not listed are passed thru 1=1, 2=2, 3=3, etc. 12 | ## 13 | ## File Format: 14 | ## 15 | ## Commodore Ascii (Petscii)=Standard Ascii 16 | ## 17 | ## 18 | 19 | ## New! Colors for EBBS 20 | 144=16 21 | 129=1 22 | 149=21 23 | 150=22 24 | 151=23 25 | 152=24 26 | 153=25 27 | 154=26 28 | 155=27 29 | 30 | ## Yellow=Shift + 31 | 158=123 32 | 33 | ## Cyan=Commodore - 34 | 159=124 35 | 36 | ## Purple=Shift - 37 | 156=125 38 | 39 | 40 | ## Commodore 'left arrow' = Standard Escape 41 | ## Why was this here? (LB) 42 | ##95=27 43 | 44 | ## Commodore DEL = Standard Backspace 45 | 148=8 46 | 47 | ## CBMTerm Delete = ASCII delete 48 | 20=8 49 | 50 | ## Commodore clear-screen = ANSI "Form Feed" 51 | 147=12 52 | 53 | ## Up-arrow = Tilde (As in Adam Dunkel's Contiki) 54 | 94=126 55 | 56 | 57 | ## Commodore LOWERcase/upperCASE 58 | 65=97 59 | 66=98 60 | 67=99 61 | 68=100 62 | 69=101 63 | 70=102 64 | 71=103 65 | 72=104 66 | 73=105 67 | 74=106 68 | 75=107 69 | 76=108 70 | 77=109 71 | 78=110 72 | 79=111 73 | 80=112 74 | 81=113 75 | 82=114 76 | 83=115 77 | 84=116 78 | 85=117 79 | 86=118 80 | 87=119 81 | 88=120 82 | 89=121 83 | 90=122 84 | 85 | 97=65 86 | 98=66 87 | 99=67 88 | 100=68 89 | 101=69 90 | 102=70 91 | 103=71 92 | 104=72 93 | 105=73 94 | 106=74 95 | 107=75 96 | 108=76 97 | 109=77 98 | 110=78 99 | 111=79 100 | 112=80 101 | 113=81 102 | 114=82 103 | 115=83 104 | 116=84 105 | 117=85 106 | 118=86 107 | 119=87 108 | 120=88 109 | 121=89 110 | 122=90 111 | -------------------------------------------------------------------------------- /Runtime/busy.txt: -------------------------------------------------------------------------------- 1 | 2 | Please check the Commodore BBS Outpost for more great Commodore Telnet BBSes! 3 | 4 | http://cbbsoutpost.servebbs.com/ -------------------------------------------------------------------------------- /Runtime/c64bbsaway.ini: -------------------------------------------------------------------------------- 1 | The BBS is down temporarily for maintenance. 2 | Please call back later. 3 | 4 | -------------------------------------------------------------------------------- /Runtime/connect.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeifBloomquist/BBSServer/ba913455f262aa632201e302ead52afa4bee333e/Runtime/connect.wav -------------------------------------------------------------------------------- /Runtime/disconnect.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeifBloomquist/BBSServer/ba913455f262aa632201e302ead52afa4bee333e/Runtime/disconnect.wav -------------------------------------------------------------------------------- /Runtime/phonebook.ini: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Runtime/telnetbbs.ini: -------------------------------------------------------------------------------- 1 | #Version = Telnet BBS Server v1.4a 2 | 3 | [BBS] 4 | BBSName=Powered by BBS Server 5 | TelnetPort=23 6 | IPAddress=192.168.1.64 7 | COMPort=1 8 | 9 | [Connecting] 10 | RTSOnConnect=1 11 | DTROnConnect=1 12 | WaitForATA=0 13 | UseCharTranslation=1 14 | TranslationFile=ascii_petscii.ini 15 | RTSOutbound=0 16 | DTROutbound=0 17 | 18 | [Disconnecting] 19 | SendCtrlC=0 20 | CheckDCD=1 21 | CheckDSR=1 22 | HangupOnATH=1 23 | OnlineAutoDisconnect=1 24 | OnlineDisconnectTime=180 25 | IdleAutoDisconnect=1 26 | IdleDisconnectTime=15 27 | LowerRTSonDisconnect=0 28 | LowerDTRonDisconnect=1 29 | ReEnableDTR=0 30 | ReEnableRTS=0 31 | CarrierDropDelayTime=5 32 | StayOffHook=0 33 | StayOffHookTime=10 34 | HangupOnBreak=0 35 | 36 | [Comms] 37 | SerialSetup=1200,N,8,1 38 | EchoTelnetChars=0 39 | EnableFlowControl=0 40 | EchoCommandChars=1 41 | CableType=4. Non-Standard Low Speed Cable 42 | 43 | [Diagnostics] 44 | DetailedDiagnostics=0 45 | LogHayes=0 46 | PlayWAVonConnect=1 47 | ConnectionWAV=connect.wav 48 | PlayWAVonDisconnect=1 49 | DisconnectWAV=disconnect.wav 50 | AllowShutdown=0 51 | 52 | [Emulation] 53 | EnableHayes=0 54 | AllowOutgoing=0 55 | SendRing=0 56 | SendConnectString=0 57 | ConnectString=CONNECT 58 | SendNoCarrier=1 59 | SendWinsockErrors=0 60 | GuessResponseCase=0 61 | DisablePlusPlusPlus=0 62 | 63 | [EOF] 64 | -------------------------------------------------------------------------------- /Source/Advanced.frm: -------------------------------------------------------------------------------- 1 | VERSION 5.00 2 | Begin VB.Form Advanced 3 | BackColor = &H00EF7070& 4 | BorderStyle = 3 'Fixed Dialog 5 | Caption = "Advanced Settings" 6 | ClientHeight = 6945 7 | ClientLeft = 45 8 | ClientTop = 345 9 | ClientWidth = 7920 10 | Icon = "Advanced.frx":0000 11 | LinkTopic = "Form1" 12 | MaxButton = 0 'False 13 | MinButton = 0 'False 14 | ScaleHeight = 6945 15 | ScaleWidth = 7920 16 | ShowInTaskbar = 0 'False 17 | StartUpPosition = 3 'Windows Default 18 | Begin VB.CommandButton ShowFrame 19 | BackColor = &H00EF7070& 20 | Caption = "Connecting" 21 | BeginProperty Font 22 | Name = "MS Sans Serif" 23 | Size = 9.75 24 | Charset = 0 25 | Weight = 700 26 | Underline = 0 'False 27 | Italic = 0 'False 28 | Strikethrough = 0 'False 29 | EndProperty 30 | Height = 375 31 | Index = 0 32 | Left = 120 33 | Style = 1 'Graphical 34 | TabIndex = 56 35 | Top = 720 36 | Width = 1695 37 | End 38 | Begin VB.CommandButton ShowFrame 39 | BackColor = &H00EF7070& 40 | Caption = "Phonebook" 41 | BeginProperty Font 42 | Name = "MS Sans Serif" 43 | Size = 9.75 44 | Charset = 0 45 | Weight = 700 46 | Underline = 0 'False 47 | Italic = 0 'False 48 | Strikethrough = 0 'False 49 | EndProperty 50 | Height = 375 51 | Index = 5 52 | Left = 120 53 | Style = 1 'Graphical 54 | TabIndex = 54 55 | Top = 2640 56 | Width = 1695 57 | End 58 | Begin VB.CommandButton ShowFrame 59 | BackColor = &H00EF7070& 60 | Caption = "Emulation" 61 | BeginProperty Font 62 | Name = "MS Sans Serif" 63 | Size = 9.75 64 | Charset = 0 65 | Weight = 700 66 | Underline = 0 'False 67 | Italic = 0 'False 68 | Strikethrough = 0 'False 69 | EndProperty 70 | Height = 375 71 | Index = 4 72 | Left = 120 73 | Style = 1 'Graphical 74 | TabIndex = 24 75 | Top = 2160 76 | Width = 1695 77 | End 78 | Begin VB.CommandButton ShowFrame 79 | BackColor = &H00EF7070& 80 | Caption = "Diagnostics" 81 | BeginProperty Font 82 | Name = "MS Sans Serif" 83 | Size = 9.75 84 | Charset = 0 85 | Weight = 700 86 | Underline = 0 'False 87 | Italic = 0 'False 88 | Strikethrough = 0 'False 89 | EndProperty 90 | Height = 375 91 | Index = 3 92 | Left = 120 93 | Style = 1 'Graphical 94 | TabIndex = 23 95 | Top = 1680 96 | Width = 1695 97 | End 98 | Begin VB.CommandButton ShowFrame 99 | BackColor = &H00EF7070& 100 | Caption = "Disconnecting" 101 | BeginProperty Font 102 | Name = "MS Sans Serif" 103 | Size = 9.75 104 | Charset = 0 105 | Weight = 700 106 | Underline = 0 'False 107 | Italic = 0 'False 108 | Strikethrough = 0 'False 109 | EndProperty 110 | Height = 375 111 | Index = 1 112 | Left = 120 113 | Style = 1 'Graphical 114 | TabIndex = 21 115 | Top = 1200 116 | Width = 1695 117 | End 118 | Begin VB.CommandButton ShowFrame 119 | BackColor = &H00EF7070& 120 | Caption = "Comms" 121 | BeginProperty Font 122 | Name = "MS Sans Serif" 123 | Size = 9.75 124 | Charset = 0 125 | Weight = 700 126 | Underline = 0 'False 127 | Italic = 0 'False 128 | Strikethrough = 0 'False 129 | EndProperty 130 | Height = 375 131 | Index = 2 132 | Left = 120 133 | Style = 1 'Graphical 134 | TabIndex = 22 135 | Top = 240 136 | Width = 1695 137 | End 138 | Begin VB.CommandButton Cancel 139 | Caption = "Cancel" 140 | BeginProperty Font 141 | Name = "MS Sans Serif" 142 | Size = 8.25 143 | Charset = 0 144 | Weight = 700 145 | Underline = 0 'False 146 | Italic = 0 'False 147 | Strikethrough = 0 'False 148 | EndProperty 149 | Height = 375 150 | Left = 120 151 | TabIndex = 1 152 | Top = 6360 153 | Width = 1695 154 | End 155 | Begin VB.CommandButton ApplyChanges 156 | Caption = "Save+Apply Changes" 157 | BeginProperty Font 158 | Name = "MS Sans Serif" 159 | Size = 8.25 160 | Charset = 0 161 | Weight = 700 162 | Underline = 0 'False 163 | Italic = 0 'False 164 | Strikethrough = 0 'False 165 | EndProperty 166 | Height = 432 167 | Left = 120 168 | TabIndex = 0 169 | Top = 5760 170 | Width = 1692 171 | End 172 | Begin VB.Frame Frame 173 | BackColor = &H00EF7070& 174 | Caption = "Diagnostics" 175 | BeginProperty Font 176 | Name = "MS Sans Serif" 177 | Size = 8.25 178 | Charset = 0 179 | Weight = 700 180 | Underline = 0 'False 181 | Italic = 0 'False 182 | Strikethrough = 0 'False 183 | EndProperty 184 | ForeColor = &H00FFFF00& 185 | Height = 3495 186 | Index = 3 187 | Left = 1920 188 | TabIndex = 10 189 | Top = 120 190 | Width = 5895 191 | Begin VB.CheckBox AllowShutdown 192 | BackColor = &H00EF7070& 193 | Caption = "Allow Windows Shutdown via ATU" 194 | BeginProperty Font 195 | Name = "MS Sans Serif" 196 | Size = 8.25 197 | Charset = 0 198 | Weight = 700 199 | Underline = 0 'False 200 | Italic = 0 'False 201 | Strikethrough = 0 'False 202 | EndProperty 203 | ForeColor = &H00FFFFFF& 204 | Height = 375 205 | Left = 120 206 | TabIndex = 44 207 | ToolTipText = "Useful for 'headless' configurations, with no monitor or mouse attached." 208 | Top = 3000 209 | Width = 3735 210 | End 211 | Begin VB.TextBox ConnectionWAV 212 | Height = 285 213 | Left = 120 214 | TabIndex = 43 215 | Text = "connect.wav" 216 | Top = 1680 217 | Width = 5055 218 | End 219 | Begin VB.CheckBox PlayWAVonConnect 220 | BackColor = &H00EF7070& 221 | Caption = "Play this WAV file when a caller connects:" 222 | BeginProperty Font 223 | Name = "MS Sans Serif" 224 | Size = 8.25 225 | Charset = 0 226 | Weight = 700 227 | Underline = 0 'False 228 | Italic = 0 'False 229 | Strikethrough = 0 'False 230 | EndProperty 231 | ForeColor = &H00FFFFFF& 232 | Height = 375 233 | Left = 120 234 | TabIndex = 42 235 | ToolTipText = "Lets you know when a caller has connected." 236 | Top = 1320 237 | Value = 1 'Checked 238 | Width = 5712 239 | End 240 | Begin VB.TextBox DisconnectWAV 241 | Height = 285 242 | Left = 120 243 | TabIndex = 41 244 | Text = "disconnect.wav" 245 | Top = 2460 246 | Width = 5055 247 | End 248 | Begin VB.CheckBox PlayWAVonDisconnect 249 | BackColor = &H00EF7070& 250 | Caption = "Play this WAV file when a caller disconnects:" 251 | BeginProperty Font 252 | Name = "MS Sans Serif" 253 | Size = 8.25 254 | Charset = 0 255 | Weight = 700 256 | Underline = 0 'False 257 | Italic = 0 'False 258 | Strikethrough = 0 'False 259 | EndProperty 260 | ForeColor = &H00FFFFFF& 261 | Height = 375 262 | Left = 120 263 | TabIndex = 40 264 | ToolTipText = "Lets you know when a caller has disconnected." 265 | Top = 2100 266 | Value = 1 'Checked 267 | Width = 5712 268 | End 269 | Begin VB.CheckBox LogHayes 270 | BackColor = &H00EF7070& 271 | Caption = "Detailed Hayes Emulation Logging" 272 | BeginProperty Font 273 | Name = "MS Sans Serif" 274 | Size = 8.25 275 | Charset = 0 276 | Weight = 700 277 | Underline = 0 'False 278 | Italic = 0 'False 279 | Strikethrough = 0 'False 280 | EndProperty 281 | ForeColor = &H00FFFFFF& 282 | Height = 375 283 | Left = 120 284 | TabIndex = 28 285 | ToolTipText = "Shows all Hayes modem commands received and responses." 286 | Top = 600 287 | Width = 3735 288 | End 289 | Begin VB.CheckBox DetailedDiagnostics 290 | BackColor = &H00EF7070& 291 | Caption = "Detailed RS-232 Diagnostics Logging" 292 | BeginProperty Font 293 | Name = "MS Sans Serif" 294 | Size = 8.25 295 | Charset = 0 296 | Weight = 700 297 | Underline = 0 'False 298 | Italic = 0 'False 299 | Strikethrough = 0 'False 300 | EndProperty 301 | ForeColor = &H00FFFFFF& 302 | Height = 375 303 | Left = 120 304 | TabIndex = 11 305 | ToolTipText = "This logs low-level RS-232 events. (Errors are always logged.)" 306 | Top = 240 307 | Width = 3975 308 | End 309 | End 310 | Begin VB.Frame Frame 311 | BackColor = &H00EF7070& 312 | Caption = "Communications" 313 | BeginProperty Font 314 | Name = "MS Sans Serif" 315 | Size = 8.25 316 | Charset = 0 317 | Weight = 700 318 | Underline = 0 'False 319 | Italic = 0 'False 320 | Strikethrough = 0 'False 321 | EndProperty 322 | ForeColor = &H00FFFF00& 323 | Height = 2895 324 | Index = 2 325 | Left = 1920 326 | TabIndex = 9 327 | Top = 120 328 | Width = 5895 329 | Begin VB.ComboBox SerialSetup 330 | Height = 315 331 | ItemData = "Advanced.frx":0442 332 | Left = 120 333 | List = "Advanced.frx":0461 334 | TabIndex = 53 335 | Text = "SerialSetup" 336 | Top = 480 337 | Width = 1875 338 | End 339 | Begin VB.CommandButton ShowPinout 340 | Caption = "Set Defaults" 341 | Height = 330 342 | Left = 3960 343 | TabIndex = 52 344 | Top = 1200 345 | Width = 1575 346 | End 347 | Begin VB.CheckBox EchoCommandChars 348 | BackColor = &H00EF7070& 349 | Caption = "ATE1 (Local Echo) set by default" 350 | BeginProperty Font 351 | Name = "MS Sans Serif" 352 | Size = 8.25 353 | Charset = 0 354 | Weight = 700 355 | Underline = 0 'False 356 | Italic = 0 'False 357 | Strikethrough = 0 'False 358 | EndProperty 359 | ForeColor = &H00FFFFFF& 360 | Height = 375 361 | Left = 120 362 | TabIndex = 37 363 | ToolTipText = "This is normally set, but the echoed characters cause problems with Image BBS. Can be changed at runtime with ATEx." 364 | Top = 1980 365 | Value = 1 'Checked 366 | Width = 4995 367 | End 368 | Begin VB.ComboBox CableType 369 | Height = 315 370 | ItemData = "Advanced.frx":04D7 371 | Left = 120 372 | List = "Advanced.frx":04EA 373 | TabIndex = 35 374 | Text = "CableType" 375 | ToolTipText = "See documentation for pinouts." 376 | Top = 1200 377 | Width = 3675 378 | End 379 | Begin VB.CheckBox EnableFlowControl 380 | BackColor = &H00EF7070& 381 | Caption = "Enable hardware flow control" 382 | BeginProperty Font 383 | Name = "MS Sans Serif" 384 | Size = 8.25 385 | Charset = 0 386 | Weight = 700 387 | Underline = 0 'False 388 | Italic = 0 'False 389 | Strikethrough = 0 'False 390 | EndProperty 391 | ForeColor = &H00FFFFFF& 392 | Height = 375 393 | Left = 120 394 | TabIndex = 34 395 | ToolTipText = "Try this when enabling higher baud rates (over 9600 baud)" 396 | Top = 1620 397 | Width = 3975 398 | End 399 | Begin VB.CheckBox EchoTelnetChars 400 | BackColor = &H00EF7070& 401 | Caption = "Echo characters back to Telnet client" 402 | BeginProperty Font 403 | Name = "MS Sans Serif" 404 | Size = 8.25 405 | Charset = 0 406 | Weight = 700 407 | Underline = 0 'False 408 | Italic = 0 'False 409 | Strikethrough = 0 'False 410 | EndProperty 411 | ForeColor = &H00FFFFFF& 412 | Height = 375 413 | Left = 120 414 | TabIndex = 19 415 | ToolTipText = "This option should never be needed as most BBS programs will echo on their own." 416 | Top = 2340 417 | Width = 3975 418 | End 419 | Begin VB.Label Label 420 | BackStyle = 0 'Transparent 421 | Caption = "Serial cable type:" 422 | BeginProperty Font 423 | Name = "MS Sans Serif" 424 | Size = 8.25 425 | Charset = 0 426 | Weight = 700 427 | Underline = 0 'False 428 | Italic = 0 'False 429 | Strikethrough = 0 'False 430 | EndProperty 431 | ForeColor = &H00FFFFFF& 432 | Height = 255 433 | Index = 0 434 | Left = 120 435 | TabIndex = 36 436 | Top = 960 437 | Width = 2055 438 | End 439 | Begin VB.Label Label 440 | BackStyle = 0 'Transparent 441 | Caption = "Serial setup string: (Baud rate, Parity, Data bits, Stop bits)" 442 | BeginProperty Font 443 | Name = "MS Sans Serif" 444 | Size = 8.25 445 | Charset = 0 446 | Weight = 700 447 | Underline = 0 'False 448 | Italic = 0 'False 449 | Strikethrough = 0 'False 450 | EndProperty 451 | ForeColor = &H00FFFFFF& 452 | Height = 255 453 | Index = 4 454 | Left = 120 455 | TabIndex = 16 456 | Top = 240 457 | Width = 5715 458 | End 459 | End 460 | Begin VB.Frame Frame 461 | BackColor = &H00EF7070& 462 | Caption = "Connecting" 463 | BeginProperty Font 464 | Name = "MS Sans Serif" 465 | Size = 8.25 466 | Charset = 0 467 | Weight = 700 468 | Underline = 0 'False 469 | Italic = 0 'False 470 | Strikethrough = 0 'False 471 | EndProperty 472 | ForeColor = &H00FFFF00& 473 | Height = 4155 474 | Index = 0 475 | Left = 1920 476 | TabIndex = 2 477 | Top = 120 478 | Width = 5895 479 | Begin VB.CheckBox RTSOutbound 480 | BackColor = &H00EF7070& 481 | Caption = "Raise RTS on outbound connection" 482 | BeginProperty Font 483 | Name = "MS Sans Serif" 484 | Size = 8.25 485 | Charset = 0 486 | Weight = 700 487 | Underline = 0 'False 488 | Italic = 0 'False 489 | Strikethrough = 0 'False 490 | EndProperty 491 | ForeColor = &H00FFFFFF& 492 | Height = 375 493 | Left = 120 494 | TabIndex = 127 495 | ToolTipText = "Only use this if your BBS doesn't natively support PETSCII." 496 | Top = 3000 497 | Width = 5535 498 | End 499 | Begin VB.CheckBox DTROutbound 500 | BackColor = &H00EF7070& 501 | Caption = "Raise DTR on outbound connection" 502 | BeginProperty Font 503 | Name = "MS Sans Serif" 504 | Size = 8.25 505 | Charset = 0 506 | Weight = 700 507 | Underline = 0 'False 508 | Italic = 0 'False 509 | Strikethrough = 0 'False 510 | EndProperty 511 | ForeColor = &H00FFFFFF& 512 | Height = 375 513 | Left = 120 514 | TabIndex = 126 515 | ToolTipText = "Only use this if your BBS doesn't natively support PETSCII." 516 | Top = 3360 517 | Width = 5535 518 | End 519 | Begin VB.CheckBox SendRing 520 | BackColor = &H00EF7070& 521 | Caption = "Send ""RING"" To BBS when Telnet caller connects" 522 | BeginProperty Font 523 | Name = "MS Sans Serif" 524 | Size = 8.25 525 | Charset = 0 526 | Weight = 700 527 | Underline = 0 'False 528 | Italic = 0 'False 529 | Strikethrough = 0 'False 530 | EndProperty 531 | ForeColor = &H00FFFFFF& 532 | Height = 375 533 | Left = 120 534 | TabIndex = 51 535 | ToolTipText = "If not set, a single carriage return is sent instead." 536 | Top = 1560 537 | Width = 5652 538 | End 539 | Begin VB.CheckBox WaitForATA 540 | BackColor = &H00EF7070& 541 | Caption = "Wait for BBS to send ATA before completing connection" 542 | BeginProperty Font 543 | Name = "MS Sans Serif" 544 | Size = 8.25 545 | Charset = 0 546 | Weight = 700 547 | Underline = 0 'False 548 | Italic = 0 'False 549 | Strikethrough = 0 'False 550 | EndProperty 551 | ForeColor = &H00FFFFFF& 552 | Height = 375 553 | Left = 120 554 | TabIndex = 31 555 | ToolTipText = "Will Time Out after 10 seconds. Also check the Emulation panel for more options." 556 | Top = 1200 557 | Width = 5715 558 | End 559 | Begin VB.CheckBox UseCharTranslation 560 | BackColor = &H00EF7070& 561 | Caption = "Ask caller for ASCII/PETSCII and use this translation file:" 562 | BeginProperty Font 563 | Name = "MS Sans Serif" 564 | Size = 8.25 565 | Charset = 0 566 | Weight = 700 567 | Underline = 0 'False 568 | Italic = 0 'False 569 | Strikethrough = 0 'False 570 | EndProperty 571 | ForeColor = &H00FFFFFF& 572 | Height = 375 573 | Left = 120 574 | TabIndex = 15 575 | ToolTipText = "Only use this if your BBS doesn't natively support PETSCII." 576 | Top = 1920 577 | Width = 5535 578 | End 579 | Begin VB.TextBox TranslationFile 580 | Enabled = 0 'False 581 | Height = 285 582 | Left = 120 583 | TabIndex = 14 584 | Text = "ascii_petscii.ini" 585 | Top = 2280 586 | Width = 1815 587 | End 588 | Begin VB.CheckBox RTSOnConnect 589 | BackColor = &H00EF7070& 590 | Caption = "Raise RTS when caller connects" 591 | BeginProperty Font 592 | Name = "MS Sans Serif" 593 | Size = 8.25 594 | Charset = 0 595 | Weight = 700 596 | Underline = 0 'False 597 | Italic = 0 'False 598 | Strikethrough = 0 'False 599 | EndProperty 600 | ForeColor = &H00FFFFFF& 601 | Height = 375 602 | Left = 120 603 | TabIndex = 12 604 | ToolTipText = "This setting depends on your null modem cable and BBS software." 605 | Top = 480 606 | Value = 1 'Checked 607 | Width = 3735 608 | End 609 | Begin VB.CheckBox DTROnConnect 610 | BackColor = &H00EF7070& 611 | Caption = "Raise DTR when caller connects" 612 | BeginProperty Font 613 | Name = "MS Sans Serif" 614 | Size = 8.25 615 | Charset = 0 616 | Weight = 700 617 | Underline = 0 'False 618 | Italic = 0 'False 619 | Strikethrough = 0 'False 620 | EndProperty 621 | ForeColor = &H00FFFFFF& 622 | Height = 375 623 | Left = 120 624 | TabIndex = 13 625 | ToolTipText = "This setting depends on your null modem cable and BBS software." 626 | Top = 840 627 | Value = 1 'Checked 628 | Width = 3735 629 | End 630 | Begin VB.Label Label 631 | BackStyle = 0 'Transparent 632 | Caption = "Incoming Connections" 633 | BeginProperty Font 634 | Name = "MS Sans Serif" 635 | Size = 8.25 636 | Charset = 0 637 | Weight = 700 638 | Underline = -1 'True 639 | Italic = 0 'False 640 | Strikethrough = 0 'False 641 | EndProperty 642 | ForeColor = &H00FFFFFF& 643 | Height = 255 644 | Index = 9 645 | Left = 120 646 | TabIndex = 128 647 | Top = 240 648 | Width = 2415 649 | End 650 | Begin VB.Label Label 651 | BackStyle = 0 'Transparent 652 | Caption = "Outbound Connections" 653 | BeginProperty Font 654 | Name = "MS Sans Serif" 655 | Size = 8.25 656 | Charset = 0 657 | Weight = 700 658 | Underline = -1 'True 659 | Italic = 0 'False 660 | Strikethrough = 0 'False 661 | EndProperty 662 | ForeColor = &H00FFFFFF& 663 | Height = 255 664 | Index = 8 665 | Left = 120 666 | TabIndex = 125 667 | Top = 2760 668 | Width = 2415 669 | End 670 | End 671 | Begin VB.Frame Frame 672 | BackColor = &H00EF7070& 673 | Caption = "Disconnecting" 674 | BeginProperty Font 675 | Name = "MS Sans Serif" 676 | Size = 8.25 677 | Charset = 0 678 | Weight = 700 679 | Underline = 0 'False 680 | Italic = 0 'False 681 | Strikethrough = 0 'False 682 | EndProperty 683 | ForeColor = &H00FFFF00& 684 | Height = 6615 685 | Index = 1 686 | Left = 1920 687 | TabIndex = 3 688 | Top = 120 689 | Width = 5895 690 | Begin VB.CheckBox LowerDTRonDisconnect 691 | BackColor = &H00EF7070& 692 | Caption = "Lower DTR when caller disconnects" 693 | BeginProperty Font 694 | Name = "MS Sans Serif" 695 | Size = 8.25 696 | Charset = 0 697 | Weight = 700 698 | Underline = 0 'False 699 | Italic = 0 'False 700 | Strikethrough = 0 'False 701 | EndProperty 702 | ForeColor = &H00FFFFFF& 703 | Height = 375 704 | Left = 120 705 | TabIndex = 63 706 | ToolTipText = "This setting depends on your null modem cable and BBS software." 707 | Top = 4560 708 | Value = 1 'Checked 709 | Width = 3735 710 | End 711 | Begin VB.CheckBox LowerRTSonDisconnect 712 | BackColor = &H00EF7070& 713 | Caption = "Lower RTS when caller disconnects" 714 | BeginProperty Font 715 | Name = "MS Sans Serif" 716 | Size = 8.25 717 | Charset = 0 718 | Weight = 700 719 | Underline = 0 'False 720 | Italic = 0 'False 721 | Strikethrough = 0 'False 722 | EndProperty 723 | ForeColor = &H00FFFFFF& 724 | Height = 375 725 | Left = 120 726 | TabIndex = 62 727 | ToolTipText = "This setting depends on your null modem cable and BBS software." 728 | Top = 4200 729 | Width = 3735 730 | End 731 | Begin VB.CheckBox SendNoCarrier 732 | BackColor = &H00EF7070& 733 | Caption = "Send ""NO CARRIER"" To BBS on disconnect" 734 | BeginProperty Font 735 | Name = "MS Sans Serif" 736 | Size = 8.25 737 | Charset = 0 738 | Weight = 700 739 | Underline = 0 'False 740 | Italic = 0 'False 741 | Strikethrough = 0 'False 742 | EndProperty 743 | ForeColor = &H00FFFFFF& 744 | Height = 375 745 | Left = 120 746 | TabIndex = 50 747 | Top = 3840 748 | Value = 1 'Checked 749 | Width = 5652 750 | End 751 | Begin VB.CheckBox ReEnableRTS 752 | BackColor = &H00EF7070& 753 | Caption = "Re-Enable RTS after this many seconds" 754 | BeginProperty Font 755 | Name = "MS Sans Serif" 756 | Size = 8.25 757 | Charset = 0 758 | Weight = 700 759 | Underline = 0 'False 760 | Italic = 0 'False 761 | Strikethrough = 0 'False 762 | EndProperty 763 | ForeColor = &H00FFFFFF& 764 | Height = 375 765 | Left = 720 766 | TabIndex = 49 767 | ToolTipText = "Not available when Hardware Flow Control is selected (see Comms)" 768 | Top = 5160 769 | Width = 4875 770 | End 771 | Begin VB.TextBox CarrierDropDelayTime 772 | Alignment = 1 'Right Justify 773 | Height = 285 774 | Left = 120 775 | TabIndex = 48 776 | Text = "5" 777 | Top = 5055 778 | Width = 495 779 | End 780 | Begin VB.CheckBox ReEnableDTR 781 | BackColor = &H00EF7070& 782 | Caption = "Re-Enable DTR after this many seconds" 783 | BeginProperty Font 784 | Name = "MS Sans Serif" 785 | Size = 8.25 786 | Charset = 0 787 | Weight = 700 788 | Underline = 0 'False 789 | Italic = 0 'False 790 | Strikethrough = 0 'False 791 | EndProperty 792 | ForeColor = &H00FFFFFF& 793 | Height = 375 794 | Left = 720 795 | TabIndex = 47 796 | ToolTipText = "Some BBS's require DTR and RTS only to be low for a few seconds after disconnect." 797 | Top = 4875 798 | Width = 4875 799 | End 800 | Begin VB.CheckBox HangupOnBreak 801 | BackColor = &H00EF7070& 802 | Caption = "Disconnect if BBS sends RS-232 break" 803 | BeginProperty Font 804 | Name = "MS Sans Serif" 805 | Size = 8.25 806 | Charset = 0 807 | Weight = 700 808 | Underline = 0 'False 809 | Italic = 0 'False 810 | Strikethrough = 0 'False 811 | EndProperty 812 | ForeColor = &H00FFFFFF& 813 | Height = 375 814 | Left = 120 815 | TabIndex = 38 816 | ToolTipText = "This option is usually *not* needed." 817 | Top = 1680 818 | Width = 5295 819 | End 820 | Begin VB.CheckBox StayOffHook 821 | BackColor = &H00EF7070& 822 | Caption = "Stay Off-Hook for this many seconds" 823 | BeginProperty Font 824 | Name = "MS Sans Serif" 825 | Size = 8.25 826 | Charset = 0 827 | Weight = 700 828 | Underline = 0 'False 829 | Italic = 0 'False 830 | Strikethrough = 0 'False 831 | EndProperty 832 | ForeColor = &H00FFFFFF& 833 | Height = 375 834 | Left = 720 835 | TabIndex = 30 836 | ToolTipText = "This gives the BBS time to tidy up and reinitialize." 837 | Top = 5520 838 | Width = 4395 839 | End 840 | Begin VB.TextBox StayOffHookTime 841 | Alignment = 1 'Right Justify 842 | Height = 285 843 | Left = 120 844 | TabIndex = 29 845 | Text = "10" 846 | Top = 5580 847 | Width = 495 848 | End 849 | Begin VB.CheckBox HangupOnATH 850 | BackColor = &H00EF7070& 851 | Caption = "Disconnect if BBS sends +++ATH" 852 | BeginProperty Font 853 | Name = "MS Sans Serif" 854 | Size = 8.25 855 | Charset = 0 856 | Weight = 700 857 | Underline = 0 'False 858 | Italic = 0 'False 859 | Strikethrough = 0 'False 860 | EndProperty 861 | ForeColor = &H00FFFFFF& 862 | Height = 375 863 | Left = 120 864 | TabIndex = 20 865 | ToolTipText = "Now working." 866 | Top = 1320 867 | Value = 1 'Checked 868 | Width = 5295 869 | End 870 | Begin VB.CheckBox CheckDSR 871 | BackColor = &H00EF7070& 872 | Caption = "Disconnect if BBS drops DSR" 873 | BeginProperty Font 874 | Name = "MS Sans Serif" 875 | Size = 8.25 876 | Charset = 0 877 | Weight = 700 878 | Underline = 0 'False 879 | Italic = 0 'False 880 | Strikethrough = 0 'False 881 | EndProperty 882 | ForeColor = &H00FFFFFF& 883 | Height = 375 884 | Left = 120 885 | TabIndex = 18 886 | ToolTipText = "This setting depends on your null modem cable and BBS software." 887 | Top = 960 888 | Value = 1 'Checked 889 | Width = 3735 890 | End 891 | Begin VB.CheckBox CheckDCD 892 | BackColor = &H00EF7070& 893 | Caption = "Disconnect if BBS drops DCD" 894 | BeginProperty Font 895 | Name = "MS Sans Serif" 896 | Size = 8.25 897 | Charset = 0 898 | Weight = 700 899 | Underline = 0 'False 900 | Italic = 0 'False 901 | Strikethrough = 0 'False 902 | EndProperty 903 | ForeColor = &H00FFFFFF& 904 | Height = 375 905 | Left = 120 906 | TabIndex = 17 907 | ToolTipText = "This setting depends on your null modem cable and BBS software." 908 | Top = 600 909 | Value = 1 'Checked 910 | Width = 3735 911 | End 912 | Begin VB.CheckBox IdleAutoDisconnect 913 | BackColor = &H00EF7070& 914 | Caption = "Auto-disconnect after this many minutes idle" 915 | BeginProperty Font 916 | Name = "MS Sans Serif" 917 | Size = 8.25 918 | Charset = 0 919 | Weight = 700 920 | Underline = 0 'False 921 | Italic = 0 'False 922 | Strikethrough = 0 'False 923 | EndProperty 924 | ForeColor = &H00FFFFFF& 925 | Height = 375 926 | Left = 720 927 | TabIndex = 8 928 | Top = 2400 929 | Value = 1 'Checked 930 | Width = 4335 931 | End 932 | Begin VB.TextBox IdleDisconnectTime 933 | Alignment = 1 'Right Justify 934 | Height = 285 935 | Left = 120 936 | TabIndex = 7 937 | Text = "15" 938 | Top = 2445 939 | Width = 495 940 | End 941 | Begin VB.CheckBox OnlineAutoDisconnect 942 | BackColor = &H00EF7070& 943 | Caption = "Auto-disconnect after this many minutes online" 944 | BeginProperty Font 945 | Name = "MS Sans Serif" 946 | Size = 8.25 947 | Charset = 0 948 | Weight = 700 949 | Underline = 0 'False 950 | Italic = 0 'False 951 | Strikethrough = 0 'False 952 | EndProperty 953 | ForeColor = &H00FFFFFF& 954 | Height = 375 955 | Left = 720 956 | TabIndex = 6 957 | Top = 2040 958 | Value = 1 'Checked 959 | Width = 4455 960 | End 961 | Begin VB.TextBox OnlineDisconnectTime 962 | Alignment = 1 'Right Justify 963 | Height = 285 964 | Left = 120 965 | TabIndex = 5 966 | Text = "180" 967 | Top = 2085 968 | Width = 495 969 | End 970 | Begin VB.CheckBox SendCtrlC 971 | BackColor = &H00EF7070& 972 | Caption = "Send CHR$(3) (CTRL-C) to BBS on disconnect" 973 | BeginProperty Font 974 | Name = "MS Sans Serif" 975 | Size = 8.25 976 | Charset = 0 977 | Weight = 700 978 | Underline = 0 'False 979 | Italic = 0 'False 980 | Strikethrough = 0 'False 981 | EndProperty 982 | ForeColor = &H00FFFFFF& 983 | Height = 375 984 | Left = 120 985 | TabIndex = 4 986 | ToolTipText = "This option is usually *not* needed." 987 | Top = 3480 988 | Width = 5055 989 | End 990 | Begin VB.Line Line 991 | BorderColor = &H00FFFFFF& 992 | BorderWidth = 2 993 | Index = 4 994 | X1 = 825 995 | X2 = 345 996 | Y1 = 5715 997 | Y2 = 5715 998 | End 999 | Begin VB.Line Line 1000 | BorderColor = &H00FFFFFF& 1001 | BorderWidth = 2 1002 | Index = 3 1003 | X1 = 840 1004 | X2 = 360 1005 | Y1 = 5295 1006 | Y2 = 5295 1007 | End 1008 | Begin VB.Line Line 1009 | BorderColor = &H00FFFFFF& 1010 | BorderWidth = 2 1011 | Index = 2 1012 | X1 = 345 1013 | X2 = 825 1014 | Y1 = 5115 1015 | Y2 = 5115 1016 | End 1017 | Begin VB.Line Line 1018 | BorderColor = &H00FFFFFF& 1019 | BorderWidth = 2 1020 | Index = 1 1021 | X1 = 345 1022 | X2 = 825 1023 | Y1 = 2595 1024 | Y2 = 2595 1025 | End 1026 | Begin VB.Line Line 1027 | BorderColor = &H00FFFFFF& 1028 | BorderWidth = 2 1029 | Index = 0 1030 | X1 = 360 1031 | X2 = 840 1032 | Y1 = 2235 1033 | Y2 = 2235 1034 | End 1035 | Begin VB.Label Label 1036 | BackStyle = 0 'Transparent 1037 | Caption = "Disconnection Actions" 1038 | BeginProperty Font 1039 | Name = "MS Sans Serif" 1040 | Size = 8.25 1041 | Charset = 0 1042 | Weight = 700 1043 | Underline = -1 'True 1044 | Italic = 0 'False 1045 | Strikethrough = 0 'False 1046 | EndProperty 1047 | ForeColor = &H00FFFFFF& 1048 | Height = 255 1049 | Index = 2 1050 | Left = 120 1051 | TabIndex = 46 1052 | Top = 3240 1053 | Width = 2415 1054 | End 1055 | Begin VB.Label Label 1056 | BackStyle = 0 'Transparent 1057 | Caption = "Disconnection Detection" 1058 | BeginProperty Font 1059 | Name = "MS Sans Serif" 1060 | Size = 8.25 1061 | Charset = 0 1062 | Weight = 700 1063 | Underline = -1 'True 1064 | Italic = 0 'False 1065 | Strikethrough = 0 'False 1066 | EndProperty 1067 | ForeColor = &H00FFFFFF& 1068 | Height = 255 1069 | Index = 1 1070 | Left = 120 1071 | TabIndex = 45 1072 | Top = 360 1073 | Width = 2415 1074 | End 1075 | End 1076 | Begin VB.Frame Frame 1077 | BackColor = &H00EF7070& 1078 | Caption = "Phone Book / Aliases" 1079 | BeginProperty Font 1080 | Name = "MS Sans Serif" 1081 | Size = 8.25 1082 | Charset = 0 1083 | Weight = 700 1084 | Underline = 0 'False 1085 | Italic = 0 'False 1086 | Strikethrough = 0 'False 1087 | EndProperty 1088 | ForeColor = &H00FFFF00& 1089 | Height = 6615 1090 | Index = 5 1091 | Left = 1920 1092 | TabIndex = 55 1093 | Top = 120 1094 | Width = 5895 1095 | Begin VB.CommandButton ImportPB 1096 | Caption = "Import Phone Book" 1097 | BeginProperty Font 1098 | Name = "MS Sans Serif" 1099 | Size = 8.25 1100 | Charset = 0 1101 | Weight = 700 1102 | Underline = 0 'False 1103 | Italic = 0 'False 1104 | Strikethrough = 0 'False 1105 | EndProperty 1106 | Height = 432 1107 | Left = 1320 1108 | TabIndex = 124 1109 | Top = 5760 1110 | Width = 2175 1111 | End 1112 | Begin VB.TextBox Address 1113 | Height = 285 1114 | Index = 19 1115 | Left = 2400 1116 | TabIndex = 103 1117 | Top = 5040 1118 | Width = 3255 1119 | End 1120 | Begin VB.TextBox Address 1121 | Height = 285 1122 | Index = 18 1123 | Left = 2400 1124 | TabIndex = 102 1125 | Top = 4800 1126 | Width = 3255 1127 | End 1128 | Begin VB.TextBox Address 1129 | Height = 285 1130 | Index = 17 1131 | Left = 2400 1132 | TabIndex = 101 1133 | Top = 4560 1134 | Width = 3255 1135 | End 1136 | Begin VB.TextBox Address 1137 | Height = 285 1138 | Index = 16 1139 | Left = 2400 1140 | TabIndex = 100 1141 | Top = 4320 1142 | Width = 3255 1143 | End 1144 | Begin VB.TextBox Address 1145 | Height = 285 1146 | Index = 15 1147 | Left = 2400 1148 | TabIndex = 99 1149 | Top = 4080 1150 | Width = 3255 1151 | End 1152 | Begin VB.TextBox Address 1153 | Height = 285 1154 | Index = 14 1155 | Left = 2400 1156 | TabIndex = 98 1157 | Top = 3840 1158 | Width = 3255 1159 | End 1160 | Begin VB.TextBox Address 1161 | Height = 285 1162 | Index = 13 1163 | Left = 2400 1164 | TabIndex = 97 1165 | Top = 3600 1166 | Width = 3255 1167 | End 1168 | Begin VB.TextBox Address 1169 | Height = 285 1170 | Index = 12 1171 | Left = 2400 1172 | TabIndex = 96 1173 | Top = 3360 1174 | Width = 3255 1175 | End 1176 | Begin VB.TextBox Address 1177 | Height = 285 1178 | Index = 11 1179 | Left = 2400 1180 | TabIndex = 95 1181 | Top = 3120 1182 | Width = 3255 1183 | End 1184 | Begin VB.TextBox Address 1185 | Height = 285 1186 | Index = 10 1187 | Left = 2400 1188 | TabIndex = 94 1189 | Top = 2880 1190 | Width = 3255 1191 | End 1192 | Begin VB.TextBox Address 1193 | Height = 285 1194 | Index = 9 1195 | Left = 2400 1196 | TabIndex = 93 1197 | Top = 2640 1198 | Width = 3255 1199 | End 1200 | Begin VB.TextBox Address 1201 | Height = 285 1202 | Index = 8 1203 | Left = 2400 1204 | TabIndex = 92 1205 | Top = 2400 1206 | Width = 3255 1207 | End 1208 | Begin VB.TextBox Address 1209 | Height = 285 1210 | Index = 7 1211 | Left = 2400 1212 | TabIndex = 91 1213 | Top = 2160 1214 | Width = 3255 1215 | End 1216 | Begin VB.TextBox Address 1217 | Height = 285 1218 | Index = 6 1219 | Left = 2400 1220 | TabIndex = 90 1221 | Top = 1920 1222 | Width = 3255 1223 | End 1224 | Begin VB.TextBox Address 1225 | Height = 285 1226 | Index = 5 1227 | Left = 2400 1228 | TabIndex = 89 1229 | Top = 1680 1230 | Width = 3255 1231 | End 1232 | Begin VB.TextBox Address 1233 | Height = 285 1234 | Index = 4 1235 | Left = 2400 1236 | TabIndex = 88 1237 | Top = 1440 1238 | Width = 3255 1239 | End 1240 | Begin VB.TextBox Address 1241 | Height = 285 1242 | Index = 3 1243 | Left = 2400 1244 | TabIndex = 87 1245 | Top = 1200 1246 | Width = 3255 1247 | End 1248 | Begin VB.TextBox Address 1249 | Height = 285 1250 | Index = 2 1251 | Left = 2400 1252 | TabIndex = 86 1253 | Top = 960 1254 | Width = 3255 1255 | End 1256 | Begin VB.TextBox Address 1257 | Height = 285 1258 | Index = 1 1259 | Left = 2400 1260 | TabIndex = 85 1261 | Top = 720 1262 | Width = 3255 1263 | End 1264 | Begin VB.TextBox Address 1265 | Height = 285 1266 | Index = 0 1267 | Left = 2400 1268 | TabIndex = 84 1269 | Text = "bbs.jammingsignal.com:23" 1270 | Top = 480 1271 | Width = 3255 1272 | End 1273 | Begin VB.TextBox Alias 1274 | Height = 285 1275 | Index = 19 1276 | Left = 480 1277 | TabIndex = 83 1278 | Top = 5040 1279 | Width = 1695 1280 | End 1281 | Begin VB.TextBox Alias 1282 | Height = 285 1283 | Index = 18 1284 | Left = 480 1285 | TabIndex = 82 1286 | Top = 4800 1287 | Width = 1695 1288 | End 1289 | Begin VB.TextBox Alias 1290 | Height = 285 1291 | Index = 17 1292 | Left = 480 1293 | TabIndex = 81 1294 | Top = 4560 1295 | Width = 1695 1296 | End 1297 | Begin VB.TextBox Alias 1298 | Height = 285 1299 | Index = 16 1300 | Left = 480 1301 | TabIndex = 80 1302 | Top = 4320 1303 | Width = 1695 1304 | End 1305 | Begin VB.TextBox Alias 1306 | Height = 285 1307 | Index = 15 1308 | Left = 480 1309 | TabIndex = 79 1310 | Top = 4080 1311 | Width = 1695 1312 | End 1313 | Begin VB.TextBox Alias 1314 | Height = 285 1315 | Index = 14 1316 | Left = 480 1317 | TabIndex = 78 1318 | Top = 3840 1319 | Width = 1695 1320 | End 1321 | Begin VB.TextBox Alias 1322 | Height = 285 1323 | Index = 13 1324 | Left = 480 1325 | TabIndex = 77 1326 | Top = 3600 1327 | Width = 1695 1328 | End 1329 | Begin VB.TextBox Alias 1330 | Height = 285 1331 | Index = 12 1332 | Left = 480 1333 | TabIndex = 76 1334 | Top = 3360 1335 | Width = 1695 1336 | End 1337 | Begin VB.TextBox Alias 1338 | Height = 285 1339 | Index = 11 1340 | Left = 480 1341 | TabIndex = 75 1342 | Top = 3120 1343 | Width = 1695 1344 | End 1345 | Begin VB.TextBox Alias 1346 | Height = 285 1347 | Index = 10 1348 | Left = 480 1349 | TabIndex = 74 1350 | Top = 2880 1351 | Width = 1695 1352 | End 1353 | Begin VB.TextBox Alias 1354 | Height = 285 1355 | Index = 9 1356 | Left = 480 1357 | TabIndex = 73 1358 | Top = 2640 1359 | Width = 1695 1360 | End 1361 | Begin VB.TextBox Alias 1362 | Height = 285 1363 | Index = 8 1364 | Left = 480 1365 | TabIndex = 72 1366 | Top = 2400 1367 | Width = 1695 1368 | End 1369 | Begin VB.TextBox Alias 1370 | Height = 285 1371 | Index = 7 1372 | Left = 480 1373 | TabIndex = 71 1374 | Top = 2160 1375 | Width = 1695 1376 | End 1377 | Begin VB.TextBox Alias 1378 | Height = 285 1379 | Index = 6 1380 | Left = 480 1381 | TabIndex = 70 1382 | Top = 1920 1383 | Width = 1695 1384 | End 1385 | Begin VB.TextBox Alias 1386 | Height = 285 1387 | Index = 5 1388 | Left = 480 1389 | TabIndex = 69 1390 | Top = 1680 1391 | Width = 1695 1392 | End 1393 | Begin VB.TextBox Alias 1394 | Height = 285 1395 | Index = 4 1396 | Left = 480 1397 | TabIndex = 68 1398 | Top = 1440 1399 | Width = 1695 1400 | End 1401 | Begin VB.TextBox Alias 1402 | Height = 285 1403 | Index = 3 1404 | Left = 480 1405 | TabIndex = 67 1406 | Top = 1200 1407 | Width = 1695 1408 | End 1409 | Begin VB.TextBox Alias 1410 | Height = 285 1411 | Index = 2 1412 | Left = 480 1413 | TabIndex = 66 1414 | Top = 960 1415 | Width = 1695 1416 | End 1417 | Begin VB.TextBox Alias 1418 | Height = 285 1419 | Index = 1 1420 | Left = 480 1421 | TabIndex = 65 1422 | Top = 720 1423 | Width = 1695 1424 | End 1425 | Begin VB.TextBox Alias 1426 | Height = 285 1427 | Index = 0 1428 | Left = 480 1429 | TabIndex = 64 1430 | Text = "jammingsignal" 1431 | Top = 480 1432 | Width = 1695 1433 | End 1434 | Begin VB.Label ID 1435 | Alignment = 1 'Right Justify 1436 | BackStyle = 0 'Transparent 1437 | Caption = "1." 1438 | ForeColor = &H00FFFFFF& 1439 | Height = 255 1440 | Index = 19 1441 | Left = 195 1442 | TabIndex = 123 1443 | Top = 5130 1444 | Width = 255 1445 | End 1446 | Begin VB.Label ID 1447 | Alignment = 1 'Right Justify 1448 | BackStyle = 0 'Transparent 1449 | Caption = "1." 1450 | ForeColor = &H00FFFFFF& 1451 | Height = 255 1452 | Index = 18 1453 | Left = 195 1454 | TabIndex = 122 1455 | Top = 4890 1456 | Width = 255 1457 | End 1458 | Begin VB.Label ID 1459 | Alignment = 1 'Right Justify 1460 | BackStyle = 0 'Transparent 1461 | Caption = "1." 1462 | ForeColor = &H00FFFFFF& 1463 | Height = 255 1464 | Index = 17 1465 | Left = 210 1466 | TabIndex = 121 1467 | Top = 4650 1468 | Width = 255 1469 | End 1470 | Begin VB.Label ID 1471 | Alignment = 1 'Right Justify 1472 | BackStyle = 0 'Transparent 1473 | Caption = "1." 1474 | ForeColor = &H00FFFFFF& 1475 | Height = 255 1476 | Index = 16 1477 | Left = 195 1478 | TabIndex = 120 1479 | Top = 4395 1480 | Width = 255 1481 | End 1482 | Begin VB.Label ID 1483 | Alignment = 1 'Right Justify 1484 | BackStyle = 0 'Transparent 1485 | Caption = "1." 1486 | ForeColor = &H00FFFFFF& 1487 | Height = 255 1488 | Index = 15 1489 | Left = 195 1490 | TabIndex = 119 1491 | Top = 4155 1492 | Width = 255 1493 | End 1494 | Begin VB.Label ID 1495 | Alignment = 1 'Right Justify 1496 | BackStyle = 0 'Transparent 1497 | Caption = "1." 1498 | ForeColor = &H00FFFFFF& 1499 | Height = 255 1500 | Index = 14 1501 | Left = 195 1502 | TabIndex = 118 1503 | Top = 3915 1504 | Width = 255 1505 | End 1506 | Begin VB.Label ID 1507 | Alignment = 1 'Right Justify 1508 | BackStyle = 0 'Transparent 1509 | Caption = "1." 1510 | ForeColor = &H00FFFFFF& 1511 | Height = 255 1512 | Index = 13 1513 | Left = 195 1514 | TabIndex = 117 1515 | Top = 3660 1516 | Width = 255 1517 | End 1518 | Begin VB.Label ID 1519 | Alignment = 1 'Right Justify 1520 | BackStyle = 0 'Transparent 1521 | Caption = "1." 1522 | ForeColor = &H00FFFFFF& 1523 | Height = 255 1524 | Index = 12 1525 | Left = 195 1526 | TabIndex = 116 1527 | Top = 3420 1528 | Width = 255 1529 | End 1530 | Begin VB.Label ID 1531 | Alignment = 1 'Right Justify 1532 | BackStyle = 0 'Transparent 1533 | Caption = "1." 1534 | ForeColor = &H00FFFFFF& 1535 | Height = 255 1536 | Index = 11 1537 | Left = 195 1538 | TabIndex = 115 1539 | Top = 3180 1540 | Width = 255 1541 | End 1542 | Begin VB.Label ID 1543 | Alignment = 1 'Right Justify 1544 | BackStyle = 0 'Transparent 1545 | Caption = "1." 1546 | ForeColor = &H00FFFFFF& 1547 | Height = 255 1548 | Index = 10 1549 | Left = 195 1550 | TabIndex = 114 1551 | Top = 2940 1552 | Width = 255 1553 | End 1554 | Begin VB.Label ID 1555 | Alignment = 1 'Right Justify 1556 | BackStyle = 0 'Transparent 1557 | Caption = "1." 1558 | ForeColor = &H00FFFFFF& 1559 | Height = 255 1560 | Index = 9 1561 | Left = 195 1562 | TabIndex = 113 1563 | Top = 2685 1564 | Width = 255 1565 | End 1566 | Begin VB.Label ID 1567 | Alignment = 1 'Right Justify 1568 | BackStyle = 0 'Transparent 1569 | Caption = "1." 1570 | ForeColor = &H00FFFFFF& 1571 | Height = 255 1572 | Index = 8 1573 | Left = 195 1574 | TabIndex = 112 1575 | Top = 2445 1576 | Width = 255 1577 | End 1578 | Begin VB.Label ID 1579 | Alignment = 1 'Right Justify 1580 | BackStyle = 0 'Transparent 1581 | Caption = "1." 1582 | ForeColor = &H00FFFFFF& 1583 | Height = 255 1584 | Index = 7 1585 | Left = 195 1586 | TabIndex = 111 1587 | Top = 2205 1588 | Width = 255 1589 | End 1590 | Begin VB.Label ID 1591 | Alignment = 1 'Right Justify 1592 | BackStyle = 0 'Transparent 1593 | Caption = "1." 1594 | ForeColor = &H00FFFFFF& 1595 | Height = 255 1596 | Index = 6 1597 | Left = 195 1598 | TabIndex = 110 1599 | Top = 1965 1600 | Width = 255 1601 | End 1602 | Begin VB.Label ID 1603 | Alignment = 1 'Right Justify 1604 | BackStyle = 0 'Transparent 1605 | Caption = "1." 1606 | ForeColor = &H00FFFFFF& 1607 | Height = 255 1608 | Index = 5 1609 | Left = 195 1610 | TabIndex = 109 1611 | Top = 1710 1612 | Width = 255 1613 | End 1614 | Begin VB.Label ID 1615 | Alignment = 1 'Right Justify 1616 | BackStyle = 0 'Transparent 1617 | Caption = "1." 1618 | ForeColor = &H00FFFFFF& 1619 | Height = 255 1620 | Index = 4 1621 | Left = 195 1622 | TabIndex = 108 1623 | Top = 1470 1624 | Width = 255 1625 | End 1626 | Begin VB.Label ID 1627 | Alignment = 1 'Right Justify 1628 | BackStyle = 0 'Transparent 1629 | Caption = "1." 1630 | ForeColor = &H00FFFFFF& 1631 | Height = 255 1632 | Index = 3 1633 | Left = 195 1634 | TabIndex = 107 1635 | Top = 1230 1636 | Width = 255 1637 | End 1638 | Begin VB.Label ID 1639 | Alignment = 1 'Right Justify 1640 | BackStyle = 0 'Transparent 1641 | Caption = "1." 1642 | ForeColor = &H00FFFFFF& 1643 | Height = 255 1644 | Index = 2 1645 | Left = 195 1646 | TabIndex = 106 1647 | Top = 990 1648 | Width = 255 1649 | End 1650 | Begin VB.Label ID 1651 | Alignment = 1 'Right Justify 1652 | BackStyle = 0 'Transparent 1653 | Caption = "1." 1654 | ForeColor = &H00FFFFFF& 1655 | Height = 255 1656 | Index = 1 1657 | Left = 195 1658 | TabIndex = 105 1659 | Top = 735 1660 | Width = 255 1661 | End 1662 | Begin VB.Label ID 1663 | Alignment = 1 'Right Justify 1664 | BackStyle = 0 'Transparent 1665 | Caption = "1." 1666 | ForeColor = &H00FFFFFF& 1667 | Height = 255 1668 | Index = 0 1669 | Left = 195 1670 | TabIndex = 104 1671 | Top = 495 1672 | Width = 255 1673 | End 1674 | Begin VB.Label Label 1675 | BackStyle = 0 'Transparent 1676 | Caption = "Address to Call" 1677 | BeginProperty Font 1678 | Name = "MS Sans Serif" 1679 | Size = 8.25 1680 | Charset = 0 1681 | Weight = 700 1682 | Underline = -1 'True 1683 | Italic = 0 'False 1684 | Strikethrough = 0 'False 1685 | EndProperty 1686 | ForeColor = &H00FFFFFF& 1687 | Height = 255 1688 | Index = 5 1689 | Left = 2400 1690 | TabIndex = 58 1691 | Top = 240 1692 | Width = 2415 1693 | End 1694 | Begin VB.Label Label 1695 | BackStyle = 0 'Transparent 1696 | Caption = "Alias" 1697 | BeginProperty Font 1698 | Name = "MS Sans Serif" 1699 | Size = 8.25 1700 | Charset = 0 1701 | Weight = 700 1702 | Underline = -1 'True 1703 | Italic = 0 'False 1704 | Strikethrough = 0 'False 1705 | EndProperty 1706 | ForeColor = &H00FFFFFF& 1707 | Height = 255 1708 | Index = 3 1709 | Left = 480 1710 | TabIndex = 57 1711 | Top = 240 1712 | Width = 2415 1713 | End 1714 | End 1715 | Begin VB.Frame Frame 1716 | BackColor = &H00EF7070& 1717 | Caption = "Outgoing calls and Hayes Emulation" 1718 | BeginProperty Font 1719 | Name = "MS Sans Serif" 1720 | Size = 8.25 1721 | Charset = 0 1722 | Weight = 700 1723 | Underline = 0 'False 1724 | Italic = 0 'False 1725 | Strikethrough = 0 'False 1726 | EndProperty 1727 | ForeColor = &H00FFFF00& 1728 | Height = 3975 1729 | Index = 4 1730 | Left = 1920 1731 | TabIndex = 25 1732 | Top = 120 1733 | Width = 5895 1734 | Begin VB.CheckBox DisablePlusPlusPlus 1735 | BackColor = &H00EF7070& 1736 | Caption = "Disable +++ to return to Comand Mode" 1737 | BeginProperty Font 1738 | Name = "MS Sans Serif" 1739 | Size = 8.25 1740 | Charset = 0 1741 | Weight = 700 1742 | Underline = 0 'False 1743 | Italic = 0 'False 1744 | Strikethrough = 0 'False 1745 | EndProperty 1746 | ForeColor = &H00FFFFFF& 1747 | Height = 375 1748 | Left = 120 1749 | TabIndex = 129 1750 | Top = 3360 1751 | Width = 4935 1752 | End 1753 | Begin VB.CheckBox GuessResponseCase 1754 | BackColor = &H00EF7070& 1755 | Caption = "Try to fix upper/LOWERcase in AT responses" 1756 | BeginProperty Font 1757 | Name = "MS Sans Serif" 1758 | Size = 8.25 1759 | Charset = 0 1760 | Weight = 700 1761 | Underline = 0 'False 1762 | Italic = 0 'False 1763 | Strikethrough = 0 'False 1764 | EndProperty 1765 | ForeColor = &H00FFFFFF& 1766 | Height = 375 1767 | Left = 120 1768 | TabIndex = 61 1769 | ToolTipText = "Set this if rEPLIES lOOK lIKE tHIS." 1770 | Top = 3000 1771 | Width = 4935 1772 | End 1773 | Begin VB.CheckBox SendWinsockErrors 1774 | BackColor = &H00EF7070& 1775 | Caption = "Send Winsock error messages to Terminal program" 1776 | BeginProperty Font 1777 | Name = "MS Sans Serif" 1778 | Size = 8.25 1779 | Charset = 0 1780 | Weight = 700 1781 | Underline = 0 'False 1782 | Italic = 0 'False 1783 | Strikethrough = 0 'False 1784 | EndProperty 1785 | ForeColor = &H00FFFFFF& 1786 | Height = 375 1787 | Left = 120 1788 | TabIndex = 39 1789 | ToolTipText = "Useful if you have a ""headless"" system and can't see the logs." 1790 | Top = 1680 1791 | Value = 1 'Checked 1792 | Width = 4935 1793 | End 1794 | Begin VB.TextBox ConnectString 1795 | Height = 285 1796 | Left = 120 1797 | TabIndex = 33 1798 | Text = "CONNECT" 1799 | Top = 1320 1800 | Width = 1932 1801 | End 1802 | Begin VB.CheckBox SendConnectString 1803 | BackColor = &H00EF7070& 1804 | Caption = "Send this string to BBS when Telnet session connects:" 1805 | BeginProperty Font 1806 | Name = "MS Sans Serif" 1807 | Size = 8.25 1808 | Charset = 0 1809 | Weight = 700 1810 | Underline = 0 'False 1811 | Italic = 0 'False 1812 | Strikethrough = 0 'False 1813 | EndProperty 1814 | ForeColor = &H00FFFFFF& 1815 | Height = 375 1816 | Left = 120 1817 | TabIndex = 32 1818 | Top = 960 1819 | Value = 1 'Checked 1820 | Width = 5172 1821 | End 1822 | Begin VB.CheckBox AllowOutgoing 1823 | BackColor = &H00EF7070& 1824 | Caption = "Allow Outgoing Calls" 1825 | BeginProperty Font 1826 | Name = "MS Sans Serif" 1827 | Size = 8.25 1828 | Charset = 0 1829 | Weight = 700 1830 | Underline = 0 'False 1831 | Italic = 0 'False 1832 | Strikethrough = 0 'False 1833 | EndProperty 1834 | ForeColor = &H00FFFFFF& 1835 | Height = 375 1836 | Left = 120 1837 | TabIndex = 27 1838 | ToolTipText = "Allows BBS or a terminal program to dial out, ATDT xx.xx.xx.xx:" 1839 | Top = 600 1840 | Value = 1 'Checked 1841 | Width = 3975 1842 | End 1843 | Begin VB.CheckBox EnableHayes 1844 | BackColor = &H00EF7070& 1845 | Caption = "Enable Hayes Emulation (This keeps COM Port open!)" 1846 | BeginProperty Font 1847 | Name = "MS Sans Serif" 1848 | Size = 8.25 1849 | Charset = 0 1850 | Weight = 700 1851 | Underline = 0 'False 1852 | Italic = 0 'False 1853 | Strikethrough = 0 'False 1854 | EndProperty 1855 | ForeColor = &H00FFFFFF& 1856 | Height = 375 1857 | Left = 120 1858 | TabIndex = 26 1859 | Top = 2640 1860 | Value = 1 'Checked 1861 | Width = 5652 1862 | End 1863 | Begin VB.Label Label 1864 | BackStyle = 0 'Transparent 1865 | Caption = "Hayes Emulation" 1866 | BeginProperty Font 1867 | Name = "MS Sans Serif" 1868 | Size = 8.25 1869 | Charset = 0 1870 | Weight = 700 1871 | Underline = -1 'True 1872 | Italic = 0 'False 1873 | Strikethrough = 0 'False 1874 | EndProperty 1875 | ForeColor = &H00FFFFFF& 1876 | Height = 255 1877 | Index = 7 1878 | Left = 120 1879 | TabIndex = 60 1880 | Top = 2400 1881 | Width = 2415 1882 | End 1883 | Begin VB.Label Label 1884 | BackStyle = 0 'Transparent 1885 | Caption = "Outgoing Calls" 1886 | BeginProperty Font 1887 | Name = "MS Sans Serif" 1888 | Size = 8.25 1889 | Charset = 0 1890 | Weight = 700 1891 | Underline = -1 'True 1892 | Italic = 0 'False 1893 | Strikethrough = 0 'False 1894 | EndProperty 1895 | ForeColor = &H00FFFFFF& 1896 | Height = 255 1897 | Index = 6 1898 | Left = 120 1899 | TabIndex = 59 1900 | Top = 360 1901 | Width = 2415 1902 | End 1903 | End 1904 | End 1905 | Attribute VB_Name = "Advanced" 1906 | Attribute VB_GlobalNameSpace = False 1907 | Attribute VB_Creatable = False 1908 | Attribute VB_PredeclaredId = True 1909 | Attribute VB_Exposed = False 1910 | 1911 | Private Sub ApplyChanges_Click() 1912 | TelnetBBS.LogDisplay.Clear 1913 | ApplyINI 1914 | SaveINI 1915 | Me.Hide 1916 | End Sub 1917 | 1918 | Private Sub Cancel_Click() 1919 | LoadINI 'Loads and re-applies previous settings 1920 | Me.Hide 1921 | End Sub 1922 | 1923 | Private Sub ImportPB_Click() 1924 | ImportPhoneBook 1925 | End Sub 1926 | 1927 | Private Sub EnableFlowControl_Click() 1928 | RTSOnConnect.value = vbUnchecked 1929 | ReEnableRTS.value = vbUnchecked 1930 | 1931 | If (EnableFlowControl.value = vbChecked) Then 1932 | RTSOnConnect.Enabled = False 1933 | ReEnableRTS.Enabled = False 1934 | LowerRTSonDisconnect.Enabled = False 1935 | VirtualModem.HardwareFlowControl = True 1936 | End If 1937 | 1938 | If (EnableFlowControl.value = vbUnchecked) Then 1939 | RTSOnConnect.Enabled = True 1940 | ReEnableRTS.Enabled = True 1941 | LowerRTSonDisconnect.Enabled = True 1942 | VirtualModem.HardwareFlowControl = False 1943 | End If 1944 | 1945 | End Sub 1946 | 1947 | Private Sub Form_Load() 1948 | ShowFrame_Click (2) 1949 | 1950 | 'Set up default IDs in Phonebook 1951 | Dim T 1952 | For T = 0 To 19 1953 | ID(T).Caption = T + 1 & "." 1954 | Next T 1955 | End Sub 1956 | 1957 | Private Sub ShowFrame_Click(Index As Integer) 1958 | Dim T As Integer 1959 | 1960 | 'Hide all frames and make buttons same color as background 1961 | For T = 0 To Frame.UBound 1962 | Frame(T).Visible = False 1963 | ShowFrame(T).BackColor = Me.BackColor 1964 | Next T 1965 | 1966 | 'Show the one that was selected and highlight the button 1967 | Frame(Index).Visible = True 1968 | ShowFrame(Index).BackColor = vbWhite 1969 | End Sub 1970 | 1971 | Private Sub ShowPinout_Click() 1972 | Select Case Val(Left$(CableType.text, 1)) 1973 | 1974 | Case 1: 'TelBBS Standard Cable 1975 | EnableFlowControl.value = vbChecked 1976 | VirtualModem.HardwareFlowControl = True 1977 | RTSOnConnect.value = vbUnchecked 1978 | DTROnConnect.value = vbChecked 1979 | CheckDCD.value = vbChecked 1980 | CheckDSR.value = vbChecked 1981 | LowerRTSonDisconnect.value = vbUnchecked 1982 | LowerDTRonDisconnect.value = vbChecked 1983 | 1984 | Case 2: 'Null Modem Cable 1985 | EnableFlowControl.value = vbChecked 1986 | VirtualModem.HardwareFlowControl = True 1987 | RTSOnConnect.value = vbUnchecked 1988 | DTROnConnect.value = vbChecked 1989 | CheckDCD.value = vbChecked 1990 | CheckDSR.value = vbChecked 1991 | LowerRTSonDisconnect.value = vbUnchecked 1992 | LowerDTRonDisconnect.value = vbChecked 1993 | 1994 | Case 3: 'Radio Shack Cable 1995 | EnableFlowControl.value = vbChecked 1996 | VirtualModem.HardwareFlowControl = True 1997 | RTSOnConnect.value = vbUnchecked 1998 | DTROnConnect.value = vbChecked 1999 | CheckDCD.value = vbChecked 2000 | CheckDSR.value = vbChecked 2001 | LowerRTSonDisconnect.value = vbUnchecked 2002 | LowerDTRonDisconnect.value = vbChecked 2003 | 2004 | Case 4: 'Non-Standard Low Speed Cable 2005 | EnableFlowControl.value = vbUnchecked 2006 | VirtualModem.HardwareFlowControl = False 2007 | RTSOnConnect.value = vbChecked 2008 | DTROnConnect.value = vbChecked 2009 | CheckDCD.value = vbChecked 2010 | CheckDSR.value = vbChecked 2011 | LowerRTSonDisconnect.value = vbChecked 2012 | LowerDTRonDisconnect.value = vbChecked 2013 | 2014 | Case 5: 'Custom or Unknown Cable 2015 | 'Do Nothing 2016 | End Select 2017 | End Sub 2018 | -------------------------------------------------------------------------------- /Source/Advanced.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeifBloomquist/BBSServer/ba913455f262aa632201e302ead52afa4bee333e/Source/Advanced.frx -------------------------------------------------------------------------------- /Source/AwayMessage.frm: -------------------------------------------------------------------------------- 1 | VERSION 5.00 2 | Begin VB.Form AwayMessage 3 | BackColor = &H00EF7070& 4 | BorderStyle = 3 'Fixed Dialog 5 | Caption = "Set Maintenance Message" 6 | ClientHeight = 1890 7 | ClientLeft = 45 8 | ClientTop = 345 9 | ClientWidth = 4680 10 | ControlBox = 0 'False 11 | Icon = "AwayMessage.frx":0000 12 | LinkTopic = "Form1" 13 | MaxButton = 0 'False 14 | MinButton = 0 'False 15 | ScaleHeight = 1890 16 | ScaleWidth = 4680 17 | ShowInTaskbar = 0 'False 18 | StartUpPosition = 3 'Windows Default 19 | Begin VB.CommandButton Cancel 20 | Caption = "Cancel" 21 | Height = 312 22 | Left = 2760 23 | TabIndex = 2 24 | Top = 1440 25 | Width = 1875 26 | End 27 | Begin VB.CommandButton OK 28 | Caption = "OK (Save Message)" 29 | Height = 312 30 | Left = 120 31 | TabIndex = 1 32 | Top = 1440 33 | Width = 1875 34 | End 35 | Begin VB.TextBox Message 36 | Height = 1215 37 | Left = 120 38 | MultiLine = -1 'True 39 | TabIndex = 0 40 | Text = "AwayMessage.frx":000C 41 | Top = 120 42 | Width = 4455 43 | End 44 | End 45 | Attribute VB_Name = "AwayMessage" 46 | Attribute VB_GlobalNameSpace = False 47 | Attribute VB_Creatable = False 48 | Attribute VB_PredeclaredId = True 49 | Attribute VB_Exposed = False 50 | Option Explicit 51 | 52 | Private Sub Cancel_Click() 53 | LoadAwayMessage 'Load previous message 54 | Me.Hide 55 | End Sub 56 | 57 | Private Sub OK_Click() 58 | Open "c64bbsaway.ini" For Output As #2 59 | Print #2, AwayMessage.Message.text 60 | Close #2 61 | 62 | Me.Hide 63 | End Sub 64 | 65 | Public Sub LoadAwayMessage() 66 | 67 | On Error GoTo LoadMessageError: 68 | 69 | Dim temp As String 70 | 71 | Open "c64bbsaway.ini" For Input As #2 72 | 73 | AwayMessage.Message = "" 74 | 75 | While Not EOF(2) 76 | Line Input #2, temp 77 | AwayMessage.Message = AwayMessage.Message & temp 78 | Wend 79 | 80 | Close #2 81 | Exit Sub 82 | 83 | LoadMessageError: 84 | 85 | If Err.Number = 53 Then 'File not found 86 | OK_Click ' Force save 87 | Else 88 | AddMessage " LoadAwayMessage(): " & Err.Description & " (" & Err.Number & ")" 89 | End If 90 | 91 | Exit Sub 92 | 93 | End Sub 94 | -------------------------------------------------------------------------------- /Source/AwayMessage.frx: -------------------------------------------------------------------------------- 1 | ltIThe BBS is down temporarily for maintenance. 2 | Please call back later. 3 | -------------------------------------------------------------------------------- /Source/C64telnetproject.vbp: -------------------------------------------------------------------------------- 1 | Type=Exe 2 | Form=telnet.frm 3 | Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\..\..\..\WINDOWS\system32\stdole2.tlb#OLE Automation 4 | Object={248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0; MSWINSCK.OCX 5 | Object={648A5603-2C6E-101B-82B6-000000000014}#1.1#0; MSCOMM32.OCX 6 | Form=Advanced.frm 7 | Form=AwayMessage.frm 8 | Module=Translation; Translation.bas 9 | Module=LocalIPAddressesFunction; LocalIPAddressesFunction.bas 10 | Module=TrayIcon; TrayIcon.bas 11 | Module=HayesEmulation; HayesEmulation.bas 12 | Module=INIRoutines; INIRoutines.bas 13 | Module=Telnet; Telnet.bas 14 | Module=WindowsStuff; WindowsStuff.bas 15 | Module=PhoneBook; PhoneBook.bas 16 | Form=Prompt.frm 17 | IconForm="TelnetBBS" 18 | Startup="TelnetBBS" 19 | HelpFile="" 20 | Title="Commodore Telnet BBS Server" 21 | ExeName32="BBS Server.exe" 22 | Path32="..\..\..\..\..\Desktop" 23 | Command32="-leifdir" 24 | Name="TelnetBBSProject" 25 | HelpContextID="0" 26 | CompatibleMode="0" 27 | MajorVer=1 28 | MinorVer=4 29 | RevisionVer=5 30 | AutoIncrementVer=0 31 | ServerSupportFiles=0 32 | VersionComments="Version 1.4a www.jammingsignal.com" 33 | VersionCompanyName="Leif Bloomquist" 34 | CompilationType=0 35 | OptimizationType=0 36 | FavorPentiumPro(tm)=0 37 | CodeViewDebugInfo=0 38 | NoAliasing=0 39 | BoundsCheck=0 40 | OverflowCheck=0 41 | FlPointCheck=0 42 | FDIVCheck=0 43 | UnroundedFP=0 44 | StartMode=0 45 | Unattended=0 46 | Retained=0 47 | ThreadPerObject=0 48 | MaxNumberOfThreads=1 49 | 50 | [MS Transaction Server] 51 | AutoRefresh=1 52 | -------------------------------------------------------------------------------- /Source/C64telnetproject.vbw: -------------------------------------------------------------------------------- 1 | TelnetBBS = -10, 7, 798, 722, , 95, 22, 862, 643, C 2 | Advanced = 217, 252, 820, 904, , 26, 16, 629, 609, C 3 | AwayMessage = 44, 46, 628, 698, C, 124, 274, 727, 926, C 4 | Translation = 153, 146, 763, 832, 5 | LocalIPAddressesFunction = -201, 174, 563, 875, 6 | TrayIcon = 54, 56, 812, 735, C 7 | HayesEmulation = 108, 112, 653, 746, 8 | INIRoutines = 48, 44, 715, 671, 9 | Telnet = 66, 66, 575, 514, 10 | WindowsStuff = 22, 22, 573, 470, 11 | PhoneBook = 110, 110, 727, 558, 12 | Prompt = 132, 174, 834, 799, C, 220, 220, 821, 668, C 13 | -------------------------------------------------------------------------------- /Source/HayesEmulation.bas: -------------------------------------------------------------------------------- 1 | Attribute VB_Name = "HayesEmulation" 2 | Option Explicit 3 | 4 | 'Sleep command 5 | Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) 6 | 7 | Public Type VirtualModemType 8 | '"Real" States 9 | OffHook As Boolean ' The BBS has been taken off-hook temporarily. 10 | LocalEcho As Boolean ' Local echo has been set with ATEx 11 | HardwareFlowControl As Boolean ' Hardware Flow Control is enabled 12 | 13 | 'Related to the detection of +++ 14 | OneSecondPauseOccured As Boolean ' There has been at least one second since the last data sent from the BBS. 15 | DataReceivedinLastSecond As Boolean ' The BBS has sent data in the last second (used in conjunction with above) 16 | Pluses As String 'Watch for +++ 17 | 18 | 19 | 'Special States 20 | OutGoingCall As Boolean ' The BBS, or a terminal program, is making an outgoing call. 21 | WaitingForATA As Boolean ' Have sent a RING, waiting for ATA. 22 | 23 | CommandMode As Boolean ' The BBS is in command mode after +++ 24 | ATATimer As Integer ' Number of seconds passed while waiting for ATA 25 | 26 | 'Internal Variables 27 | LastIPDialled As String ' Last IP that was called - use with A/ 28 | InvertCase As Boolean ' Temporary flag, based on case of last command (Fixes ASCII/PETSCII issues) 29 | 30 | ModemCommand As String ' For AT Commands 31 | End Type 32 | 33 | Public VirtualModem As VirtualModemType 34 | 35 | Public Sub DoHayesCommand(Command As String) 36 | Dim ReplyOK As Boolean 37 | Dim IpAddress As String 38 | Dim Loc As Integer 39 | 40 | On Error GoTo DoHayesCommandError: 41 | 42 | 'Strip off any extra CR or LF chars 43 | Command = Replace(Command, Chr$(10), "") 44 | Command = Replace(Command, Chr$(13), "") 45 | 46 | 'Check for PETSCII (Commodore) Terminal. Easy way to do this is to check if command is uppercase. 47 | 48 | If (Command = UCase(Command)) Then ' Command was sent as AT.. rather than at.., probably PETSCII 49 | VirtualModem.InvertCase = True 50 | Else 51 | VirtualModem.InvertCase = False 52 | 'Convert to upper case for uniformity 53 | Command = UCase(Command) 54 | End If 55 | 56 | If (Advanced.LogHayes.value) Then AddMessage Command 57 | 58 | 'Strip off "AT". Carriage Return now removed by HandleCommandMode() 59 | Command = Mid$(Command, 3, Len(Command) - 2) 60 | 61 | 'New in 1.2 - Parse through string 62 | ReplyOK = True 63 | 64 | '------------------------------------------------------------------------- 65 | 'ATD: Dial out. Must appear all by itself. 66 | 'Format is ATDT xx.xx.xx.xx: 67 | 68 | If (Left$(Command, 2) = "DT") Or (Left$(Command, 2) = "DP") Then 69 | 70 | 'Check that calls are allowed 71 | If (Advanced.AllowOutgoing.value = 0) Then 72 | SendError 73 | Exit Sub 74 | End If 75 | 76 | 'Get rid of extra spaces in address 77 | IpAddress = Trim(Right$(Command, Len(Command) - 2)) 78 | 79 | 'Remember IP for A/ 80 | VirtualModem.LastIPDialled = IpAddress 81 | 82 | 'Make the call! 83 | MakeOutgoingCall IpAddress 84 | 85 | Exit Sub ' So ATD isn't executed below 86 | End If 87 | 88 | '------------------------------------------------------------------------- 89 | 'ATA:Answer Call. Must appear all by itself. 90 | 91 | If (Left$(Command, 1) = "A") And (VirtualModem.WaitingForATA) Then 92 | TelnetBBS.ConnectionActive = True 93 | VirtualModem.WaitingForATA = False 94 | CallConnected 95 | Exit Sub 96 | End If 97 | 98 | '------------------------------------------------------------------------- 99 | 'ATE:Echo 100 | 101 | Loc = InStr(Command, "E") 102 | If (Loc > 0) Then 103 | If (Mid$(Command, Loc + 1, 1) = "1") Then 104 | VirtualModem.LocalEcho = True 105 | Else 106 | VirtualModem.LocalEcho = False 107 | End If 108 | End If 109 | 110 | '------------------------------------------------------------------------- 111 | 'ATH1, ATH0 or ATH:Hook Commands (May need +++ first) 112 | 113 | Loc = InStr(Command, "H") 114 | If (Loc > 0) Then 115 | Select Case (Mid$(Command & "0", Loc + 1, 1)) 'The & "0" is to prevent running past the string if last command 116 | 117 | Case "1": 118 | TelnetBBS.ShowOffHookState 119 | VirtualModem.OffHook = True 'Take BBS down until ATH or ATH0 is received 120 | 121 | Case Else: 122 | GoBackOnline 123 | End Select 124 | End If 125 | 126 | '------------------------------------------------------------------------- 127 | 'ATI:Modem Identification 128 | If (InStr(Command, "I") > 0) Then 129 | SerialSendString TelnetBBS.Caption 130 | SerialSendString "My IP Address is " & IPAddressToUse 131 | End If 132 | 133 | '------------------------------------------------------------------------- 134 | 'ATD:Go Back Online after +++ 135 | If (InStr(Command, "D") > 0) And (VirtualModem.CommandMode) Then 136 | If (TelnetBBS.ConnectionActive) Then 137 | CallConnected 138 | If (Advanced.LogHayes.value) Then AddMessage "Resumed connection after +++" 139 | Else 140 | ReplyOK = False 141 | End If 142 | End If 143 | 144 | '------------------------------------------------------------------------- 145 | 'ATU:Shutdown Windows (For headless configurations - must appear by itself) 146 | If (Left$(Command, 1) = "U") Then 147 | If (Mid$(Command, 2, 1) = "1") And (Advanced.AllowShutdown.value) Then 148 | SendOK 149 | SerialSendString "Shutting down BBS Server and PC." 150 | ShutdownWindows 151 | DoEvents 152 | End 153 | End If 154 | 155 | If (Mid$(Command, 2, 1) = "2") And (Advanced.AllowShutdown.value) Then 156 | SendOK 157 | SerialSendString "Shutting down BBS Server." 158 | DeleteIcon TelnetBBS 'Get rid of the tray icon 159 | DoEvents 160 | End 'Exit the program. 161 | End If 162 | 163 | 'Shutdown type not given or shutdown not allowed 164 | SendError 165 | Exit Sub 166 | End If 167 | 168 | '------------------------------------------------------------------------- 169 | 'ATZ:Reset Modem (also brute force hangup in some BBS packages) 170 | If (InStr(Command, "Z") > 0) Then 171 | ResetVirtualModem True 'True tells it not to send OK, as we do that below 172 | End If 173 | 174 | '------------------------------------------------------------------------- 175 | 'ATSx Commands 176 | 'ATHS0=xxx ' Sets number of rings to answer on. Ignore the number, but go back on-hook anyway. 177 | 178 | Loc = InStr(Command, "S0=") 179 | If (Loc > 0) Then GoBackOnline 180 | 181 | '------------------------------------------------------------------------- 182 | ' If there were no errors, send OK. Otherwise send ERROR. 183 | 184 | If (ReplyOK) Then 185 | SendOK 186 | Else 187 | SendError 188 | End If 189 | 190 | Exit Sub 191 | 192 | DoHayesCommandError: 193 | AddMessage "DoHayesCommand(): " & Err.Description & " (" & Err.Number & ")" 194 | Resume Next 195 | End Sub 196 | 197 | Public Sub PlusPlusPlusReceived() 198 | 199 | If (Advanced.DisablePlusPlusPlus.value = vbTrue) Then Exit Sub 200 | 201 | If (TelnetBBS.ConnectionActive) Then 202 | VirtualModem.CommandMode = True 203 | If (Advanced.LogHayes) Then 204 | AddMessage "+++" 205 | AddMessage "Now in Command Mode" 206 | End If 207 | 208 | SendOK 209 | End If 210 | End Sub 211 | 212 | ' Send a response string back to the terminal or BBS. 213 | Public Sub SerialSendString(s As String) 214 | 215 | If (Advanced.GuessResponseCase.value = vbUnchecked) Then 216 | VirtualModem.InvertCase = False 217 | End If 218 | 219 | If (VirtualModem.InvertCase) Then 220 | s = Invert(s) 221 | End If 222 | 223 | If (TelnetBBS.MSComm.PortOpen) Then 224 | TelnetBBS.MSComm.Output = vbCrLf & s & vbCrLf 225 | DoEvents 226 | If (Advanced.LogHayes) Then AddMessage "Responded with " & s 227 | End If 228 | End Sub 229 | 230 | Private Sub SendOK() 231 | SerialSendString "OK" 232 | End Sub 233 | 234 | Private Sub SendError() 235 | SerialSendString "ERROR" 236 | End Sub 237 | 238 | Public Sub CallConnected() 239 | If (Advanced.SendConnectString) Then 240 | SerialSendString Advanced.ConnectString 241 | End If 242 | 243 | If (Advanced.LogHayes) Then 244 | AddMessage "Call Connected" 245 | End If 246 | 247 | VirtualModem.CommandMode = False 248 | End Sub 249 | 250 | Public Sub OutgoingCallDisconnected() 251 | SerialSendString "NO CARRIER" 252 | VirtualModem.OutGoingCall = False 253 | VirtualModem.ModemCommand = "" 254 | DoEvents 255 | End Sub 256 | 257 | Public Sub ResetVirtualModem(Optional SuppressOK As Boolean) 258 | With VirtualModem 259 | .ATATimer = 0 260 | .DataReceivedinLastSecond = False 261 | .OffHook = False 262 | .OneSecondPauseOccured = False 263 | .OutGoingCall = False 264 | .CommandMode = True 265 | .WaitingForATA = False 266 | .LastIPDialled = "" 267 | If (Advanced.EchoCommandChars.value) Then 268 | .LocalEcho = True 269 | Else 270 | .LocalEcho = False 271 | End If 272 | 273 | If (TelnetBBS.ConnectionActive) Then TelnetBBS.Disconnect 274 | 275 | TelnetBBS.SerialReset 276 | End With 277 | 278 | If (Not SuppressOK) Then SendOK 279 | End Sub 280 | 281 | Public Sub HandleCommandMode(Received As String) 282 | 283 | ' Do Local Echo - Set with ATE0/1 284 | If (VirtualModem.LocalEcho) Then 285 | TelnetBBS.SerialTX.Tag = 255 286 | TelnetBBS.MSComm.Output = Received 'Echo back 287 | DoEvents 288 | End If 289 | 290 | ' Handle Carriage Return/Linefeed 291 | If (Right$(Received, 1) = Chr$(13)) Or _ 292 | (Right$(Received, 1) = Chr$(10)) Then 293 | 294 | VirtualModem.ModemCommand = VirtualModem.ModemCommand & Received 295 | 296 | If (UCase(Left$(VirtualModem.ModemCommand, 2)) = "AT") Then 297 | DoHayesCommand VirtualModem.ModemCommand 298 | End If 299 | 300 | 'Special case, entire command received in 1 'packet' of serial data 301 | 'If (UCase(Left$(Received, 2)) = "AT") Then 302 | ' DoHayesCommand Received 303 | 'End If 304 | 305 | VirtualModem.ModemCommand = "" 'New line, start over again 306 | Exit Sub 307 | End If 308 | 309 | 'Handle Backspace - Either C= DEL or CTRL-H 310 | If (Right$(Received, 1) = Chr$(8)) Or _ 311 | (Right$(Received, 1) = Chr$(20)) Then 312 | 313 | If (Len(VirtualModem.ModemCommand) > 1) Then 314 | VirtualModem.ModemCommand = Left$(VirtualModem.ModemCommand, Len(VirtualModem.ModemCommand) - 1) 315 | End If 316 | 317 | Exit Sub 318 | End If 319 | 320 | 'Append other characters to command string for later processing 321 | VirtualModem.ModemCommand = VirtualModem.ModemCommand & Received 322 | 323 | 'Handle A/ - special case 324 | If UCase(Left$(VirtualModem.ModemCommand, 2)) = "A/" Then 325 | If (Advanced.LogHayes) Then AddMessage "A/" 326 | VirtualModem.ModemCommand = "" 'Start over again 327 | RedialLastIP 328 | Exit Sub 329 | End If 330 | End Sub 331 | 332 | Public Sub HandlePluses(Received As String) 333 | 334 | ' For Hayes Emulation, check for the '+++' command. 335 | ' Everything except the '+' character resets this flag. 336 | 337 | If (Right$(Received, 1) = "+") Then 338 | VirtualModem.Pluses = VirtualModem.Pluses & Received 339 | VirtualModem.ModemCommand = "" 'Start over again 340 | Else 341 | VirtualModem.DataReceivedinLastSecond = True ' Reset in SecondTimer(), once a second 342 | VirtualModem.Pluses = "" 343 | End If 344 | 345 | If InStr(VirtualModem.Pluses, "+++") And (VirtualModem.OneSecondPauseOccured) Then 346 | PlusPlusPlusReceived 347 | VirtualModem.Pluses = "" 'Start over again 348 | Exit Sub 349 | End If 350 | End Sub 351 | 352 | Private Sub RedialLastIP() 353 | If (VirtualModem.LastIPDialled = "") Then 354 | SendError 355 | Else 356 | MakeOutgoingCall VirtualModem.LastIPDialled 357 | End If 358 | End Sub 359 | 360 | Private Function Invert(s As String) As String 361 | Dim T As Integer 362 | Dim Char As String 363 | Invert = "" 364 | 365 | For T = 1 To Len(s) 366 | Char = Mid$(s, T, 1) 367 | 368 | If (Char >= "a") And (Char <= "z") Then 'Lowercase 369 | Invert = Invert & UCase(Char) 370 | ElseIf (Char >= "A") And (Char <= "Z") Then 'Uppercase 371 | Invert = Invert & LCase(Char) 372 | Else 'Something else 373 | Invert = Invert & Char 374 | End If 375 | Next T 376 | End Function 377 | 378 | Public Sub MakeOutgoingCall(ByVal IpAddress As String) ' Can't be ByRef, as IpAddress gets modded below 379 | 380 | Dim Port As Long 381 | Dim ColonPos As Integer 382 | Dim T As Integer 383 | 384 | 'Check for Aliases in the Phonebook. If a match is found, substitute the corresponding Address. 385 | For T = Advanced.Alias.LBound To Advanced.Alias.UBound 386 | If LCase(IpAddress) = LCase(Advanced.Alias(T).text) Then 387 | IpAddress = Advanced.Address(T).text 388 | Exit For 389 | End If 390 | Next T 391 | 392 | 'Now Continue... 393 | 394 | ColonPos = InStr(IpAddress, ":") 395 | 396 | If (ColonPos = 0) Then 'No : found 397 | Port = 23 'Default 398 | Else 399 | 'The order of these statements is important! 400 | Port = Val(Mid$(IpAddress, ColonPos + 1)) 'No length=use rest of string 401 | IpAddress = Left$(IpAddress, ColonPos - 1) 402 | End If 403 | 404 | AddMessage "Outgoing call to " & IpAddress & " Port " & Port 405 | 406 | With TelnetBBS 407 | .ShowOutgoingState 408 | 409 | With .Telnet 410 | If (.State <> sckClosed) Then .Close 411 | .LocalPort = 0 ' This avoids Winsock run time error 10048. Reset in TelnetBBS.Disconnect() 412 | .RemoteHost = IpAddress 413 | .RemotePort = Port 414 | .Connect 415 | End With 416 | 417 | .ConnectionActive = True 418 | End With 419 | 420 | 421 | VirtualModem.OutGoingCall = True 422 | 423 | 'Treat just as though it was a BBS caller until disconnect. 424 | Exit Sub 425 | End Sub 426 | 427 | Private Sub GoBackOnline() 428 | VirtualModem.OffHook = False 'Put BBS Back Up 429 | 430 | 'If in the middle of a call, hang up. 431 | If (TelnetBBS.ConnectionActive) And (Advanced.HangupOnATH = vbChecked) Then 432 | AddMessage "BBS closed connection via ATH or ATS0, closing Telnet session " & TelnetBBS.Telnet.RemoteHostIP 433 | TelnetBBS.Disconnect 434 | End If 435 | 436 | 'Revert back to original state - either waiting or offline 437 | If TelnetBBS.BoardUp(0).value Then 438 | TelnetBBS.ShowWaitingState 439 | Else 440 | TelnetBBS.ShowOfflineState 441 | End If 442 | End Sub 443 | -------------------------------------------------------------------------------- /Source/INIRoutines.bas: -------------------------------------------------------------------------------- 1 | Attribute VB_Name = "INIRoutines" 2 | Option Explicit 3 | 4 | Const INIFILE = "telnetbbs.ini" 5 | 6 | 'Apply INI file contents 7 | Public Sub ApplyINI() 8 | 9 | On Error GoTo ApplyINIError: 10 | 11 | With TelnetBBS 12 | .SerialReset 13 | 14 | 'Load in the away message 15 | AwayMessage.LoadAwayMessage 16 | 17 | .IPAddressList.text = IPAddressToUse 18 | 19 | .Incoming(0).Close 20 | .Incoming(0).Protocol = sckTCPProtocol 'Must be TCP for Telnet 21 | .Incoming(0).LocalPort = .TelnetPortText.text 'Specifies port to listen on 22 | .Incoming(0).Bind Val(.TelnetPortText.text), IPAddressToUse 'Binds to a specific NIC 23 | .Incoming(0).Listen 'Put into Listen mode 24 | 25 | 'Load+Set up character translation, if active 26 | SetupTranslation 27 | 28 | AddMessage TelnetBBS.Caption & " listening on IP " & .IPAddressList.text & ", Port " & .Incoming(0).LocalPort 29 | End With 30 | 31 | Exit Sub 32 | 33 | ApplyINIError: 34 | AddMessage "ApplyINI(): " & Err.Description & " (" & Err.Number & ")" 35 | Exit Sub 36 | End Sub 37 | 38 | 39 | 'Load the INI file 40 | Public Sub LoadINI() 41 | On Error GoTo LoadINIError 'Get through as much as possible 42 | Dim ErrorFound As Boolean 43 | ErrorFound = False 44 | 45 | 'Load Phonebook first, even if there's no config file 46 | LoadPhoneBook 47 | 48 | 'Load the parameters from the ini file 49 | Open INIFILE For Input As #1 50 | 51 | '[BBS] 52 | TelnetBBS.BBSNameText.text = GetINIValue("BBSName") 53 | TelnetBBS.TelnetPortText.text = GetINIValue("TelnetPort") 54 | IPAddressToUse = GetINIValue("IPAddress") 55 | TelnetBBS.COMportText.text = GetINIValue("COMPort") 56 | 57 | '[Connecting] 58 | Advanced.RTSOnConnect.value = GetINIValue("RTSOnConnect") 59 | Advanced.DTROnConnect.value = GetINIValue("DTROnConnect") 60 | Advanced.WaitForATA.value = GetINIValue("WaitForATA") 61 | Advanced.UseCharTranslation.value = GetINIValue("UseCharTranslation") 62 | Advanced.TranslationFile.text = GetINIValue("TranslationFile") 63 | Advanced.RTSOutbound.value = GetINIValue("RTSOutbound") 64 | Advanced.DTROutbound.value = GetINIValue("DTROutbound") 65 | 66 | '[Disconnecting] 67 | Advanced.SendCtrlC.value = GetINIValue("SendCtrlC") 68 | Advanced.CheckDCD.value = GetINIValue("CheckDCD") 69 | Advanced.CheckDSR.value = GetINIValue("CheckDSR") 70 | Advanced.HangupOnATH.value = GetINIValue("HangupOnATH") 71 | Advanced.OnlineAutoDisconnect.value = GetINIValue("OnlineAutoDisconnect") 72 | Advanced.OnlineDisconnectTime.text = GetINIValue("OnlineDisconnectTime") 73 | Advanced.IdleAutoDisconnect.value = GetINIValue("IdleAutoDisconnect") 74 | Advanced.IdleDisconnectTime.text = GetINIValue("IdleDisconnectTime") 75 | Advanced.LowerRTSonDisconnect.value = GetINIValue("LowerRTSonDisconnect") 76 | Advanced.LowerDTRonDisconnect.value = GetINIValue("LowerDTRonDisconnect") 77 | 78 | Advanced.ReEnableDTR.value = GetINIValue("ReEnableDTR") 79 | Advanced.ReEnableRTS.value = GetINIValue("ReEnableRTS") 80 | Advanced.CarrierDropDelayTime.text = GetINIValue("CarrierDropDelayTime") 81 | Advanced.StayOffHook.value = GetINIValue("StayOffHook") 82 | Advanced.StayOffHookTime.text = GetINIValue("StayOffHookTime") 83 | Advanced.HangupOnBreak = GetINIValue("HangupOnBreak") 84 | 85 | '[Comms] 86 | Advanced.SerialSetup.text = GetINIValue("SerialSetup") 87 | Advanced.EchoTelnetChars.value = GetINIValue("EchoTelnetChars") 88 | Advanced.EnableFlowControl.value = GetINIValue("EnableFlowControl") 89 | Advanced.EchoCommandChars.value = GetINIValue("EchoCommandChars") 90 | Advanced.CableType.text = GetINIValue("CableType") 91 | 92 | '[Diagnostics] 93 | Advanced.DetailedDiagnostics.value = GetINIValue("DetailedDiagnostics") 94 | Advanced.LogHayes.value = GetINIValue("LogHayes") 95 | Advanced.PlayWAVonConnect.value = GetINIValue("PlayWAVonConnect") 96 | Advanced.ConnectionWAV.text = GetINIValue("ConnectionWAV") 97 | Advanced.PlayWAVonDisconnect.value = GetINIValue("PlayWAVonDisconnect") 98 | Advanced.DisconnectWAV.text = GetINIValue("DisconnectWAV") 99 | Advanced.AllowShutdown = GetINIValue("AllowShutdown") 100 | 101 | '[Emulation] 102 | Advanced.EnableHayes.value = GetINIValue("EnableHayes") 103 | Advanced.AllowOutgoing.value = GetINIValue("AllowOutgoing") 104 | Advanced.SendRing.value = GetINIValue("SendRing") 105 | Advanced.SendConnectString.value = GetINIValue("SendConnectString") 106 | Advanced.ConnectString.text = GetINIValue("ConnectString") 107 | Advanced.SendNoCarrier.value = GetINIValue("SendNoCarrier") 108 | Advanced.SendWinsockErrors.value = GetINIValue("SendWinsockErrors") 109 | Advanced.GuessResponseCase.value = GetINIValue("GuessResponseCase") 110 | Advanced.DisablePlusPlusPlus.value = GetINIValue("DisablePlusPlusPlus") 111 | 112 | '[EOF] 113 | Close #1 114 | 115 | If (ErrorFound) Then MsgBox "This appears to be the first time you have run this version. Please check your options.", vbOKOnly, "First Run" 116 | Exit Sub 117 | 118 | LoadINIError: 119 | ErrorFound = True 120 | Resume Next 121 | 122 | 'Set defaults on the drop-down menus, as they can't be overridden 123 | 'Advanced.SerialSetup.text = Advanced.SerialSetup.List(2) '2400 bps 124 | 'Advanced.CableType.text = Advanced.CableType.List(0) 'Standard Cable 125 | End Sub 126 | 127 | 128 | 129 | 'Write the INI file 130 | Public Sub SaveINI() 131 | 132 | On Error GoTo SaveINIError: 133 | 134 | 'Save the values into the ini file 135 | Open INIFILE For Output As #1 136 | 137 | Print #1, "#Version = " & TelnetBBS.Caption 138 | Print #1, "" 139 | 140 | Print #1, "[BBS]" 141 | PutINIValue "BBSName", TelnetBBS.BBSNameText.text 142 | PutINIValue "TelnetPort", TelnetBBS.TelnetPortText.text 143 | PutINIValue "IPAddress", TelnetBBS.IPAddressList.text 144 | PutINIValue "COMPort", TelnetBBS.COMportText.text 145 | 146 | Print #1, "" 147 | Print #1, "[Connecting]" 148 | PutINIValue "RTSOnConnect", Advanced.RTSOnConnect.value 149 | PutINIValue "DTROnConnect", Advanced.DTROnConnect.value 150 | PutINIValue "WaitForATA", Advanced.WaitForATA.value 151 | PutINIValue "UseCharTranslation", Advanced.UseCharTranslation.value 152 | PutINIValue "TranslationFile", Advanced.TranslationFile.text 153 | PutINIValue "RTSOutbound", Advanced.RTSOutbound.value 154 | PutINIValue "DTROutbound", Advanced.DTROutbound.value 155 | 156 | Print #1, "" 157 | Print #1, "[Disconnecting]" 158 | PutINIValue "SendCtrlC", Advanced.SendCtrlC.value 159 | PutINIValue "CheckDCD", Advanced.CheckDCD.value 160 | PutINIValue "CheckDSR", Advanced.CheckDSR.value 161 | PutINIValue "HangupOnATH", Advanced.HangupOnATH.value 162 | PutINIValue "OnlineAutoDisconnect", Advanced.OnlineAutoDisconnect.value 163 | PutINIValue "OnlineDisconnectTime", Advanced.OnlineDisconnectTime.text 164 | PutINIValue "IdleAutoDisconnect", Advanced.IdleAutoDisconnect.value 165 | PutINIValue "IdleDisconnectTime", Advanced.IdleDisconnectTime.text 166 | PutINIValue "LowerRTSonDisconnect", Advanced.LowerRTSonDisconnect.value 167 | PutINIValue "LowerDTRonDisconnect", Advanced.LowerDTRonDisconnect.value 168 | PutINIValue "ReEnableDTR", Advanced.ReEnableDTR.value 169 | PutINIValue "ReEnableRTS", Advanced.ReEnableRTS.value 170 | PutINIValue "CarrierDropDelayTime", Advanced.CarrierDropDelayTime.text 171 | PutINIValue "StayOffHook", Advanced.StayOffHook.value 172 | PutINIValue "StayOffHookTime", Advanced.StayOffHookTime.text 173 | PutINIValue "HangupOnBreak", Advanced.HangupOnBreak.value 174 | 175 | Print #1, "" 176 | Print #1, "[Comms]" 177 | PutINIValue "SerialSetup", Advanced.SerialSetup.text 178 | PutINIValue "EchoTelnetChars", Advanced.EchoTelnetChars.value 179 | PutINIValue "EnableFlowControl", Advanced.EnableFlowControl.value 180 | PutINIValue "EchoCommandChars", Advanced.EchoCommandChars.value 181 | PutINIValue "CableType", Advanced.CableType.text 182 | 183 | Print #1, "" 184 | Print #1, "[Diagnostics]" 185 | PutINIValue "DetailedDiagnostics", Advanced.DetailedDiagnostics.value 186 | PutINIValue "LogHayes", Advanced.LogHayes.value 187 | PutINIValue "PlayWAVonConnect", Advanced.PlayWAVonConnect.value 188 | PutINIValue "ConnectionWAV", Advanced.ConnectionWAV.text 189 | PutINIValue "PlayWAVonDisconnect", Advanced.PlayWAVonDisconnect.value 190 | PutINIValue "DisconnectWAV", Advanced.DisconnectWAV.text 191 | PutINIValue "AllowShutdown", Advanced.AllowShutdown.value 192 | 193 | Print #1, "" 194 | Print #1, "[Emulation]" 195 | PutINIValue "EnableHayes", Advanced.EnableHayes.value 196 | PutINIValue "AllowOutgoing", Advanced.AllowOutgoing.value 197 | PutINIValue "SendRing", Advanced.SendRing.value 198 | PutINIValue "SendConnectString", Advanced.SendConnectString.value 199 | PutINIValue "ConnectString", Advanced.ConnectString.text 200 | PutINIValue "SendNoCarrier", Advanced.SendNoCarrier.value 201 | PutINIValue "SendWinsockErrors", Advanced.SendWinsockErrors.value 202 | PutINIValue "GuessResponseCase", Advanced.GuessResponseCase.value 203 | PutINIValue "DisablePlusPlusPlus", Advanced.DisablePlusPlusPlus.value 204 | 205 | Print #1, "" 206 | Print #1, "[EOF]" 207 | Close #1 208 | 209 | MsgBox "Settings applied and saved to " & Chr$(13) & Chr$(13) & CurDir & "\" & INIFILE, vbInformation, "BBS Server" 210 | 211 | 'Save Phonebook as well 212 | SavePhoneBook 213 | 214 | Exit Sub 215 | 216 | SaveINIError: 217 | Close #1 218 | AddMessage "SaveINI(): " & Err.Description & " (" & Err.Number & ")" 219 | Exit Sub 220 | 221 | End Sub 222 | 223 | Private Function GetINIValue(valname As String) As Variant 224 | 225 | On Error GoTo GetINIValueError: 226 | 227 | Dim temp As String 228 | Dim EqualLoc As Integer 229 | Seek #1, 1 230 | 231 | While Not EOF(1) 232 | Line Input #1, temp 233 | If Left$(temp, Len(valname)) = valname Then 234 | EqualLoc = InStr(temp, "=") 235 | 236 | If (EqualLoc = 0) Then 237 | AddMessage "Error: Corrupt line in INI file" 238 | AddMessage temp 239 | Exit Function 240 | Else 241 | GetINIValue = Mid$(temp, EqualLoc + 1) 242 | Exit Function 243 | End If 244 | End If 245 | Wend 246 | 247 | AddMessage "Error: INI file missing entry for " & valname 248 | GetINIValue = Null 249 | Exit Function 250 | 251 | GetINIValueError: 252 | Close #1 253 | AddMessage "GetINIValueError(): " & Err.Description & " (" & Err.Number & ")" 254 | Exit Function 255 | End Function 256 | 257 | Private Sub PutINIValue(valname As String, value As Variant) 258 | Print #1, valname & "=" & CStr(value) 259 | End Sub 260 | 261 | Public Sub AddMessage(Message As String) 262 | TelnetBBS.LogDisplay.AddItem Now & " " & Message, 0 263 | 264 | Open "c64bbslog.txt" For Append As #10 265 | Print #10, Now & " " & Message 266 | Close #10 267 | 268 | If (TelnetBBS.LogDisplay.ListCount >= 1000) Then 269 | TelnetBBS.LogDisplay.Clear 270 | TelnetBBS.LogDisplay.AddItem "Auto-cleared after 1000 messages." 271 | End If 272 | End Sub 273 | -------------------------------------------------------------------------------- /Source/LocalIPAddressesFunction.bas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeifBloomquist/BBSServer/ba913455f262aa632201e302ead52afa4bee333e/Source/LocalIPAddressesFunction.bas -------------------------------------------------------------------------------- /Source/PhoneBook.bas: -------------------------------------------------------------------------------- 1 | Attribute VB_Name = "PhoneBook" 2 | Option Explicit 3 | 4 | Public Const CANCELSTRING = "***CANCEL***" 5 | Private Const PHONEBOOKFILE = "phonebook.ini" 6 | 7 | Public Sub ImportPhoneBook() 8 | Dim Filename As String 9 | 10 | Prompt.Ask "Please enter complete path to phonebook/configuration file to import:" 11 | If (Prompt.LastResult = CANCELSTRING) Then Exit Sub 12 | 13 | Filename = Prompt.LastResult 14 | 15 | LoadPhoneBook Filename 16 | End Sub 17 | 18 | 'This loads in a phonebook from *either* the tcpser config.xml or phonebook.ini 19 | Public Sub LoadPhoneBook(Optional Filename As String = PHONEBOOKFILE) 20 | 21 | On Error GoTo LoadPBError: 22 | 23 | Dim temp As String 24 | Dim valuepos As Integer 25 | Dim Index As Integer 26 | Index = 0 27 | 28 | Open Filename For Input As #6 29 | 30 | ' Find and extract all entries. 31 | ' 32 | 33 | While (Not EOF(6)) 34 | Line Input #6, temp 35 | If InStr(temp, "number=") Then 36 | 'Alias 37 | Advanced.Alias(Index).text = ExtractQuotes(temp) 'Will extract first string 38 | 39 | 'Address 40 | valuepos = InStr(temp, "value=") 41 | Advanced.Address(Index).text = ExtractQuotes(temp, valuepos) 'Will extract second string 42 | 43 | Index = Index + 1 44 | If (Index >= Advanced.Alias.UBound) Then Exit Sub 45 | End If 46 | Wend 47 | Close #6 48 | Exit Sub 49 | 50 | LoadPBError: 51 | AddMessage "Can't Load Phone Book: " & Err.Description & " (" & Err.Number & ")" 52 | Exit Sub 53 | End Sub 54 | 55 | Public Sub SavePhoneBook() 56 | 'This is not meant to be valid XML, but will try to match the 57 | 'tcpser4j config.xml as closely as possible. 58 | 59 | On Error Resume Next 60 | 61 | Dim T As Integer 62 | 63 | Dim Q As String 64 | Q = Chr$(34) 65 | 66 | Open PHONEBOOKFILE For Output As #6 67 | Print #6, "" 68 | 69 | ' Output all entries 70 | ' 71 | For T = Advanced.Alias.LBound To Advanced.Alias.UBound 72 | 73 | If (Advanced.Alias(T).text = "") Then Exit For 74 | 75 | Print #6, Chr$(9) & "" 77 | Next T 78 | 79 | Print #6, "" 80 | Close #6 81 | End Sub 82 | 83 | 84 | 'Originally written for gui4cbm4win! 85 | Private Function ExtractQuotes(FullString As String, Optional StartPos As Integer = 1) As String 86 | 87 | On Error GoTo QuoteError: 88 | 89 | Dim Quote1 As Integer 90 | Dim Quote2 As Integer 91 | 92 | Quote1 = InStr(StartPos, FullString, Chr$(34)) 93 | Quote2 = InStr(Quote1 + 1, FullString, Chr$(34)) 94 | ExtractQuotes = Mid$(FullString, Quote1 + 1, Quote2 - Quote1 - 1) 95 | 96 | Exit Function 97 | 98 | QuoteError: 99 | MsgBox "Error: " & Err.Description & " (" & Err.Number & ") " & Chr$(13) & Chr$(13) & "Debug string: [" & FullString & "] in ExtractQuotes()" 100 | 101 | End Function 102 | -------------------------------------------------------------------------------- /Source/Prompt.frm: -------------------------------------------------------------------------------- 1 | VERSION 5.00 2 | Begin VB.Form Prompt 3 | BorderStyle = 1 'Fixed Single 4 | ClientHeight = 1410 5 | ClientLeft = 45 6 | ClientTop = 330 7 | ClientWidth = 9255 8 | Icon = "Prompt.frx":0000 9 | LinkTopic = "Form1" 10 | MaxButton = 0 'False 11 | MinButton = 0 'False 12 | ScaleHeight = 1410 13 | ScaleWidth = 9255 14 | StartUpPosition = 3 'Windows Default 15 | Begin VB.TextBox Reply 16 | Height = 285 17 | Left = 240 18 | TabIndex = 0 19 | Top = 480 20 | Width = 8655 21 | End 22 | Begin VB.CommandButton OK 23 | Caption = "OK" 24 | Height = 375 25 | Left = 240 26 | TabIndex = 3 27 | Top = 840 28 | Width = 1335 29 | End 30 | Begin VB.CommandButton Cancel 31 | Caption = "Cancel" 32 | Height = 375 33 | Left = 1680 34 | TabIndex = 1 35 | Top = 840 36 | Width = 1335 37 | End 38 | Begin VB.Label Label 39 | Alignment = 2 'Center 40 | BackStyle = 0 'Transparent 41 | Caption = "Question" 42 | BeginProperty Font 43 | Name = "MS Sans Serif" 44 | Size = 8.25 45 | Charset = 0 46 | Weight = 700 47 | Underline = 0 'False 48 | Italic = 0 'False 49 | Strikethrough = 0 'False 50 | EndProperty 51 | Height = 495 52 | Left = 360 53 | TabIndex = 2 54 | Top = 120 55 | Width = 8655 56 | End 57 | End 58 | Attribute VB_Name = "Prompt" 59 | Attribute VB_GlobalNameSpace = False 60 | Attribute VB_Creatable = False 61 | Attribute VB_PredeclaredId = True 62 | Attribute VB_Exposed = False 63 | Public LastResult As String 64 | 65 | Public Sub Ask(Q As String, Optional ClearLast = True) 66 | LastResult = "" 67 | Label.Caption = Q 68 | 69 | If (ClearLast) Then Reply.text = "" 70 | 71 | Me.Show vbModal 72 | End Sub 73 | 74 | 75 | Private Sub Cancel_Click() 76 | LastResult = CANCELSTRING 77 | Me.Hide 78 | End Sub 79 | 80 | Private Sub OK_Click() 81 | LastResult = Reply.text 82 | Me.Hide 83 | End Sub 84 | 85 | Private Sub Reply_KeyDown(KeyCode As Integer, Shift As Integer) 86 | 'Enable Enter Key 87 | If (KeyCode = 13) Then OK_Click 88 | End Sub 89 | -------------------------------------------------------------------------------- /Source/Prompt.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeifBloomquist/BBSServer/ba913455f262aa632201e302ead52afa4bee333e/Source/Prompt.frx -------------------------------------------------------------------------------- /Source/Telnet.bas: -------------------------------------------------------------------------------- 1 | Attribute VB_Name = "Telnet" 2 | Option Explicit 3 | 4 | Public Function IACFilter(sInput As String) As String 5 | Do Until InStr(sInput, Chr(250)) = 0 'Loop and remove sub IAC negotiations first 6 | sInput = Replace(sInput, Mid$(sInput, InStr(sInput, Chr(250)), InStr(sInput, Chr(240)) - InStr(sInput, Chr(250))), "") 7 | Loop 8 | 9 | Do Until InStr(sInput, Chr(255)) = 0 'Loop and remove normal IAC commands 10 | sInput = Replace(sInput, Mid$(sInput, InStr(sInput, Chr(255)), InStr(sInput, Chr(255)) + 3), "") 11 | Loop 'Until InStr(sInput, Chr(255)) = 0 12 | 13 | IACFilter = sInput 14 | End Function 15 | 16 | Public Function IACResponse(sInput As String) As String 17 | 'pass winsock1.getdata string to this function 18 | 'this function will compose a rejection response to all the server requests 19 | 20 | Dim iPos As Integer 21 | Dim iRet As Integer 22 | 23 | IACResponse = "" 'reset string 24 | iPos = 1 'reset counter 25 | 26 | Do Until InStr(iPos, sInput, Chr(255)) = 0 'loop until no more IAC's found 27 | iPos = InStr(iPos, sInput, Chr(255)) 'set iPos if finds 1st or next IAC command(255) 28 | 'respond to command 29 | Select Case Mid$(sInput, iPos + 1, 1) 30 | Case Chr(254) 'DONT respond with a WONT 31 | IACResponse = IACResponse & Chr(255) & Chr(252) & Mid$(sInput, iPos + 2, 1) 32 | 33 | Case Chr(253) 'DO respond with a WONT 34 | IACResponse = IACResponse & Chr(255) & Chr(252) & Mid$(sInput, iPos + 2, 1) 35 | 36 | Case Chr(252) 'WONT do not respond! 37 | IACResponse = IACResponse 38 | 39 | Case Chr(251) 'WILL respond with a DONT 40 | IACResponse = IACResponse & Chr(255) & Chr(254) & Mid$(sInput, iPos + 2, 1) 41 | 42 | Case Chr(250) 'Beginning of sub negotiation 43 | IACResponse = IACResponse 'do not respond skip to end of 240 44 | iPos = InStr(iPos, sInput, Chr(240)) 45 | 46 | Case Else 47 | AddMessage "Cannot respond to IAC negotiation command " & Format(Asc(Mid$(sInput, iPos + 1, 1)), "000") 48 | End Select 49 | 50 | iPos = iPos + 1 51 | Loop 52 | 53 | 'function should return either "" or a rejection IACResponse 54 | End Function 55 | -------------------------------------------------------------------------------- /Source/Translation.bas: -------------------------------------------------------------------------------- 1 | Attribute VB_Name = "Translation" 2 | Option Explicit 3 | 4 | 'For speed, use two 'mirrored' lookup tables 5 | Dim SerialTranslation(0 To 255) As Byte 6 | Dim TelnetTranslation(0 To 255) As Byte 7 | 8 | Public Sub SetupTranslation() 9 | 10 | On Error GoTo SetupTranslationError: 11 | 12 | If (TelnetBBS.UsingCharTranslation = False) Then Exit Sub 13 | 14 | Dim T As Integer 15 | 16 | Dim TextLine As String 17 | Dim LeftSide As String 18 | Dim RightSide As String 19 | Dim EqualSignLoc As Integer 20 | 21 | For T = 0 To 255 22 | SerialTranslation(T) = T 23 | TelnetTranslation(T) = T 24 | Next T 25 | 26 | Open Advanced.TranslationFile For Input As #1 27 | 28 | While (Not EOF(1)) 29 | Line Input #1, TextLine 30 | 31 | If Not (Left$(TextLine, 1) = "#") Then 'Ignore Comments 32 | EqualSignLoc = InStr(TextLine, "=") 33 | 34 | If Not (EqualSignLoc = 0) Then 'Ignore lines with no equal sign 35 | 36 | LeftSide = Left$(TextLine, EqualSignLoc - 1) 37 | RightSide = Right$(TextLine, Len(TextLine) - EqualSignLoc) 38 | 39 | 'Put values into tables 40 | 41 | TelnetTranslation(Val(LeftSide)) = Val(RightSide) 42 | SerialTranslation(Val(RightSide)) = Val(LeftSide) 43 | End If 44 | End If 45 | Wend 46 | 47 | Close #1 48 | 49 | Exit Sub 50 | 51 | SetupTranslationError: 52 | AddMessage "SetupTranslation(): " & Err.Description & " (" & Err.Number & ") " & Advanced.TranslationFile 53 | TelnetBBS.UsingCharTranslation = False 54 | Exit Sub 55 | End Sub 56 | 57 | Public Function TranslateTelnet(s As String, bytestotal As Long) As String 58 | Dim T As Integer 59 | Dim TempString As String 60 | TempString = "" 61 | 62 | For T = 1 To bytestotal 63 | TempString = TempString & Chr$(TelnetTranslation(Asc(Mid$(s, T, 1)))) 64 | Next T 65 | 66 | TranslateTelnet = TempString 67 | End Function 68 | 69 | Public Function TranslateSerial(s As String) As String 70 | 71 | Dim T As Integer 72 | 73 | Dim TempString As String 74 | TempString = "" 75 | 76 | For T = 1 To Len(s) 77 | TempString = TempString & Chr$(SerialTranslation(Asc(Mid$(s, T, 1)))) 78 | Next T 79 | 80 | TranslateSerial = TempString 81 | End Function 82 | -------------------------------------------------------------------------------- /Source/TrayIcon.bas: -------------------------------------------------------------------------------- 1 | Attribute VB_Name = "TrayIcon" 2 | Option Explicit 3 | 4 | Declare Function Shell_NotifyIcon Lib "shell32.dll" Alias "Shell_NotifyIconA" (ByVal dwMessage As Long, lpData As NOTIFYICONDATA) As Long 5 | 6 | Public Type NOTIFYICONDATA 7 | cbSize As Long 8 | hwnd As Long 9 | uID As Long 10 | uFlags As Long 11 | uCallbackMessage As Long 12 | hIcon As Long 13 | szTip As String * 64 14 | End Type 15 | 16 | 'Constants 17 | Public Const DOUBLECLICK = 515 18 | 19 | Public Const NIF_MESSAGE = &H1 20 | Public Const NIF_ICON = &H2 21 | Public Const NIF_TIP = &H4 22 | Public Const NIF_DOALL = NIF_MESSAGE Or NIF_ICON Or NIF_TIP 23 | Public Const WM_MOUSEMOVE = &H200 24 | Public Const NIM_ADD = &H0 25 | Public Const NIM_DELETE = &H2 26 | 27 | Private erg As Variant 28 | 29 | Public Sub CreateIcon(frm As Form, Title As String) 30 | Dim Tic As NOTIFYICONDATA 31 | 32 | On Error GoTo err_CreateIcon: 33 | 34 | Tic.cbSize = Len(Tic) 35 | Tic.hwnd = frm.hwnd 36 | Tic.uID = 1& 37 | Tic.uFlags = NIF_DOALL 38 | Tic.uCallbackMessage = WM_MOUSEMOVE 39 | Tic.hIcon = frm.Icon 40 | Tic.szTip = Title & Chr$(0) 41 | erg = Shell_NotifyIcon(NIM_ADD, Tic) 42 | Exit Sub 43 | err_CreateIcon: 44 | MsgBox Err.Number & " : " & Err.Description, vbCritical 45 | End Sub 46 | 47 | Public Sub DeleteIcon(frm As Form) 48 | Dim Tic As NOTIFYICONDATA 49 | 50 | On Error GoTo err_DeleteIcon: 51 | 52 | Tic.cbSize = Len(Tic) 53 | Tic.hwnd = frm.hwnd 54 | Tic.uID = 1& 55 | erg = Shell_NotifyIcon(NIM_DELETE, Tic) 56 | Exit Sub 57 | err_DeleteIcon: 58 | MsgBox Err.Number & " : " & Err.Description, vbCritical 59 | End Sub 60 | 61 | -------------------------------------------------------------------------------- /Source/WindowsStuff.bas: -------------------------------------------------------------------------------- 1 | Attribute VB_Name = "WindowsStuff" 2 | Option Explicit 3 | 4 | 'Thanks to Peter Aitken for the PlaySound code, buggy as it was 5 | 6 | Public Declare Function PlaySound Lib "winmm.dll" _ 7 | Alias "PlaySoundA" (ByVal lpszName As String, _ 8 | ByVal hModule As Long, ByVal dwFlags As Long) _ 9 | As Long 10 | 11 | 'The first argument is the name, including the path, of the Wave file to play. 12 | 'The second argument isn't used when playing sound files, and you should pass a value of zero. (This function can also play sounds that are associated with system events, but that topic isn't covered here.) 13 | 'The final argument consists of flags that control various aspects of how the function works. 14 | 15 | 'SND_ASYNC (value= 1): play asynchronously, which means that the function returns while the sound is still playing. 16 | 'SND_FILENAME (value = &H20000): the first argument is a filename. 17 | 18 | Const SND_ASYNC = 1 19 | Const SND_FILENAME = &H20000 20 | 21 | 22 | 'Api functions and the constants required for ExitWindowsEx 23 | Const EWX_LOGOFF = 0 24 | Const EWX_SHUTDOWN = 1 25 | Const EWX_REBOOT = 2 26 | ' 27 | ' Using this option to shutdown windows does not send 28 | ' the WM_QUERYENDSESSION and WM_ENDSESSION messages to 29 | ' the open applications. Thus, those apps may loose 30 | ' any unsaved data. 31 | ' 32 | Const EWX_FORCE = 4 33 | ' The following are required to shutdown NT. 34 | ' 35 | Const ERROR_NOT_ALL_ASSIGNED = 1300 36 | Const SE_PRIVILEGE_ENABLED = 2 37 | Const TOKEN_QUERY = &H8 38 | Const TOKEN_ADJUST_PRIVILEGES = &H20 39 | 40 | Private Type LUID 41 | lowpart As Long 42 | highpart As Long 43 | End Type 44 | 45 | Private Type LUID_AND_ATTRIBUTES 46 | pLuid As LUID 47 | Attributes As Long 48 | End Type 49 | 50 | Private Type TOKEN_PRIVILEGES 51 | PrivilegeCount As Long 52 | Privileges As LUID_AND_ATTRIBUTES 53 | End Type 54 | 55 | Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long 56 | Private Declare Function AdjustTokenPrivileges Lib "advapi32.dll" (ByVal TokenHandle As Long, ByVal DisableAllPriv As Long, NewState As TOKEN_PRIVILEGES, ByVal BufferLength As Long, PreviousState As TOKEN_PRIVILEGES, ReturnLength As Long) As Long 57 | Private Declare Function LookupPrivilegeValue Lib "advapi32.dll" Alias "LookupPrivilegeValueA" (ByVal lpSystemName As Any, ByVal lpName As String, lpUid As LUID) As Long 58 | Private Declare Function OpenProcessToken Lib "advapi32.dll" (ByVal ProcessHandle As Long, ByVal DesiredAccess As Long, TokenHandle As Long) As Long 59 | Private Declare Function GetCurrentProcess Lib "kernel32" () As Long 60 | Private Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (lpVersionInformation As OSVERSIONINFO) As Long 61 | 62 | Private Type OSVERSIONINFO 63 | dwOSVersionInfoSize As Long 64 | dwMajorVersion As Long 65 | dwMinorVersion As Long 66 | dwBuildNumber As Long 67 | dwPlatformId As Long 68 | szCSDVersion As String * 128 69 | End Type 70 | 71 | 72 | 73 | Private Function FileExists(FullFileName) As Boolean 74 | 75 | ' Passed a filename (with path) returns 76 | ' True if the file exists, False if not. 77 | 78 | Dim s 79 | 80 | s = Dir(FullFileName) 81 | 82 | If s = "" Then 83 | FileExists = False 84 | Else 85 | FileExists = True 86 | End If 87 | 88 | End Function 89 | 90 | Public Sub PlaySoundX(filename As String) 91 | 92 | ' If sound is enabled and filename exists, 93 | ' play the specified sound. 94 | 95 | If FileExists(filename) Then 96 | PlaySound filename, CLng(0), SND_ASYNC Or SND_FILENAME 97 | End If 98 | 99 | End Sub 100 | 101 | Public Sub ShutdownWindows() 102 | 103 | Dim tLuid As LUID 104 | Dim tTokenPriv As TOKEN_PRIVILEGES 105 | Dim tPrevTokenPriv As TOKEN_PRIVILEGES 106 | Dim lResult As Long 107 | Dim lToken As Long 108 | Dim lLenBuffer As Long 109 | Dim lMode As Long 110 | ' 111 | ' Determine the shutdown mode. 112 | ' 113 | ' EWX_LOGOFF 114 | ' Shuts down all processes running and 115 | ' logs off the user. 116 | ' 117 | ' EWX_REBOOT 118 | ' Shuts down and restarts the system. 119 | ' 120 | ' EWX_SHUTDOWN 121 | ' Shuts down the system to a point where 122 | ' it is safe to turn off the system. 123 | ' 124 | ' EWX_POWEROFF 125 | ' Shuts down the system and turns off power. 126 | ' The system must support this feature. 127 | ' 128 | ' EWX_FORCE 129 | ' Forcibly shuts down the system. Files are not closed,... 130 | ' data may be lost. 131 | 132 | Dim bWindowsNT As Boolean 133 | ' 134 | ' Operating System Constants, Types and Declares 135 | ' 136 | Const VER_PLATFORM_WIN32s = 0 137 | Const VER_PLATFORM_WIN32_WINDOWS = 1 138 | Const VER_PLATFORM_WIN32_NT = 2 139 | 140 | lMode = EWX_SHUTDOWN 141 | 142 | Dim OSInfo As OSVERSIONINFO 143 | 144 | OSInfo.dwOSVersionInfoSize = Len(OSInfo) 145 | Call GetVersionEx(OSInfo) 146 | bWindowsNT = (OSInfo.dwPlatformId = VER_PLATFORM_WIN32_NT) 147 | 148 | If Not bWindowsNT Then 149 | Call ExitWindowsEx(lMode, 0) 150 | Else 151 | ' 152 | ' Get the access token of the current process. Get it 153 | ' with the privileges of querying the access token and 154 | ' adjusting its privileges. 155 | ' 156 | lResult = OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES Or TOKEN_QUERY, lToken) 157 | If lResult = 0 Then 158 | Exit Sub 'Failed 159 | End If 160 | ' 161 | ' Get the locally unique identifier (LUID) which 162 | ' represents the shutdown privilege. 163 | ' 164 | lResult = LookupPrivilegeValue(0&, "SeShutdownPrivilege", tLuid) 165 | If lResult = 0 Then Exit Sub 'Failed 166 | ' 167 | ' Populate the new TOKEN_PRIVILEGES values with the LUID 168 | ' and allow your current process to shutdown the computer. 169 | ' 170 | With tTokenPriv 171 | .PrivilegeCount = 1 172 | .Privileges.Attributes = SE_PRIVILEGE_ENABLED 173 | .Privileges.pLuid = tLuid 174 | lResult = AdjustTokenPrivileges(lToken, False, tTokenPriv, Len(tPrevTokenPriv), tPrevTokenPriv, lLenBuffer) 175 | End With 176 | 177 | If lResult = 0 Then 178 | Exit Sub 'Failed 179 | Else 180 | If Err.LastDllError = ERROR_NOT_ALL_ASSIGNED Then Exit Sub 'Failed 181 | End If 182 | ' 183 | ' Shutdown Windows. 184 | ' 185 | Call ExitWindowsEx(lMode, 0) 186 | End If 187 | End Sub 188 | 189 | -------------------------------------------------------------------------------- /Source/telnet.frm: -------------------------------------------------------------------------------- 1 | VERSION 5.00 2 | Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX" 3 | Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "MSCOMM32.OCX" 4 | Begin VB.Form TelnetBBS 5 | BackColor = &H00EF7070& 6 | BorderStyle = 1 'Fixed Single 7 | Caption = "Telnet BBS Server v1.4a" 8 | ClientHeight = 8520 9 | ClientLeft = 30 10 | ClientTop = 270 11 | ClientWidth = 7410 12 | Icon = "telnet.frx":0000 13 | LinkTopic = "Form1" 14 | MaxButton = 0 'False 15 | MinButton = 0 'False 16 | ScaleHeight = 568 17 | ScaleMode = 3 'Pixel 18 | ScaleWidth = 494 19 | StartUpPosition = 3 'Windows Default 20 | Begin VB.Frame Frame 21 | BackColor = &H00EF7070& 22 | Caption = "BBS Status" 23 | BeginProperty Font 24 | Name = "MS Sans Serif" 25 | Size = 8.25 26 | Charset = 0 27 | Weight = 700 28 | Underline = 0 'False 29 | Italic = 0 'False 30 | Strikethrough = 0 'False 31 | EndProperty 32 | ForeColor = &H00FFFFFF& 33 | Height = 1395 34 | Index = 5 35 | Left = 1800 36 | TabIndex = 39 37 | Top = 0 38 | Width = 2235 39 | Begin VB.CommandButton ForceDisconnect 40 | Caption = "Force Disconnect" 41 | Height = 1065 42 | Left = 120 43 | Picture = "telnet.frx":34CA 44 | Style = 1 'Graphical 45 | TabIndex = 45 46 | Top = 240 47 | Visible = 0 'False 48 | Width = 2055 49 | End 50 | Begin VB.OptionButton BoardUp 51 | BackColor = &H00EF7070& 52 | Caption = "Accepting Calls" 53 | BeginProperty Font 54 | Name = "MS Sans Serif" 55 | Size = 8.25 56 | Charset = 0 57 | Weight = 700 58 | Underline = 0 'False 59 | Italic = 0 'False 60 | Strikethrough = 0 'False 61 | EndProperty 62 | ForeColor = &H00FFFFFF& 63 | Height = 315 64 | Index = 0 65 | Left = 120 66 | TabIndex = 42 67 | Top = 240 68 | Value = -1 'True 69 | Width = 1695 70 | End 71 | Begin VB.OptionButton BoardUp 72 | BackColor = &H00EF7070& 73 | Caption = "Not Accepting Calls" 74 | BeginProperty Font 75 | Name = "MS Sans Serif" 76 | Size = 8.25 77 | Charset = 0 78 | Weight = 700 79 | Underline = 0 'False 80 | Italic = 0 'False 81 | Strikethrough = 0 'False 82 | EndProperty 83 | ForeColor = &H00FFFFFF& 84 | Height = 315 85 | Index = 1 86 | Left = 120 87 | TabIndex = 41 88 | Top = 600 89 | Width = 2055 90 | End 91 | Begin VB.CommandButton SetAwayMessage 92 | Caption = "Set Message..." 93 | Height = 330 94 | Left = 120 95 | TabIndex = 40 96 | Top = 960 97 | Width = 2055 98 | End 99 | End 100 | Begin VB.Frame Frame 101 | BackColor = &H00EF7070& 102 | Caption = "Telnet Activity" 103 | BeginProperty Font 104 | Name = "MS Sans Serif" 105 | Size = 8.25 106 | Charset = 0 107 | Weight = 700 108 | Underline = 0 'False 109 | Italic = 0 'False 110 | Strikethrough = 0 'False 111 | EndProperty 112 | ForeColor = &H00FFFFFF& 113 | Height = 1395 114 | Index = 3 115 | Left = 120 116 | TabIndex = 34 117 | Top = 0 118 | Width = 1575 119 | Begin VB.Timer OffHookTimer 120 | Enabled = 0 'False 121 | Left = 1080 122 | Top = 240 123 | End 124 | Begin VB.CommandButton TelnetRX 125 | BackColor = &H00000000& 126 | Enabled = 0 'False 127 | Height = 195 128 | Left = 360 129 | Style = 1 'Graphical 130 | TabIndex = 36 131 | Top = 1035 132 | Width = 255 133 | End 134 | Begin VB.CommandButton TelnetTX 135 | BackColor = &H00000000& 136 | Enabled = 0 'False 137 | Height = 195 138 | Left = 855 139 | Style = 1 'Graphical 140 | TabIndex = 35 141 | Top = 1035 142 | Width = 255 143 | End 144 | Begin VB.Label BBSState 145 | Alignment = 2 'Center 146 | BorderStyle = 1 'Fixed Single 147 | Caption = "-" 148 | BeginProperty Font 149 | Name = "MS Sans Serif" 150 | Size = 8.25 151 | Charset = 0 152 | Weight = 700 153 | Underline = 0 'False 154 | Italic = 0 'False 155 | Strikethrough = 0 'False 156 | EndProperty 157 | ForeColor = &H00000000& 158 | Height = 270 159 | Left = 165 160 | TabIndex = 43 161 | Top = 360 162 | Width = 1275 163 | End 164 | Begin VB.Label Label 165 | BackStyle = 0 'Transparent 166 | Caption = "RX" 167 | BeginProperty Font 168 | Name = "MS Sans Serif" 169 | Size = 8.25 170 | Charset = 0 171 | Weight = 700 172 | Underline = 0 'False 173 | Italic = 0 'False 174 | Strikethrough = 0 'False 175 | EndProperty 176 | ForeColor = &H00FFFFFF& 177 | Height = 255 178 | Index = 18 179 | Left = 330 180 | TabIndex = 38 181 | Top = 795 182 | Width = 315 183 | End 184 | Begin VB.Label Label 185 | BackStyle = 0 'Transparent 186 | Caption = "TX" 187 | BeginProperty Font 188 | Name = "MS Sans Serif" 189 | Size = 8.25 190 | Charset = 0 191 | Weight = 700 192 | Underline = 0 'False 193 | Italic = 0 'False 194 | Strikethrough = 0 'False 195 | EndProperty 196 | ForeColor = &H00FFFFFF& 197 | Height = 255 198 | Index = 17 199 | Left = 840 200 | TabIndex = 37 201 | Top = 795 202 | Width = 315 203 | End 204 | End 205 | Begin VB.Frame Frame 206 | BackColor = &H00EF7070& 207 | Caption = "Serial Activity" 208 | BeginProperty Font 209 | Name = "MS Sans Serif" 210 | Size = 8.25 211 | Charset = 0 212 | Weight = 700 213 | Underline = 0 'False 214 | Italic = 0 'False 215 | Strikethrough = 0 'False 216 | EndProperty 217 | ForeColor = &H00FFFFFF& 218 | Height = 795 219 | Index = 4 220 | Left = 120 221 | TabIndex = 19 222 | ToolTipText = "These LEDs show the state of the signals on the PC side." 223 | Top = 1440 224 | Width = 3915 225 | Begin VB.Timer GraphicsTimer 226 | Interval = 30 227 | Left = -120 228 | Top = 240 229 | End 230 | Begin VB.CommandButton SerialDTR 231 | BackColor = &H00000000& 232 | Height = 195 233 | Left = 3300 234 | Style = 1 'Graphical 235 | TabIndex = 32 236 | Top = 480 237 | Width = 255 238 | End 239 | Begin VB.CommandButton SerialRTS 240 | BackColor = &H00000000& 241 | Height = 195 242 | Left = 2805 243 | Style = 1 'Graphical 244 | TabIndex = 30 245 | Top = 480 246 | Width = 255 247 | End 248 | Begin VB.CommandButton SerialDCD 249 | BackColor = &H00000000& 250 | Enabled = 0 'False 251 | Height = 195 252 | Left = 2325 253 | Style = 1 'Graphical 254 | TabIndex = 28 255 | Top = 480 256 | Width = 255 257 | End 258 | Begin VB.CommandButton SerialDSR 259 | BackColor = &H00000000& 260 | Enabled = 0 'False 261 | Height = 195 262 | Left = 1830 263 | Style = 1 'Graphical 264 | TabIndex = 26 265 | Top = 480 266 | Width = 255 267 | End 268 | Begin VB.CommandButton SerialCTS 269 | BackColor = &H00000000& 270 | Enabled = 0 'False 271 | Height = 195 272 | Left = 1335 273 | Style = 1 'Graphical 274 | TabIndex = 25 275 | Top = 480 276 | Width = 255 277 | End 278 | Begin VB.CommandButton SerialTX 279 | BackColor = &H00000000& 280 | Enabled = 0 'False 281 | Height = 195 282 | Left = 855 283 | Style = 1 'Graphical 284 | TabIndex = 24 285 | Top = 480 286 | Width = 255 287 | End 288 | Begin VB.CommandButton SerialRX 289 | BackColor = &H00000000& 290 | Enabled = 0 'False 291 | Height = 195 292 | Left = 360 293 | Style = 1 'Graphical 294 | TabIndex = 23 295 | Top = 480 296 | Width = 255 297 | End 298 | Begin VB.Label Label 299 | BackStyle = 0 'Transparent 300 | Caption = "DTR" 301 | BeginProperty Font 302 | Name = "MS Sans Serif" 303 | Size = 8.25 304 | Charset = 0 305 | Weight = 700 306 | Underline = 0 'False 307 | Italic = 0 'False 308 | Strikethrough = 0 'False 309 | EndProperty 310 | ForeColor = &H00FFFFFF& 311 | Height = 255 312 | Index = 11 313 | Left = 3240 314 | TabIndex = 33 315 | Top = 240 316 | Width = 435 317 | End 318 | Begin VB.Label Label 319 | BackStyle = 0 'Transparent 320 | Caption = "RTS" 321 | BeginProperty Font 322 | Name = "MS Sans Serif" 323 | Size = 8.25 324 | Charset = 0 325 | Weight = 700 326 | Underline = 0 'False 327 | Italic = 0 'False 328 | Strikethrough = 0 'False 329 | EndProperty 330 | ForeColor = &H00FFFFFF& 331 | Height = 255 332 | Index = 10 333 | Left = 2745 334 | TabIndex = 31 335 | Top = 240 336 | Width = 435 337 | End 338 | Begin VB.Label Label 339 | BackStyle = 0 'Transparent 340 | Caption = "DCD" 341 | BeginProperty Font 342 | Name = "MS Sans Serif" 343 | Size = 8.25 344 | Charset = 0 345 | Weight = 700 346 | Underline = 0 'False 347 | Italic = 0 'False 348 | Strikethrough = 0 'False 349 | EndProperty 350 | ForeColor = &H00FFFFFF& 351 | Height = 255 352 | Index = 9 353 | Left = 2250 354 | TabIndex = 29 355 | Top = 240 356 | Width = 435 357 | End 358 | Begin VB.Label Label 359 | BackStyle = 0 'Transparent 360 | Caption = "DSR" 361 | BeginProperty Font 362 | Name = "MS Sans Serif" 363 | Size = 8.25 364 | Charset = 0 365 | Weight = 700 366 | Underline = 0 'False 367 | Italic = 0 'False 368 | Strikethrough = 0 'False 369 | EndProperty 370 | ForeColor = &H00FFFFFF& 371 | Height = 255 372 | Index = 8 373 | Left = 1740 374 | TabIndex = 27 375 | Top = 240 376 | Width = 435 377 | End 378 | Begin VB.Label Label 379 | BackStyle = 0 'Transparent 380 | Caption = "CTS" 381 | BeginProperty Font 382 | Name = "MS Sans Serif" 383 | Size = 8.25 384 | Charset = 0 385 | Weight = 700 386 | Underline = 0 'False 387 | Italic = 0 'False 388 | Strikethrough = 0 'False 389 | EndProperty 390 | ForeColor = &H00FFFFFF& 391 | Height = 255 392 | Index = 7 393 | Left = 1275 394 | TabIndex = 22 395 | Top = 240 396 | Width = 435 397 | End 398 | Begin VB.Label Label 399 | BackStyle = 0 'Transparent 400 | Caption = "TX" 401 | BeginProperty Font 402 | Name = "MS Sans Serif" 403 | Size = 8.25 404 | Charset = 0 405 | Weight = 700 406 | Underline = 0 'False 407 | Italic = 0 'False 408 | Strikethrough = 0 'False 409 | EndProperty 410 | ForeColor = &H00FFFFFF& 411 | Height = 255 412 | Index = 6 413 | Left = 840 414 | TabIndex = 21 415 | Top = 240 416 | Width = 315 417 | End 418 | Begin VB.Label Label 419 | BackStyle = 0 'Transparent 420 | Caption = "RX" 421 | BeginProperty Font 422 | Name = "MS Sans Serif" 423 | Size = 8.25 424 | Charset = 0 425 | Weight = 700 426 | Underline = 0 'False 427 | Italic = 0 'False 428 | Strikethrough = 0 'False 429 | EndProperty 430 | ForeColor = &H00FFFFFF& 431 | Height = 255 432 | Index = 4 433 | Left = 330 434 | TabIndex = 20 435 | Top = 240 436 | Width = 315 437 | End 438 | End 439 | Begin VB.CommandButton Exit 440 | BackColor = &H000000FF& 441 | Caption = "Exit" 442 | Height = 312 443 | Left = 6360 444 | Style = 1 'Graphical 445 | TabIndex = 18 446 | Top = 8160 447 | Width = 975 448 | End 449 | Begin VB.Timer SecondTimer 450 | Interval = 1000 451 | Left = 6840 452 | Top = 7560 453 | End 454 | Begin VB.Frame Frame 455 | BackColor = &H00EF7070& 456 | Caption = "Caller Status" 457 | BeginProperty Font 458 | Name = "MS Sans Serif" 459 | Size = 8.25 460 | Charset = 0 461 | Weight = 700 462 | Underline = 0 'False 463 | Italic = 0 'False 464 | Strikethrough = 0 'False 465 | EndProperty 466 | ForeColor = &H00FFFFFF& 467 | Height = 795 468 | Index = 0 469 | Left = 120 470 | TabIndex = 14 471 | Top = 2280 472 | Width = 3915 473 | Begin VB.Label CallerStatus 474 | BackColor = &H00000000& 475 | BorderStyle = 1 'Fixed Single 476 | Caption = "..." 477 | BeginProperty Font 478 | Name = "MS Sans Serif" 479 | Size = 8.25 480 | Charset = 0 481 | Weight = 700 482 | Underline = 0 'False 483 | Italic = 0 'False 484 | Strikethrough = 0 'False 485 | EndProperty 486 | ForeColor = &H00FFFFFF& 487 | Height = 255 488 | Left = 120 489 | TabIndex = 15 490 | Top = 345 491 | Width = 3675 492 | End 493 | End 494 | Begin VB.Frame Frame 495 | BackColor = &H00EF7070& 496 | Caption = "Configuration" 497 | BeginProperty Font 498 | Name = "MS Sans Serif" 499 | Size = 8.25 500 | Charset = 0 501 | Weight = 700 502 | Underline = 0 'False 503 | Italic = 0 'False 504 | Strikethrough = 0 'False 505 | EndProperty 506 | ForeColor = &H00FFFFFF& 507 | Height = 3075 508 | Index = 1 509 | Left = 4140 510 | TabIndex = 3 511 | Top = 0 512 | Width = 3195 513 | Begin VB.ComboBox IPAddressList 514 | Height = 315 515 | Left = 1320 516 | Style = 2 'Dropdown List 517 | TabIndex = 17 518 | Top = 900 519 | Width = 1695 520 | End 521 | Begin VB.CommandButton AdvancedButton 522 | Caption = "Advanced..." 523 | Height = 312 524 | Left = 120 525 | TabIndex = 16 526 | Top = 2190 527 | Width = 2895 528 | End 529 | Begin VB.TextBox BBSNameText 530 | BeginProperty Font 531 | Name = "MS Sans Serif" 532 | Size = 8.25 533 | Charset = 0 534 | Weight = 700 535 | Underline = 0 'False 536 | Italic = 0 'False 537 | Strikethrough = 0 'False 538 | EndProperty 539 | Height = 285 540 | Left = 120 541 | TabIndex = 12 542 | Text = "Commodore Telnet BBS" 543 | Top = 480 544 | Width = 2895 545 | End 546 | Begin VB.TextBox COMportText 547 | Alignment = 1 'Right Justify 548 | Height = 285 549 | Left = 1320 550 | TabIndex = 6 551 | Text = "1" 552 | Top = 1770 553 | Width = 1695 554 | End 555 | Begin VB.TextBox TelnetPortText 556 | Alignment = 1 'Right Justify 557 | Height = 285 558 | Left = 1320 559 | TabIndex = 5 560 | Text = "23" 561 | Top = 1350 562 | Width = 1695 563 | End 564 | Begin VB.CommandButton ApplyChanges 565 | Caption = "Save+Apply Changes" 566 | Height = 312 567 | Left = 120 568 | TabIndex = 4 569 | Top = 2640 570 | Width = 2895 571 | End 572 | Begin VB.Label Label 573 | BackStyle = 0 'Transparent 574 | Caption = "BBS Name / Welcome Banner:" 575 | BeginProperty Font 576 | Name = "MS Sans Serif" 577 | Size = 8.25 578 | Charset = 0 579 | Weight = 700 580 | Underline = 0 'False 581 | Italic = 0 'False 582 | Strikethrough = 0 'False 583 | EndProperty 584 | ForeColor = &H00FFFFFF& 585 | Height = 252 586 | Index = 0 587 | Left = 120 588 | TabIndex = 13 589 | Top = 240 590 | Width = 2952 591 | End 592 | Begin VB.Label Label 593 | BackStyle = 0 'Transparent 594 | Caption = "COM Port:" 595 | BeginProperty Font 596 | Name = "MS Sans Serif" 597 | Size = 8.25 598 | Charset = 0 599 | Weight = 700 600 | Underline = 0 'False 601 | Italic = 0 'False 602 | Strikethrough = 0 'False 603 | EndProperty 604 | ForeColor = &H00FFFFFF& 605 | Height = 255 606 | Index = 3 607 | Left = 120 608 | TabIndex = 9 609 | Top = 1800 610 | Width = 1275 611 | End 612 | Begin VB.Label Label 613 | BackStyle = 0 'Transparent 614 | Caption = "Telnet Port:" 615 | BeginProperty Font 616 | Name = "MS Sans Serif" 617 | Size = 8.25 618 | Charset = 0 619 | Weight = 700 620 | Underline = 0 'False 621 | Italic = 0 'False 622 | Strikethrough = 0 'False 623 | EndProperty 624 | ForeColor = &H00FFFFFF& 625 | Height = 255 626 | Index = 2 627 | Left = 120 628 | TabIndex = 8 629 | Top = 1334 630 | Width = 1275 631 | End 632 | Begin VB.Label Label 633 | BackStyle = 0 'Transparent 634 | Caption = "IP Address:" 635 | BeginProperty Font 636 | Name = "MS Sans Serif" 637 | Size = 8.25 638 | Charset = 0 639 | Weight = 700 640 | Underline = 0 'False 641 | Italic = 0 'False 642 | Strikethrough = 0 'False 643 | EndProperty 644 | ForeColor = &H00FFFFFF& 645 | Height = 255 646 | Index = 1 647 | Left = 120 648 | TabIndex = 7 649 | Top = 922 650 | Width = 1275 651 | End 652 | End 653 | Begin MSWinsockLib.Winsock Incoming 654 | Index = 0 655 | Left = 3900 656 | Top = 6480 657 | _ExtentX = 741 658 | _ExtentY = 741 659 | _Version = 393216 660 | LocalPort = 1000 661 | End 662 | Begin MSWinsockLib.Winsock Telnet 663 | Left = 4320 664 | Top = 6480 665 | _ExtentX = 741 666 | _ExtentY = 741 667 | _Version = 393216 668 | LocalPort = 1000 669 | End 670 | Begin MSCommLib.MSComm MSComm 671 | Left = 4800 672 | Top = 6480 673 | _ExtentX = 794 674 | _ExtentY = 794 675 | _Version = 393216 676 | CommPort = 9 677 | DTREnable = -1 'True 678 | End 679 | Begin VB.CommandButton ClearOnly 680 | Caption = "Clear Log" 681 | Height = 312 682 | Left = 120 683 | TabIndex = 0 684 | Top = 8160 685 | Width = 2175 686 | End 687 | Begin VB.CommandButton About 688 | Caption = "About..." 689 | Height = 312 690 | Left = 5340 691 | TabIndex = 1 692 | Top = 8160 693 | Width = 975 694 | End 695 | Begin VB.Frame Frame 696 | BackColor = &H00EF7070& 697 | Caption = "Activity Log (Newest Events First)" 698 | BeginProperty Font 699 | Name = "MS Sans Serif" 700 | Size = 8.25 701 | Charset = 0 702 | Weight = 700 703 | Underline = 0 'False 704 | Italic = 0 'False 705 | Strikethrough = 0 'False 706 | EndProperty 707 | ForeColor = &H00FFFFFF& 708 | Height = 4935 709 | Index = 2 710 | Left = 120 711 | TabIndex = 10 712 | Top = 3120 713 | Width = 7215 714 | Begin VB.ListBox LogDisplay 715 | Height = 4155 716 | Left = 120 717 | TabIndex = 11 718 | Top = 240 719 | Width = 6975 720 | End 721 | Begin VB.Label OutCount 722 | BackStyle = 0 'Transparent 723 | Caption = "-" 724 | BeginProperty Font 725 | Name = "MS Sans Serif" 726 | Size = 8.25 727 | Charset = 0 728 | Weight = 700 729 | Underline = 0 'False 730 | Italic = 0 'False 731 | Strikethrough = 0 'False 732 | EndProperty 733 | ForeColor = &H00FFFFFF& 734 | Height = 255 735 | Left = 120 736 | TabIndex = 44 737 | Top = 4560 738 | Width = 5475 739 | End 740 | End 741 | Begin VB.Image WaitingIcon 742 | Height = 480 743 | Left = 0 744 | Picture = "telnet.frx":37D4 745 | Top = 240 746 | Visible = 0 'False 747 | Width = 480 748 | End 749 | Begin VB.Image OfflineIcon 750 | Height = 480 751 | Left = 0 752 | Picture = "telnet.frx":6C9E 753 | Top = 1200 754 | Visible = 0 'False 755 | Width = 480 756 | End 757 | Begin VB.Image OnlineIcon 758 | Height = 480 759 | Left = 0 760 | Picture = "telnet.frx":A168 761 | Top = 720 762 | Visible = 0 'False 763 | Width = 480 764 | End 765 | Begin VB.Label Label1 766 | BackStyle = 0 'Transparent 767 | Caption = "Log file is c64bbslog.txt" 768 | ForeColor = &H00FFFFFF& 769 | Height = 252 770 | Left = 2340 771 | TabIndex = 2 772 | Top = 8220 773 | Width = 1992 774 | End 775 | End 776 | Attribute VB_Name = "TelnetBBS" 777 | Attribute VB_GlobalNameSpace = False 778 | Attribute VB_Creatable = False 779 | Attribute VB_PredeclaredId = True 780 | Attribute VB_Exposed = False 781 | ' Commodore 64 (etc...) Telnet BBS program. 782 | ' Bridges data between a TCP port and a COM port. 783 | ' 784 | ' Copyright 2003-2006 Leif Bloomquist leifb@ica.net http://home.ica.net/~leifb/bbs/ 785 | ' 786 | ' You may freely use, modify, distribute etc. this source code, but please keep 787 | ' my copyright notice in both the source and the "About" box. 788 | ' 789 | ' No warranty of any kind. 790 | 791 | ' Version 0.8a - General release. (LB) 792 | ' Version 0.8b - Added detection for DSR *or* DCD to be dropped. (LB) 793 | ' Version 0.8c - Replaced 'Sleep()' with 'DoEvents' after down/busy messages. (LB) 794 | ' Version 0.8d - Added option to set DTR as well as RTS on connect, 795 | ' expanded diagnostics and Advanced page. Added Sounds. (LB) 796 | ' Version 0.9a - Finally - Hayes Emulation. Also included Fox's changes. Revamped config file. 797 | ' 0.9b - Bugfixes 798 | ' 799 | ' Version 1.0a - RC1 800 | ' Mega Public release. 801 | ' Added IAC Telnet Response Code. 802 | ' Fixed bug with COM port initialization order. 803 | ' Fixed bug with ATH0 wrongly saying BBS was in "Waiting" state. 804 | ' CR or LF can now be used as delimiter before AT Commands. 805 | ' 806 | ' RC2 807 | ' Got rid of the popup boxes if an unknown IAC code is received (when a Real Telnet session is in progress). 808 | ' Check the first incoming byte of the session, and 255="Real" Telnet session (i.e. to Linux), anything else means a Telnet BBS. 809 | ' In the latter case, data will be passed transparently so file transfers should work. 810 | ' If there is only 1 IP address on the system, always use it. 811 | ' Replaced the Sleep() for staying offhook with a Timer. 812 | ' Added an option for echoing data back to BBS when in command mode. 813 | ' 814 | ' RC3 (final) 815 | ' Changed Connecting... to connecting... 816 | ' Fixed bug where "NO CARRIER" was sent even if nothing connected, which caused a RunTime error. 817 | ' Added option to hang up on an RS-232 break. 818 | ' Added option for sending Winsock errors to Terminal program. 819 | ' General code tidyup. 820 | ' 821 | ' Version 1.1 822 | ' Bugfixes and tidyup. 823 | ' Enabled backspace when typing an AT command. (finally!) 824 | ' Added auto-detection of command case (i.e. PETSCII), sO rESPONSES aREN'T lIKE tHIS 825 | ' Added A/ support. 826 | ' Added ATEx support. 827 | ' Switched to a 'virtual modem' internal state structure. 828 | ' ATZ resets the virtual modem. 829 | ' Option to play a WAV file when callers connect or disconnect 830 | ' ATU (non-standard command) shuts down Windows, for headless systems. (!) 831 | ' ATU1 shuts down PC, ATU2 just exits BBS Server 832 | ' Pressing a key aborts the current call before it connects. 833 | ' 834 | ' Version 1.2 835 | ' Added an option to enable hardware flow control. 836 | ' Fancier Hayes emulation to parse entire string. 837 | ' Redesigned GUI to show more serial activity detail. 838 | ' Fixed A/ bug. 839 | ' Sends a busy file (busy.txt) to callers when busy 840 | ' Added Phone Book and import routine. 841 | ' Better control of signals at disconnect. 842 | ' Different cable types and defaults. 843 | ' 844 | ' Version 1.3b1 Fixed a bug with repeated file #s. 845 | ' Fixed bug that truncated AT commands at 1200 baud (i.e calling Qlink) 846 | ' Changed MSComm.OutBufferSize to 10000 847 | ' Better error handling in phone book load 848 | ' Added a force disconnect button 849 | ' 850 | ' Version 1.3 (Fixes by Eric Pearson) 851 | ' Raise RTS on outbound connection 852 | ' Raise DTR on outbound connection 853 | ' Lower RTS when Call disconnects and Lower DTR when caller disconnects are preserved in INI 854 | ' 855 | ' Version 1.4 Option to force RTS always on by adding -rts to the command line. 856 | ' Fixed bug where A/ only remembered the port a single time. 857 | ' Option to disable +++ detection. 858 | ' ATS0 will put BBS back on-hook. 859 | ' 860 | ' Version 1.4a Bugfix! Disconnect on RS232 Break only worked in Diag mode before. 861 | ' Bugfix! Port for Outgoing calls is now a Long (was Integer) 862 | ' 863 | 'TODO: 864 | ' Phone book bug! Book is saved when form not loaded 865 | ' Numerical response codes (needed for some BBSes i.e. Image) 866 | ' Weird bug where file transfers fail after 255 blocks - how would BBS Server cause that though? 867 | 868 | Option Explicit 869 | 870 | 'Global Variables 871 | Public ConnectionActive As Boolean ' This is set when a 'caller' is connected. 872 | Dim ConnectionTime As Long ' This counts the number of seconds caller has been connected 873 | Dim IdleTime As Long ' This counts the number of seconds caller has been idle 874 | Dim WaitingForResponse As Boolean ' This is set when waiting for a special character from the caller 875 | Public UsingCharTranslation As Boolean ' This is set when the caller wants translation, i.e. PETSCII mode 876 | Dim ProgramShutDown As Boolean ' Internal flag used when shutting down, to keep things tidy (i.e. tray icon) 877 | Public FirstCharReceived As Boolean ' This flag is set after the first character is received. 878 | Public TrueTelnetMode As Boolean ' Set if the first character was byte 255 (Telnet IAC) 879 | Public SerialBufCountMax As Integer ' Maximum buffer count for this call 880 | Public ForceRTS As Boolean ' Hack for some BBSes (i.e. Mad World) 881 | 882 | Private Sub About_Click() 883 | MsgBox TelnetBBS.Caption & Chr$(13) & _ 884 | "Copyright 2003-2008 by Leif Bloomquist" & Chr$(13) & Chr$(13) & _ 885 | "For more information, please visit" & Chr$(13) & _ 886 | "http://www.jammingsignal.com " & Chr$(13) & Chr$(13) & _ 887 | "Many thanks to: " & Chr$(13) & _ 888 | "Jeff Ledger, " & _ 889 | "Jeff Hall, " & _ 890 | "Jim Brain, " & _ 891 | "Sysop Fox-1, " & _ 892 | "Eric Pearson, " & _ 893 | "Oliver VieBrooks, " & _ 894 | "John Ward, " & _ 895 | "Rick Lucas, " & _ 896 | "Mike Martin, " & _ 897 | "Moise, " & _ 898 | "CyberJank, " & _ 899 | "Tom Luff, " & _ 900 | "Dustin Chambers, " & _ 901 | "Brian Green, " & _ 902 | "Andrew Wiskow, " & _ 903 | "and the the rest of the gang at " & _ 904 | "forms.petscii.com!", vbInformation 905 | End Sub 906 | 907 | Private Sub AdvancedButton_Click() 908 | Advanced.Show vbModal 909 | End Sub 910 | 911 | Private Sub ApplyChanges_Click() 912 | LogDisplay.Clear 913 | ApplyINI 914 | SaveINI 915 | End Sub 916 | 917 | Private Sub BoardUp_Click(Index As Integer) 918 | If Index = 0 Then 919 | ShowWaitingState 920 | Else 921 | ShowOfflineState 922 | End If 923 | End Sub 924 | 925 | Private Sub ClearOnly_Click() 926 | LogDisplay.Clear 927 | End Sub 928 | 929 | Private Sub Exit_Click() 930 | 931 | 'Confirm that the Sysop really wants to shut the server down 932 | Dim Result As Integer 933 | 934 | Result = MsgBox("Are you sure you want to shut down the server?", vbYesNo Or vbExclamation) 935 | 936 | If (Result = vbYes) Then 'Yes 937 | ProgramShutDown = True 938 | DeleteIcon Me 'Get rid of the tray icon 939 | DoEvents 940 | Disconnect 'Hang up and disconnect Telnet caller 941 | End 'Exit the program. 942 | End If 943 | 944 | If (Result = vbNo) Then 'No 945 | Exit Sub 'Do nothing 946 | End If 947 | End Sub 948 | 949 | Private Sub ForceDisconnect_Click() 950 | AddMessage "Sysop forced disconnect." 951 | Disconnect 952 | End Sub 953 | 954 | Private Sub Form_Load() 955 | 956 | On Error GoTo LoadError: 957 | 958 | ProgramShutDown = False 959 | 960 | 'Leif's debug paths (set by command line within VB IDE, under Project, Properties Make) 961 | If Command = "-leifdir" Then 962 | 'ChDir "C:\Documents and Settings\Administrator\Desktop\BBS Server 1.4 Testing" 963 | ChDir "C:\Documents and Settings\Administrator\My Documents\Commodore\BBS Server\" 964 | End If 965 | 966 | If Command = "-rts" Then 967 | ForceRTS = True 968 | Else 969 | ForceRTS = False 970 | End If 971 | 972 | 'Avoid duplicate instances (from same directory - other instances OK) 973 | If (App.PrevInstance) Then End 974 | 975 | 'Load configuration 976 | LoadINI 977 | 978 | 'Determine all IP Addresses 979 | DetermineIPs 980 | 981 | 'Apply Settings 982 | ApplyINI 983 | 984 | 'Show that server is waiting for a call 985 | ShowWaitingState 986 | 987 | 'Set that we're not waiting for a special character 988 | WaitingForResponse = False 989 | 990 | 'Create Tray Icon 991 | CreateIcon Me, Me.Caption 992 | 993 | 'Reset the virtual modem 994 | ResetVirtualModem 995 | 996 | Exit Sub 997 | 998 | LoadError: 999 | AddMessage "Form_Load(): " & Err.Description & " (" & Err.Number & ")" 1000 | Resume Next 1001 | End Sub 1002 | 1003 | 1004 | Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) 1005 | 1006 | 'Sysop Pressed close button - hide instead. 1007 | If (UnloadMode = vbFormControlMenu) Then 1008 | Me.Hide 1009 | Cancel = 1 'Prevent Exit 1010 | Exit Sub 1011 | End If 1012 | 1013 | 'All other cases 1014 | ProgramShutDown = True 1015 | DeleteIcon Me 'Get rid of the tray icon 1016 | DoEvents 1017 | Disconnect 'Hang up and disconnect Telnet caller 1018 | End 'Exit the program. 1019 | End Sub 1020 | 1021 | Private Sub IPAddressList_Click() 1022 | IPAddressToUse = IPAddressList.text 1023 | End Sub 1024 | 1025 | 1026 | 'Handle data from the BBS, received from the Serial port. 1027 | Private Sub MSComm_OnComm() 1028 | 1029 | 'Update the serial gfx 1030 | UpdateLEDs 1031 | 1032 | On Error GoTo CommError: 1033 | 1034 | Dim CEvent As Integer 1035 | CEvent = MSComm.CommEvent 1036 | 1037 | Dim Received As String 'Data received over serial port 1038 | 1039 | Select Case CEvent 1040 | ' Handle each event or error by placing 1041 | ' code below each case statement 1042 | 1043 | ' Errors 1044 | Case comEventBreak ' A Break was received. 1045 | If (Advanced.DetailedDiagnostics.value) Then 1046 | AddMessage "RS232 Break Received" 1047 | End If 1048 | 1049 | If (Advanced.HangupOnBreak.value) Then 1050 | Disconnect 1051 | End If 1052 | 1053 | Exit Sub 1054 | 1055 | Case comEventFrame ' Framing Error 1056 | If (Advanced.DetailedDiagnostics.value) Then AddMessage "RS232 Error: Framing Error! (Check Baud Rate)" 1057 | Exit Sub 1058 | 1059 | Case comEventOverrun ' Data Lost. 1060 | AddMessage "RS232 Error: Overrun! Data Lost." 1061 | Exit Sub 1062 | 1063 | Case comEventRxOver ' Receive buffer overflow. 1064 | AddMessage "RS232 Error: Receive Buffer Overflow!" 1065 | Exit Sub 1066 | 1067 | Case comEventRxParity ' Parity Error. 1068 | AddMessage "RS232 Error: Parity Error!" 1069 | Exit Sub 1070 | 1071 | Case comEventTxFull ' Transmit buffer full. 1072 | AddMessage "RS232 Error: Transmit Buffer Full!" 1073 | AddMessage "Output buffer size is " & MSComm.OutBufferSize 1074 | Exit Sub 1075 | 1076 | Case comEventDCB ' Unexpected error retrieving DCB 1077 | AddMessage "RS232 Error: EventDCB!" 1078 | Exit Sub 1079 | 1080 | ' Events 1081 | Case comEvCD ' Change in the CD line. 1082 | If (MSComm.CDHolding = False) And (ConnectionActive) And (Advanced.CheckDCD.value) Then 1083 | AddMessage "BBS closed connection via DCD, closing Telnet session " & Telnet.RemoteHostIP 1084 | Disconnect 1085 | End If 1086 | Exit Sub 1087 | 1088 | Case comEvCTS ' Change in the CTS line - do nothing 1089 | Exit Sub 1090 | 1091 | Case comEvDSR ' Change in the DSR line. 1092 | If (MSComm.DSRHolding = False) And (ConnectionActive) And (Advanced.CheckDSR.value) Then 1093 | AddMessage "BBS closed connection via DSR, closing Telnet session " & Telnet.RemoteHostIP 1094 | Disconnect 1095 | Exit Sub 1096 | End If 1097 | Exit Sub 1098 | 1099 | Case comEvRing ' Change in the Ring Indicator. 1100 | If (Advanced.DetailedDiagnostics.value) Then AddMessage "Ring Indicator Changed." 1101 | Exit Sub 1102 | 1103 | '---------------------------------------------------------------- 1104 | 'This is the most important event - process a received character 1105 | '---------------------------------------------------------------- 1106 | Case comEvReceive ' Received RThreshold # of chars. 1107 | SerialRX.Tag = 255 ' Full Brightness on LED 1108 | Received = MSComm.Input 1109 | 1110 | 'Forward to telnet port if connected and not in Hayes Command Mode 1111 | If (ConnectionActive) And (Not VirtualModem.CommandMode) And (Telnet.State = sckConnected) Then 1112 | 1113 | 'ASCII/PETSCII Translation? 1114 | If (UsingCharTranslation) Then 1115 | Telnet.SendData TranslateSerial(Received) 1116 | Else 1117 | Telnet.SendData Received 1118 | End If 1119 | 1120 | TelnetTX.Tag = 255 'Full Brightness 1121 | 1122 | 'Check for +++, which is done while online 1123 | HandlePluses Received 1124 | 1125 | ' BBS is offline or in command mode, so this may be a command string. 1126 | Else 1127 | 'Cancel the outgoing call if a character was received before connect 1128 | If (VirtualModem.OutGoingCall) And Not (Telnet.State = sckConnected) Then 1129 | Disconnect 1130 | OutgoingCallDisconnected 1131 | AddMessage "Outgoing call cancelled." 1132 | End If 1133 | 1134 | If (Advanced.EnableHayes) Then HandleCommandMode Received 1135 | End If 1136 | 1137 | Exit Sub 1138 | '---------------------------------------------------------------- 1139 | 1140 | Case comEvSend ' There are SThreshold number of 1141 | ' characters in the transmit 1142 | ' buffer. 1143 | 1144 | Case comEvEOF ' An EOF charater was found in 1145 | ' the input stream 1146 | 1147 | End Select 1148 | 1149 | AddMessage "Unhandled CommEvent " & CEvent 1150 | 1151 | Exit Sub 1152 | 1153 | CommError: 1154 | AddMessage "MSComm_OnComm(): " & Err.Description & " (" & Err.Number & ")" 1155 | Disconnect 1156 | Exit Sub 1157 | End Sub 1158 | 1159 | Private Sub OffHookTimer_Timer() 1160 | ' If selected, the virtual modem will stay off-hook until this timer fires. 1161 | OffHookTimer.Enabled = False 1162 | 1163 | ShowWaitingState 1164 | VirtualModem.OffHook = False 1165 | CompleteDisconnect 1166 | End Sub 1167 | 1168 | Private Sub SecondTimer_Timer() 1169 | 1170 | 'Has there been a one-second delay in the data? If not, then no pause. (Used by Hayes Emulation) 1171 | If (VirtualModem.DataReceivedinLastSecond) Then 1172 | VirtualModem.OneSecondPauseOccured = False 1173 | Else 1174 | VirtualModem.OneSecondPauseOccured = True 1175 | End If 1176 | 1177 | 'Reset for another second 1178 | VirtualModem.DataReceivedinLastSecond = False 1179 | 1180 | If (VirtualModem.WaitingForATA) Then 1181 | If (VirtualModem.ATATimer <= 10) Then 1182 | VirtualModem.ATATimer = VirtualModem.ATATimer + 1 1183 | Else 1184 | AddMessage "Error: BBS Failed to issue ATA!" 1185 | TelnetBBS.Disconnect 1186 | VirtualModem.WaitingForATA = False 1187 | End If 1188 | Else 1189 | VirtualModem.ATATimer = 0 1190 | End If 1191 | 1192 | 1193 | ' Check up on the caller status 1194 | If (ConnectionActive = False) Then 1195 | CallerStatus.Caption = "..." 1196 | Exit Sub 1197 | End If 1198 | 1199 | ' Auto Disconnect if the usder has been on for way too long (default 3 hours) 1200 | If (ConnectionTime <= Val(Advanced.OnlineDisconnectTime.text) * 60) Then 1201 | ConnectionTime = ConnectionTime + 1 1202 | Else 1203 | If (Advanced.OnlineAutoDisconnect.value) Then 1204 | TelnetSendString 1205 | TelnetSendString "Time limit exceeded! Thanks for calling - call back soon." 1206 | AddMessage "Time limit exceeded - disconnected caller." 1207 | Disconnect 1208 | Exit Sub 1209 | End If 1210 | End If 1211 | 1212 | 'Auto disconnect after caller has been idle for too long (default 15 minutes) 1213 | 'This can also happen if the BBS hands (user disconnects but BBS doesn't hang up) 1214 | 1215 | If (IdleTime <= Val(Advanced.IdleDisconnectTime.text) * 60) Then 1216 | IdleTime = IdleTime + 1 1217 | Else 1218 | If (Advanced.IdleAutoDisconnect.value) Then 1219 | TelnetSendString 1220 | TelnetSendString "Idle timeout. Thanks for calling." 1221 | AddMessage "Idle timeout - disconnected caller." 1222 | Disconnect 1223 | Exit Sub 1224 | End If 1225 | End If 1226 | 1227 | CallerStatus.Caption = "Online " & MinsSecs(ConnectionTime) & " / Idle " & MinsSecs(IdleTime) 1228 | End Sub 1229 | 1230 | 'Used in debugging 1231 | Private Sub SerialDTR_Click() 1232 | MSComm.DTREnable = Not MSComm.DTREnable 1233 | UpdateLEDs 1234 | AddMessage "Manually changed DTR to " & MSComm.DTREnable 1235 | End Sub 1236 | 1237 | 'Used in debugging 1238 | Private Sub SerialRTS_Click() 1239 | 1240 | If MSComm.Handshaking = comRTS Then 1241 | AddMessage "Can't set RTS with hardware flow control enabled." 1242 | Else 1243 | MSComm.RTSEnable = Not MSComm.RTSEnable 1244 | UpdateLEDs 1245 | AddMessage "Manually changed RTS to " & MSComm.RTSEnable 1246 | End If 1247 | End Sub 1248 | 1249 | Private Sub SetAwayMessage_Click() 1250 | AwayMessage.Show vbModal 1251 | End Sub 1252 | 1253 | Private Sub Telnet_Close() 1254 | AddMessage "Telnet session with " & Telnet.RemoteHostIP & " disconnected." 1255 | Disconnect 1256 | 1257 | If (Advanced.SendNoCarrier.value) Or (VirtualModem.OutGoingCall) Then 1258 | OutgoingCallDisconnected 1259 | End If 1260 | End Sub 1261 | 1262 | Private Sub Incoming_ConnectionRequest(Index As Integer, ByVal requestID As Long) 1263 | 1264 | On Error GoTo RequestError: 1265 | 1266 | 'Invite caller back if a connection is already active 1267 | If (ConnectionActive) Or (VirtualModem.WaitingForATA) Or (VirtualModem.OffHook = True) Then 1268 | 1269 | 'Accept this extra connection on a new Winsock instance 1270 | Load Incoming(Incoming.UBound + 1) 1271 | Incoming(Incoming.UBound).Accept requestID 1272 | 1273 | 'Record in message log 1274 | AddMessage "Connection from " & Incoming(Incoming.UBound).RemoteHostIP & " but already busy." 1275 | 1276 | 'Invite caller back and show current user's online/idle time 1277 | Incoming(Incoming.UBound).SendData BBSNameText.text & Chr$(13) & Chr$(10) 1278 | Incoming(Incoming.UBound).SendData Chr$(13) & Chr$(10) 1279 | Incoming(Incoming.UBound).SendData "Sorry, the BBS is busy. Please try again in a few minutes!" & Chr$(13) & Chr$(10) 1280 | Incoming(Incoming.UBound).SendData Chr$(13) & Chr$(10) 1281 | Incoming(Incoming.UBound).SendData "Current Caller Status: " & CallerStatus.Caption & Chr$(13) & Chr$(10) 1282 | DoEvents ' This statement is absolutely required!!!! 1283 | SendBusyText Incoming.UBound ' Send the contents of busy.txt to caller 1284 | Incoming(Incoming.UBound).Close 1285 | 1286 | 'Unload the new instance 1287 | Unload Incoming(Incoming.UBound) 1288 | Exit Sub 1289 | End If 1290 | 1291 | 'Invite caller back if board is down 1292 | 1293 | If (BoardUp(1) = True) Then 1294 | 'Accept this connection on a new Winsock instance 1295 | Load Incoming(Incoming.UBound + 1) 1296 | Incoming(Incoming.UBound).Accept requestID 1297 | 1298 | 'Record in message log 1299 | AddMessage "Connection from " & Incoming(Incoming.UBound).RemoteHostIP & " but BBS is down." 1300 | 1301 | Incoming(Incoming.UBound).SendData Chr$(13) & Chr$(10) 1302 | Incoming(Incoming.UBound).SendData AwayMessage.Message 1303 | Incoming(Incoming.UBound).SendData Chr$(13) & Chr$(10) 1304 | Incoming(Incoming.UBound).SendData Chr$(13) & Chr$(10) 1305 | DoEvents ' This statement is absolutely required!!!! 1306 | SendBusyText Incoming.UBound 1307 | Incoming(Incoming.UBound).Close 1308 | 1309 | 'Unload the new instance 1310 | Unload Incoming(Incoming.UBound) 1311 | Exit Sub 1312 | End If 1313 | 1314 | 'Make sure port is closed before accepting 1315 | If (Telnet.State <> sckClosed) Then Telnet.Close 1316 | 1317 | 'Reset Timers 1318 | ConnectionTime = 0 1319 | IdleTime = 0 1320 | 1321 | 'Accept the request (completes connection) 1322 | Telnet.Accept requestID 1323 | 1324 | 'Send the BBS Name 1325 | TelnetSendString BBSNameText.text & vbCrLf 1326 | DoEvents 1327 | 1328 | 'Discard any extraneous characters 1329 | Dim temp As String 1330 | Telnet.GetData temp, vbString 1331 | 1332 | 'Update status indicators 1333 | ShowOnlineState "Caller from " & Telnet.RemoteHostIP 1334 | 1335 | 'Inhibit Sysop from taking board down while caller is connected 1336 | BoardUp(1).Enabled = False 1337 | 1338 | AddMessage "Connection from " & Telnet.RemoteHostIP 1339 | 1340 | If (Advanced.UseCharTranslation) Then 'Prompt for Terminal Selection 1341 | TelnetSendString 1342 | TelnetSendString "please select terminal type:" 1343 | TelnetSendString 1344 | TelnetSendString "1) ascii (standard telnet, default)" 1345 | TelnetSendString "2) petscii c/g (cgterm, cbmterm, c64)" 1346 | 1347 | WaitingForResponse = True 1348 | 1349 | 'The program now waits for the Telnet caller to send a response character, which will 1350 | 'trigger a call to CompleteConnection(), below. 1351 | Exit Sub 1352 | Else 1353 | CompleteConnection "0" 1354 | Exit Sub 1355 | End If 1356 | 1357 | Exit Sub 1358 | 1359 | RequestError: 1360 | AddMessage "Incoming_ConnectionRequest(): " & Err.Description & " (" & Err.Number & ")" 1361 | Resume Next 1362 | End Sub 1363 | 1364 | Private Sub CompleteConnection(Terminal As String) 1365 | 1366 | On Error GoTo CompleteError: 1367 | 1368 | ' Use cases, for future translation file types, or other options. 1369 | 1370 | Select Case Terminal 1371 | 1372 | Case "0": 'No translation options 1373 | UsingCharTranslation = False 1374 | TelnetSendString "connecting..." 1375 | 1376 | Case "1": 1377 | AddMessage "Caller selected ASCII mode." 1378 | UsingCharTranslation = False 1379 | TelnetSendString 1380 | TelnetSendString "Connecting using ASCII mode." 1381 | 1382 | Case "2": 1383 | AddMessage "Caller selected PETSCII mode." 1384 | UsingCharTranslation = True 1385 | SetupTranslation 1386 | TelnetSendString 1387 | TelnetSendString "cONNECTING USING petscii TRANSLATION..." 1388 | 1389 | Case Else: 1390 | TelnetSendString "unknown response, try again" 1391 | WaitingForResponse = True 1392 | 1393 | 'Abort connection 1394 | Exit Sub 1395 | End Select 1396 | 1397 | 'Call BBS 1398 | ConnectToBBS 1399 | 1400 | 'Remain connected until Disconnect() is called. 1401 | Exit Sub 1402 | 1403 | CompleteError: 1404 | AddMessage "CompleteConnection(): " & Err.Description & " (" & Err.Number & ")" 1405 | Resume Next 1406 | End Sub 1407 | 1408 | Private Sub TelnetSendString(Optional ToSend As String = "", Optional CRLF As Boolean = True, Optional User As Integer = 1) 1409 | On Error GoTo SendstringError: 1410 | 1411 | If (Telnet.State = sckConnected) Then 1412 | Telnet.SendData ToSend 1413 | If (CRLF) Then Telnet.SendData Chr$(13) & Chr$(10) 1414 | End If 1415 | 1416 | Exit Sub 1417 | 1418 | SendstringError: 1419 | AddMessage "TelnetSendString(): " & Err.Description & " (" & Err.Number & ")" 1420 | Resume Next 1421 | End Sub 1422 | 1423 | Private Sub Telnet_Connect() 1424 | If (VirtualModem.OutGoingCall) Then 1425 | If Advanced.DTROutbound Then MSComm.DTREnable = True 1426 | If Advanced.RTSOutbound Then MSComm.RTSEnable = True 1427 | CallConnected 1428 | End If 1429 | End Sub 1430 | 1431 | Private Sub Telnet_DataArrival(ByVal bytestotal As Long) 1432 | 'Data has arrived over Telnet 1433 | 1434 | On Error GoTo TelnetArrivalError: 1435 | 1436 | Dim Received As String 1437 | Dim sResponse As String 'For Telnet IAC responses 1438 | TelnetRX.Tag = 255 ' Full Brightness 1439 | 1440 | ' Receive the data into a string. 1441 | Telnet.GetData Received, vbString, bytestotal 1442 | 1443 | 1444 | 'If an outgoing Telnet call, may have to sort out IAC characters. 1445 | 1446 | If (VirtualModem.OutGoingCall) And (Not FirstCharReceived) Then 1447 | ' This is the first character. Check if it's 255. If so, this is a true Telnet session. 1448 | If Asc(Left$(Received, 1)) = 255 Then 1449 | TrueTelnetMode = True 1450 | End If 1451 | 1452 | FirstCharReceived = True ' Don't check future characters 1453 | End If 1454 | 1455 | 1456 | If (VirtualModem.OutGoingCall And TrueTelnetMode) Then 1457 | 1458 | 'Construct a response if there are any IAC commands 1459 | sResponse = IACResponse(Received) 1460 | 1461 | If (sResponse <> "") Then 1462 | Telnet.SendData sResponse 1463 | DoEvents 1464 | End If 1465 | 1466 | 'Remove all IAC commands 1467 | Received = IACFilter(Received) 1468 | End If 'Outgoing 1469 | 1470 | 'Intercept certain response characters at startup 1471 | If (WaitingForResponse) Then 1472 | WaitingForResponse = False 1473 | CompleteConnection (Mid$(Received, 1, 1)) 1474 | Exit Sub 1475 | End If 1476 | 1477 | 'Echo characters back to Telnet client if required 1478 | If (Advanced.EchoTelnetChars.value) Then Telnet.SendData Received 1479 | 1480 | 'Forward to COM port 1481 | If (ConnectionActive) Then 1482 | If (UsingCharTranslation) Then 1483 | If (MSComm.PortOpen) Then MSComm.Output = TranslateTelnet(Received, bytestotal) 1484 | Else 1485 | If (MSComm.PortOpen) Then MSComm.Output = Received 1486 | End If 1487 | 1488 | SerialTX.Tag = 255 ' Full Brightness 1489 | End If 1490 | 1491 | ' Reset Idle Time 1492 | IdleTime = 0 1493 | Exit Sub 1494 | 1495 | TelnetArrivalError: 1496 | AddMessage "Telnet_DataArrival(): " & Err.Description & " (" & Err.Number & ")" 1497 | Disconnect 'Break connection - could be handled better 1498 | Exit Sub 1499 | End Sub 1500 | 1501 | Private Sub ConnectToBBS() 1502 | 1503 | On Error GoTo ConnectBBSError: 1504 | 1505 | 'Open the port 1506 | If (MSComm.PortOpen = False) Then 1507 | If (Advanced.DetailedDiagnostics.value) Then AddMessage "Opening COM Port" 1508 | MSComm.PortOpen = True 1509 | End If 1510 | 1511 | 'Raise RTS 1512 | If (Advanced.RTSOnConnect.value) Then 1513 | MSComm.RTSEnable = True 1514 | UpdateLEDs 1515 | End If 1516 | 1517 | 'Raise DTR 1518 | If (Advanced.DTROnConnect.value) Then 1519 | MSComm.DTREnable = True 1520 | UpdateLEDs 1521 | End If 1522 | 1523 | 'Send 'RING' 1524 | If (Advanced.SendRing.value) Then 1525 | MSComm.Output = "RING" & vbCrLf 1526 | Else 1527 | 'Send a carriage return to wake BBS up 1528 | MSComm.Output = Chr$(13) 1529 | End If 1530 | 1531 | If (Advanced.PlayWAVonConnect.value) Then 1532 | PlaySoundX Advanced.ConnectionWAV 1533 | End If 1534 | 1535 | If (Advanced.WaitForATA.value) Then 1536 | VirtualModem.WaitingForATA = True 1537 | Else 1538 | ConnectionActive = True 1539 | End If 1540 | 1541 | 'Turn off Command Mode 1542 | VirtualModem.CommandMode = False 1543 | 1544 | DoEvents 1545 | 1546 | Exit Sub 1547 | 1548 | ConnectBBSError: 1549 | AddMessage "ConnectToBBS(): " & Err.Description & " (" & Err.Number & ")" 1550 | Resume Next 1551 | End Sub 1552 | 1553 | Public Sub SerialReset() 1554 | 1555 | On Error GoTo SerialResetError: 1556 | 1557 | ' Set which COM Port is in use. 1558 | If (MSComm.PortOpen) Then MSComm.PortOpen = False 1559 | 1560 | ' New for 1.2a - override the default of 512 bytes for buffer 1561 | MSComm.OutBufferSize = 10000 1562 | SerialBufCountMax = 0 1563 | 1564 | MSComm.CommPort = Val(COMportText.text) 1565 | If (Advanced.DetailedDiagnostics.value) Then AddMessage "Using COM Port " & MSComm.CommPort 1566 | 1567 | ' Originally, 1200 baud, no parity, 8 data, and 1 stop bit. 1568 | MSComm.Settings = Advanced.SerialSetup.text 1569 | 1570 | ' Tell the control to read entire buffer when Input is used. 1571 | MSComm.InputLen = 0 1572 | 1573 | ' Close the serial port 1574 | If (Advanced.EnableHayes) Then 1575 | If (Advanced.DetailedDiagnostics.value) Then AddMessage "Keeping COM Port Open (Hayes Emulation)" 1576 | If (Not MSComm.PortOpen) Then MSComm.PortOpen = True 1577 | Else 1578 | If (Advanced.DetailedDiagnostics.value) Then AddMessage "Closing COM Port" 1579 | If (MSComm.PortOpen) Then MSComm.PortOpen = False 1580 | End If 1581 | 1582 | 'Turn off DTR and RTS 1583 | If (Advanced.LowerRTSonDisconnect) Then 1584 | If (Advanced.DetailedDiagnostics.value) Then AddMessage "Lowering RTS" 1585 | MSComm.RTSEnable = False 1586 | End If 1587 | 1588 | If (Advanced.LowerDTRonDisconnect) Then 1589 | If (Advanced.DetailedDiagnostics.value) Then AddMessage "Lowering DTR" 1590 | MSComm.DTREnable = False 1591 | End If 1592 | 1593 | 'Set receive character threshold to 1 (respond to every character) 1594 | MSComm.RThreshold = 1 1595 | 1596 | 'Optionally, Re-Enable DTR and RTS after a short delay. (Fox) 1597 | If (Advanced.ReEnableDTR.value) Or (Advanced.ReEnableDTR.value) Then 1598 | If (Advanced.DetailedDiagnostics.value) Then AddMessage Advanced.CarrierDropDelayTime.text & " seconds delay" 1599 | DoEvents 1600 | Sleep (Advanced.CarrierDropDelayTime.text * 1000) 1601 | DoEvents 1602 | If (MSComm.PortOpen = False) Then MSComm.PortOpen = True 1603 | AddMessage "Reopening COM" & MSComm.CommPort 1604 | End If 1605 | 1606 | If (Advanced.ReEnableDTR.value) Then 1607 | If (Advanced.DetailedDiagnostics.value) Then AddMessage "Re-enabling DTR" 1608 | If (Advanced.DTROnConnect.value) Then MSComm.DTREnable = True 1609 | End If 1610 | 1611 | If (Advanced.ReEnableRTS.value) Then 1612 | If (Advanced.DetailedDiagnostics.value) Then AddMessage "Re-enabling RTS" 1613 | If (Advanced.RTSOnConnect.value) Then MSComm.RTSEnable = True 1614 | End If 1615 | 1616 | 'Set Hardware Flow Control 1617 | If (VirtualModem.HardwareFlowControl = True) Then 1618 | MSComm.Handshaking = comRTS 1619 | If (Advanced.DetailedDiagnostics) Then AddMessage "Hardware Flow Control enabled." 1620 | Else 1621 | MSComm.Handshaking = comNone 1622 | If (Advanced.DetailedDiagnostics) Then AddMessage "Hardware Flow Control disabled." 1623 | End If 1624 | 1625 | 'New - force RTS 1626 | If (ForceRTS) Then 1627 | MSComm.RTSEnable = True 1628 | AddMessage "RTS forced on (-rts option)." 1629 | End If 1630 | 1631 | UpdateLEDs 1632 | 1633 | Exit Sub 1634 | 1635 | SerialResetError: 1636 | AddMessage "SerialReset(): " & Err.Description & " (" & Err.Number & ")" 1637 | Resume Next 1638 | End Sub 1639 | 1640 | Private Sub Telnet_Error(ByVal Number As Integer, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, CancelDisplay As Boolean) 1641 | AddMessage "Winsock Error " & Number & "-" & Description 1642 | 1643 | Disconnect 'Break connection 1644 | 1645 | If (VirtualModem.OutGoingCall) Then 1646 | If (MSComm.PortOpen And Advanced.SendWinsockErrors.value) Then 1647 | SerialSendString Description 1648 | DoEvents 1649 | End If 1650 | 1651 | OutgoingCallDisconnected 1652 | End If 1653 | End Sub 1654 | 1655 | Private Sub GraphicsTimer_Timer() 1656 | 1657 | ' A fun bit of color showing the data flow. 1658 | ' The Ifs avoid the annoying VB 'flicker' 1659 | Const MIN = 10 1660 | 1661 | On Error GoTo TimerError: 1662 | 1663 | 'Track the buffer size 1664 | Dim SerialBufCountNow As Integer 1665 | SerialBufCountNow = MSComm.OutBufferCount 1666 | If (SerialBufCountNow > SerialBufCountMax) Then SerialBufCountMax = SerialBufCountNow 1667 | OutCount.Caption = "Output Buffer Count: " & SerialBufCountNow & " Maximum: " & SerialBufCountMax 1668 | 1669 | With TelnetRX 1670 | If (Val(.Tag) > MIN) Then 1671 | .Tag = Val(.Tag) * 0.9 1672 | .BackColor = RGB(0, Val(.Tag), 0) 1673 | Else 1674 | .Tag = 0 1675 | End If 1676 | End With 1677 | 1678 | With SerialTX 1679 | If (Val(.Tag) > MIN) Then 1680 | .Tag = Val(.Tag) * 0.9 1681 | .BackColor = RGB(0, Val(.Tag), 0) 1682 | Else 1683 | .Tag = 0 1684 | End If 1685 | End With 1686 | 1687 | With SerialRX 1688 | If (Val(.Tag) > MIN) Then 1689 | .Tag = Val(.Tag) * 0.9 1690 | .BackColor = RGB(Val(.Tag), 0, 0) 1691 | Else 1692 | .Tag = 0 1693 | End If 1694 | End With 1695 | 1696 | With TelnetTX 1697 | If (Val(.Tag) > MIN) Then 1698 | .Tag = Val(.Tag) * 0.9 1699 | .BackColor = RGB(Val(.Tag), 0, 0) 1700 | Else 1701 | .Tag = 0 1702 | End If 1703 | End With 1704 | 1705 | Exit Sub 1706 | 1707 | TimerError: 1708 | AddMessage "Timer(): " & Err.Description & " (" & Err.Number & ")" 1709 | Resume Next 1710 | End Sub 1711 | 1712 | 'Disconnects - Closes Telnet Port, Resets Serial Port, Clears ConnectionActive and other flag 1713 | Public Sub Disconnect() 1714 | 1715 | On Error GoTo DisconnectError: 1716 | 1717 | If (MSComm.PortOpen) And (Advanced.SendCtrlC.value) Then 1718 | If (Advanced.DetailedDiagnostics.value) Then AddMessage "Sending CTRL-C to BBS before Disconnect" 1719 | MSComm.Output = Chr$(3) 1720 | DoEvents 1721 | End If 1722 | 1723 | 'Set internal connection state to false 1724 | ConnectionActive = False 1725 | 1726 | 'Clear flag for waiting for characters 1727 | WaitingForResponse = False 1728 | 1729 | 'Reset COM Port 1730 | SerialReset 1731 | 1732 | 'Close Telnet session 1733 | Telnet.Close 1734 | 1735 | 'Give a Beep 1736 | If (Advanced.PlayWAVonDisconnect.value) And (Not ProgramShutDown) And (Not VirtualModem.OutGoingCall) Then 1737 | PlaySoundX Advanced.DisconnectWAV 1738 | End If 1739 | 1740 | 'Optionally, stay off-hook for a few more seconds to give BBS time to reinitialize 1741 | If (Not VirtualModem.OutGoingCall) And (Advanced.StayOffHook.value) Then 1742 | VirtualModem.OffHook = True 1743 | ShowOffHookState 1744 | AddMessage "Staying off hook for " & Val(Advanced.StayOffHookTime.text) & " seconds" 1745 | TelnetBBS.Refresh 1746 | DoEvents 1747 | OffHookTimer.Interval = Val(Advanced.StayOffHookTime.text) * 1000 'milliseconds 1748 | OffHookTimer.Enabled = True 1749 | Else 1750 | CompleteDisconnect 1751 | End If 1752 | 1753 | 'Disconnect sequence continues in CompleteDisconnect(), below. 1754 | 1755 | Exit Sub 1756 | 1757 | DisconnectError: 1758 | AddMessage "Disconnect(): " & Err.Description & " (" & Err.Number & ")" 1759 | Exit Sub 1760 | 1761 | End Sub 1762 | 1763 | Public Sub CompleteDisconnect() 1764 | 1765 | On Error Resume Next 1766 | 1767 | 'Reset Telnet Server for the Next Caller. 1768 | Telnet.LocalPort = 0 1769 | Telnet.Listen 1770 | 1771 | 'Show new status. If BBS was 'down', it stays down. 1772 | If (BoardUp(0).value = True) Then 1773 | ShowWaitingState 1774 | Else 1775 | ShowOfflineState 1776 | End If 1777 | 1778 | 'Not in Hayes Command mode. 1779 | VirtualModem.CommandMode = False 1780 | 1781 | 'We have not received any characters. 1782 | FirstCharReceived = False 1783 | 1784 | 'We don't know what Telnet mode is next, so set to False 1785 | TrueTelnetMode = False 1786 | 1787 | 'Allow BBS to be taken down. 1788 | BoardUp(1).Enabled = True 1789 | 1790 | Exit Sub 1791 | 1792 | CompleteDisconnectError: 1793 | AddMessage "CompleteDisconnect(): " & Err.Description & " (" & Err.Number & ")" 1794 | Exit Sub 1795 | End Sub 1796 | 1797 | 1798 | Private Function MinsSecs(Seconds As Long) As String 1799 | Dim temp1 As Long 1800 | Dim temp2 As Long 1801 | 1802 | temp1 = Fix(Seconds / 60) 1803 | temp2 = Seconds - (temp1 * 60) 1804 | 1805 | MinsSecs = temp1 & ":" & Format(temp2, "00") 1806 | End Function 1807 | 1808 | Public Sub ShowWaitingState() 1809 | BBSState.Caption = "WAITING" 1810 | BBSState.BackColor = vbYellow 1811 | TelnetBBS.Icon = WaitingIcon.Picture 1812 | RefreshTrayIcon "Waiting for Call" 1813 | ForceDisconnect.Visible = False 1814 | End Sub 1815 | 1816 | Private Sub ShowOnlineState(text As String) 1817 | BBSState.Caption = "ONLINE" 1818 | BBSState.BackColor = vbGreen 1819 | TelnetBBS.Icon = OnlineIcon.Picture 1820 | RefreshTrayIcon text 1821 | ForceDisconnect.Visible = True 1822 | End Sub 1823 | 1824 | Public Sub ShowOfflineState() 1825 | BBSState.Caption = "OFFLINE" 1826 | BBSState.BackColor = vbRed 1827 | TelnetBBS.Icon = OfflineIcon.Picture 1828 | RefreshTrayIcon "BBS is down!" 1829 | ForceDisconnect.Visible = False 1830 | End Sub 1831 | 1832 | Public Sub ShowOutgoingState() 1833 | BBSState.Caption = "OUTGOING" 1834 | BBSState.BackColor = vbCyan 1835 | TelnetBBS.Icon = OnlineIcon.Picture 1836 | RefreshTrayIcon "Outgoing call in progress" 1837 | ForceDisconnect.Visible = False 1838 | End Sub 1839 | 1840 | Public Sub ShowOffHookState() 1841 | BBSState.Caption = "OFF HOOK" 1842 | BBSState.BackColor = RGB(255, 100, 100) 1843 | TelnetBBS.Icon = OfflineIcon.Picture 1844 | RefreshTrayIcon "BBS is off the hook" 1845 | ForceDisconnect.Visible = False 1846 | End Sub 1847 | 1848 | 'Handle events on the System Tray Icon 1849 | Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) 1850 | On Error Resume Next 1851 | Dim Result As Long 1852 | Dim msg As Long 1853 | 1854 | If Me.ScaleMode = vbPixels Then 1855 | msg = X 1856 | Else 1857 | msg = X / Screen.TwipsPerPixelX 1858 | End If 1859 | 1860 | 'This was in the original code, but we don't need it. Kept for future. 1861 | 'If msg = 517 Then 1862 | 'Me.PopupMenu mnu_file 1863 | 'Else 1864 | 1865 | If (msg = DOUBLECLICK) Then 'Double-clicked on Icon 1866 | Me.Show 1867 | End If 1868 | End Sub 1869 | 1870 | Private Sub RefreshTrayIcon(text As String) 1871 | If (Not ProgramShutDown) Then 1872 | DeleteIcon Me 1873 | CreateIcon Me, Me.Caption & " - " & text 1874 | End If 1875 | End Sub 1876 | 1877 | 'Update the serial activity LEDs 1878 | Private Sub UpdateLEDs() 1879 | 'Serial Inputs 1880 | SerialDCD.BackColor = Abs(vbRed * MSComm.CDHolding) 1881 | SerialDSR.BackColor = Abs(vbRed * MSComm.DSRHolding) 1882 | SerialCTS.BackColor = Abs(vbRed * MSComm.CTSHolding) 1883 | 1884 | 'Serial Outputs 1885 | SerialDTR.BackColor = Abs(vbGreen * MSComm.DTREnable) 1886 | 1887 | If (MSComm.Handshaking = comRTS) Then 1888 | SerialRTS.BackColor = RGB(0, 200, 0) 1889 | Else 1890 | SerialRTS.BackColor = Abs(vbGreen * MSComm.RTSEnable) 1891 | End If 1892 | End Sub 1893 | 1894 | Private Sub SendBusyText(Index As Integer) 1895 | 1896 | On Error GoTo NoFile: 1897 | 1898 | Dim temp As String 1899 | 1900 | Close #5 1901 | Open "busy.txt" For Input As #5 1902 | 1903 | While Not EOF(5) 1904 | Line Input #5, temp 1905 | Incoming(Index).SendData temp & Chr$(13) & Chr$(10) 1906 | DoEvents 1907 | Wend 1908 | 1909 | Close #5 1910 | Exit Sub 1911 | 1912 | NoFile: 1913 | Exit Sub ' No need for error msg 1914 | End Sub 1915 | 1916 | -------------------------------------------------------------------------------- /Source/telnet.frx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LeifBloomquist/BBSServer/ba913455f262aa632201e302ead52afa4bee333e/Source/telnet.frx --------------------------------------------------------------------------------