• VB.Net - read Xtrn.dat

    From Boondock@VERT/ELGATO to All on Sat Feb 27 23:22:43 2021
    There isn't a board for VB.net, so I hope this is appropriate.
    I've written a subroutine to read the XTRN.DAT file, ported from something od Digital Man's. I'd appreciate someone casting an eye over it and giving any advice/criticism as appropriate. There were some things I didn't quite *get* but I think I have most of it.

    Much appreciated

    -+- Start Code ---

    '/****************************************************************************/ '/* Reads data from XTRN.DAT in the node directory And fills the appropriate */ '/* global variables.*/
    '/* Initializes starttime variable with current time.*/ '/****************************************************************************/ ' Ported from Digital Man's xsdk.c
    ' by BoonDock (John Dovey) <dovey.john@gmail.com>
    ' BoonDock@Vert/Elgato
    ' gatofuego.synchronetbbs.org

    Dim xuser_name As String
    Dim xsys_name As String
    Dim xsys_op As String
    Dim xsys_guru As String
    Dim xctrl_dir As String
    Dim xdata_dir As String
    Dim xsys_nodes As Integer
    Dim xnode_num As Integer
    Dim xtimeleft As Integer
    Dim xuser_misc As String
    Dim xuser_rows As Integer
    Dim xuser_cdt As Integer
    Dim xuser_level As Integer
    Dim xtransfer_level As String
    Dim xuser_birth As String
    Dim xuser_sex As String
    Dim xuser_number As Integer
    Dim xuser_phone As String
    Dim xcom_port As Integer
    Dim xcom_irq As Integer
    Dim xcom_base As String
    Dim xcom_rate As ULong
    Dim xmdm_misc As String
    Const MDM_FLOWCTRL = 1 << 0 ' /* Use flow control With modem*/
    Const MDM_STAYHIGH = 1 << 1 ' /* Stay at highest DTE rate */ Dim xmdm_init As String
    Dim xmdm_spec As String
    Dim xmdm_term As String
    Dim xmdm_dial As String
    Dim xmdm_offh As String
    Dim xmdm_answ As String
    Dim xmsr As ULong
    Dim xtotal_xtrns As Integer
    Dim xuser_flags1 As String
    Dim xuser_flags2 As String
    Dim xuser_exempt As String
    Dim xuser_rest As String
    Dim xuser_expire As Long
    Dim xuser_address As String
    Dim xuser_location As String
    Dim xuser_postcode As String
    Dim xuser_flags3 As String
    Dim xuser_flags4 As String
    Dim xTime_Slice As String
    Dim xuser_realname As String
    Dim xuser_dce As Long
    Dim xexec_dir As String
    Dim xtext_dir As String
    Dim xtemp_dir As String
    Dim xsys_id As String
    Dim xnode_misc As Long
    Dim xclient_socket As Integer
    Sub InitData()
    Dim i As Integer

    Dim Node_Dir As String
    'Node_Dir = "/users/john/source/repos/smc"
    Node_Dir = Environ("SBBSNODE") '/* Sets node_dir to node directory environment variable defined by synchronet. */
    If Node_Dir.Length < 2 Then Node_Dir = "."
    Dim Xtrn As String
    Xtrn = Node_Dir & "/" & "XTRN.DAT"

    Dim Str As String() = File.ReadAllLines(Xtrn)

    xuser_name = Trim(Left(Str(0), 25)) ' /* username */
    xsys_name = Trim(Left(Str(1), 40)) ' /* system name */
    xsys_op = Trim(Left(Str(2), 40)) ' /* system operator */
    xsys_guru = Trim(Left(Str(3), 40)) ' /* system guru */
    xctrl_dir = Trim(Left(Str(4), 40)) ' /* ctrl dir */
    If xctrl_dir(0) = "." Then
    xctrl_dir = Node_Dir & "/" & xctrl_dir
    End If
    xdata_dir = Trim(Left(Str(5), 40)) ' /* data dir */
    If xdata_dir(0) = "." Then
    xdata_dir = Node_Dir & "/" & xdata_dir
    End If
    xsys_nodes = Val(Trim(Str(6))) ' /* total nodes */
    xnode_num = Val(Trim(Str(7))) ' /* current node */
    xtimeleft = Val(Trim(Str(8))) ' /* time left */
    xuser_misc = Trim(Str(9)) ' /* ANSI? (Yes, Mono, Or No) */
    If xuser_misc(0) = "Y" Then
    xuser_misc = "ANSI|COLOR"
    ElseIf xuser_misc(0) = "M" Then
    xuser_misc = "ANSI"
    End If
    xuser_rows = Val(Trim(Str(10))) ' /* screen lines */
    xuser_cdt = Val(Trim(Str(11))) ' /* credits */
    xuser_level = Val(Trim(Str(12))) ' /* level */
    xtransfer_level = Trim(Str(13)) ' /* was transfer level, left For compat. */
    xuser_birth = Trim(Left(Str(14), 10)) ' /* birthdate */
    xuser_sex = Trim(Str(15)) ' /* sex */
    'user_sex =str[0];
    xuser_number = Val((Trim(Str(16)))) ' /* user number */
    xuser_phone = Trim(Left(Str(17), 12)) ' /* user phone number */
    xcom_port = Val(Trim(Str(18))) ' /* com port (0 If local Or no modem) */
    xcom_irq = Val(Trim(Str(19))) ' /* com (UART) irq */
    xcom_base = Trim(Str(20)) ' /* com (UART) base address In hex */
    xcom_rate = Val(Trim(Str(21))) ' /* com rate */
    xmdm_misc = Trim(Str(22)) ' /* hardware flow control (Y/N) */ If UCase(xmdm_misc(0)) = "Y" Then
    xmdm_misc = MDM_FLOWCTRL
    End If
    If UCase(Trim(Str(23))(0)) = "Y" Then ' /* locked DTE rate (Y/N) */ xmdm_misc = MDM_STAYHIGH
    End If
    xmdm_init = Trim(Left(Str(24), 63)) ' /* modem initialization String */ xmdm_spec = Trim(Left(Str(25), 63)) ' /* modem special init String */ xmdm_term = Trim(Left(Str(26), 63)) ' /* modem terminal mode String */ xmdm_dial = Trim(Left(Str(27), 63)) ' /* modem dial String */
    xmdm_offh = Trim(Left(Str(28), 63)) ' /* modem off-hook String */ xmdm_answ = Trim(Left(Str(29), 63)) ' /* modem answer String */
    xmsr = Val(Trim(Str(30))) ' /* memory address Of modem status register */
    xtotal_xtrns = Val(Trim(Str(31))) ' If (!fgets(Str, 81, Stream)) /* total Then Number Of external programs */
    If xtotal_xtrns < 1 Or xtotal_xtrns = vbNull Then xtotal_xtrns = 0
    Dim y As Integer = Val(xtotal_xtrns) - 1
    Dim xprog_xtns(y) As String
    For x As Integer = 0 To y
    xprog_xtns(x) = Trim(Str(32 + x))
    Next

    i = xtotal_xtrns + 31 ' Continue on after the random number of Xternal Programs

    xuser_flags1 = Trim(Left(Str(i + 1), 26)) ' /* user's main flags */ xuser_flags2 = Trim(Left(Str(i + 2), 26)) ' /* user's xfer flags */ xuser_exempt = Trim(Left(Str(i + 3), 26)) ' /* user's exemptions */ xuser_rest = Trim(Left(Str(i + 4), 26)) ' /* user's restrictions */ xuser_expire = Val(Trim(Str(i + 5))) ' /* user's expiration date */ xuser_address = Trim(Left(Str(i + 6), 30)) ' /* user's address */ xuser_location = Trim(Left(Str(i + 7), 30)) ' /* user's location (city, state) */
    xuser_postcode = Trim(Left(Str(i + 8), 10)) ' /* user's zip/postal code */ xuser_flags3 = Trim(Left(Str(i + 9), 26)) ' Flags 3
    xuser_flags4 = Trim(Left(Str(i + 10), 26)) ' Flgs 4

    xTime_Slice = Trim(Str(i + 11)) ' If (fgets(Str, 81, Stream)) /* Time - slice Then API Type */
    xuser_realname = Trim(Left(Str(i + 12), 25)) ' Real Name
    xuser_dce = Val(Trim(Str(i + 13))) ' DCE
    xexec_dir = Trim(Str(i + 14)) ' /* exec dir */

    'If (!str[0])
    'sprintf(exec_dir, "%s../exec/", ctrl_dir);
    'Else {
    If xexec_dir(0) = "." Then
    xexec_dir = Node_Dir & "/" & xexec_dir
    End If
    xtext_dir = Trim(Str(i + 15)) ' /* text dir */
    'If (!str[0])
    'sprintf(text_dir, "%s../text/", ctrl_dir);
    'Else {
    If xtext_dir(0) = "." Then
    xtext_dir = Node_Dir & "/" & xtext_dir
    End If
    xtemp_dir = Trim(Left(Str(i + 16), 50)) ' /* temp dir */
    If xtemp_dir.Length < 2 Then
    xtemp_dir = Node_Dir & "/temp/"
    End If
    If (xtemp_dir(0) <> "/" Or xtemp_dir(0) <> "\") And xtemp_dir(1) <> ":" Then xtemp_dir = Node_Dir & "/temp"
    End If

    xsys_id = Trim(Left(Str(i + 17), 8)) ' System ID
    xnode_misc = Val(Trim(Str(i + 18))) ' Misc
    'If (Str[0])
    'node_misc = (uint)ahtoul(str);
    'Else
    'node_misc = NM_LOWPRIO;
    xclient_socket = Val(Trim(Str(i + 19))) ' Socket

    'Test
    Console.WriteLine("User Name: {0}", xuser_name)
    Console.WriteLine("xsys_name: {0}", xsys_name)
    Console.WriteLine("xsys_op: {0}", xsys_op)
    Console.WriteLine("xsys_guru: {0}", xsys_guru)
    Console.WriteLine("xctrl_dir: {0}", xctrl_dir)
    Console.WriteLine("xdata_dir: {0}", xdata_dir)
    Console.WriteLine("xsys_nodes: {0}", xsys_nodes)
    Console.WriteLine("xnode_num: {0}", xnode_num)
    Console.WriteLine("xtimeleft: {0}", xtimeleft)
    Console.WriteLine("xuser_misc: {0}", xuser_misc)
    Console.WriteLine("xuser_rows: {0}", xuser_rows)
    Console.WriteLine("xuser_cdt: {0}", xuser_cdt)
    Console.WriteLine("xuser_level: {0}", xuser_level) Console.WriteLine("xtransfer_level: {0}", xtransfer_level) Console.WriteLine("xuser_birth: {0}", xuser_birth) Console.WriteLine("xuser_sex: {0}", xuser_sex)
    Console.WriteLine("xuser_number: {0}", xuser_number) Console.WriteLine("xuser_phone: {0}", xuser_phone) Console.WriteLine("xcom_port: {0}", xcom_port)
    Console.WriteLine("xcom_irq: {0}", xcom_irq)
    Console.WriteLine("xcom_base: {0}", xcom_base)
    Console.WriteLine("xcom_rate: {0}", xcom_rate)
    Console.WriteLine("xmdm_misc: {0}", xmdm_misc)
    Console.WriteLine("xmdm_init: {0}", xmdm_init)
    Console.WriteLine("xmdm_spec: {0}", xmdm_spec)
    Console.WriteLine("xmdm_term: {0}", xmdm_term)
    Console.WriteLine("xmdm_dial: {0}", xmdm_dial)
    Console.WriteLine("xmdm_offh: {0}", xmdm_offh)
    Console.WriteLine("xmdm_answ: {0}", xmdm_answ)
    Console.WriteLine("xmsr: {0}", xmsr)
    Console.WriteLine("xtotal_xtrns: {0}", xtotal_xtrns)
    For x = 0 To xtotal_xtrns - 1
    Console.WriteLine("xprog_xtns [{1}]: {0}", xprog_xtns(x), x)
    Next
    Console.WriteLine("xuser_flags1: {0}", xuser_flags1) Console.WriteLine("xuser_flags2: {0}", xuser_flags2) Console.WriteLine("xuser_exempt: {0}", xuser_exempt) Console.WriteLine("xuser_rest: {0}", xuser_rest) Console.WriteLine("xuser_expire: {0}", xuser_expire) Console.WriteLine("xuser_address: {0}", xuser_address) Console.WriteLine("xuser_location: {0}", xuser_location) Console.WriteLine("xuser_postcode: {0}", xuser_postcode) Console.WriteLine("xuser_flags3: {0}", xuser_flags3) Console.WriteLine("xuser_flags4: {0}", xuser_flags4) Console.WriteLine("xTime_Slice: {0}", xTime_Slice) Console.WriteLine("xuser_realname: {0}", xuser_realname) Console.WriteLine("xuser_dce: {0}", xuser_dce)
    Console.WriteLine("xexec_dir: {0}", xexec_dir)
    Console.WriteLine("xtext_dir: {0}", xtext_dir)
    Console.WriteLine("xtemp_dir: {0}", xtemp_dir)
    Console.WriteLine("xsys_id: {0}", xsys_id)
    Console.WriteLine("xnode_misc: {0}", xnode_misc) Console.WriteLine("xclient_socket: {0}", xclient_socket)
    End Sub

    Boondock

    BoonDock
    Pedasi/Panama


    ... The writer does the most who gives the reader the most

    ---
    þ Synchronet þ Sent from El Gato de Fuego * The Fire Cat * elgato.synchronetbbs.org
  • From Digital Man@VERT to Boondock on Sat Feb 27 18:49:40 2021
    Re: VB.Net - read Xtrn.dat
    By: Boondock to All on Sat Feb 27 2021 11:22 pm

    There isn't a board for VB.net, so I hope this is appropriate.
    I've written a subroutine to read the XTRN.DAT file, ported from something od Digital Man's. I'd appreciate someone casting an eye over it and giving any advice/criticism as appropriate. There were some things I didn't quite *get* but I think I have most of it.

    Sorry, I didn't analyze your code. But main question would be: why?

    If you're writing a door game (or a door dev kit), it would make more sense to support more wide-spread drop file formats (e.g. door.sys). xtrn.dat isn't used by any current/new door development (mainly because most Synchronet add-ons are in-process JavaScript and don't need a drop file) - but if I were to be writing a native door program today, I'd try to use a more widely supported drop file format.
    --
    digital man

    Sling Blade quote #26:
    Karl: kaiser blade, ax handle with long blade on it shaped kinda like a banana. Norco, CA WX: 59.8øF, 47.0% humidity, 3 mph ESE wind, 0.00 inches rain/24hrs ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Boondock@VERT/ELGATO to Digital Man on Sun Feb 28 13:36:07 2021
    Re: VB.Net - read Xtrn.dat
    By: Digital Man to Boondock on Sat Feb 27 2021 18:49:40



    Because I can :-)
    Sorry, I didn't analyze your code. But main question would be: why?
    sense to support more wide-spread drop file formats (e.g. door.sys). xtrn.
    Sure. Figured I wanted to do a few of them, but would start with what semed to be native to Synchronet.

    Boondock

    BoonDock
    Pedasi/Panama


    ... Typographers rule, OQ

    ---
    þ Synchronet þ Sent from El Gato de Fuego * The Fire Cat * elgato.synchronetbbs.org
  • From Boondock@VERT/ELGATO to Digital Man on Sun Feb 28 13:49:09 2021
    Re: VB.Net - read Xtrn.dat
    By: Boondock to Digital Man on Sun Feb 28 2021 13:36:07

    Sorry, I was a little abrupt in my first answer.
    I'm sure you've noticed, I've updated the wiki with information on marious door drop files. I started out collecting information, figuring all the bits and pieces out, then wrote a subroutine to test my understanding of how it all works. I chose xtrn.dat as I thought it was native to Synchronet, and so I would do it first.
    I fully intend to do some of the others, yes first Door.sys, and maybe even PCBOARD.DAT (because it looks like more of a challenge).

    As to the Javascript development.. I think it's great, but not something i'm interested it. I was very happy to see I could get a VB.Net compiled console app to run natively on both the windows and linux versions and that it handled the screen output with no problems (I'm still a bit puzzled why it displayed in Black and White on windows and in colour on Linux).

    Being able to use a .Net app means I can use it to do a variety of things with the BBS taking care of the user management and connection etc. I can use Databases, for example, and various other things.



    Boondock

    BoonDock
    Pedasi/Panama


    ... Love is like war: easy to begin, but very hard to stop.

    ---
    þ Synchronet þ Sent from El Gato de Fuego * The Fire Cat * elgato.synchronetbbs.org
  • From Boondock@VERT/ELGATO to Digital Man on Sun Feb 28 16:39:44 2021
    Re: VB.Net - read Xtrn.dat
    By: Digital Man to Boondock on Sat Feb 27 2021 18:49:40

    sense to support more wide-spread drop file formats (e.g. door.sys). xtrn.
    Here is the door.sys

    Imports System.IO
    Module GetDoors

    ' /****************************************************************************/
    ' /* Reads data from DOOR.SYS in the node directory And fills the appropriate */
    ' /* global variables.*/
    ' /****************************************************************************/
    ' by BoonDock (John Dovey) <dovey.john@gmail.com>
    ' BoonDock@Vert/Elgato
    ' gatofuego.synchronetbbs.org
    ' xtrn.dat fields
    Dim xuser_name As String
    Dim xsys_name As String
    Dim xsys_op As String
    Dim xsys_guru As String
    Dim xctrl_dir As String
    Dim xdata_dir As String
    Dim xsys_nodes As Integer
    Dim xnode_num As Integer
    Dim xtimeleft As Integer
    Dim xuser_misc As String
    Dim xuser_rows As Integer
    Dim xuser_cdt As Integer
    Dim xuser_level As Integer
    Dim xtransfer_level As String
    Dim xuser_birth As String
    Dim xuser_sex As String
    Dim xuser_number As Integer
    Dim xuser_phone As String
    'Dim xcom_port As Integer
    Dim xcom_port As String ' Make it a string to handle difference between door drop files. eg 0 or COM0
    Dim xcom_irq As Integer
    Dim xcom_base As String
    Dim xcom_rate As ULong
    Dim xmdm_misc As String
    'Const MDM_FLOWCTRL = 1 << 0 ' ' /* Use flow control With modem*/
    'Const MDM_STAYHIGH = 1 << 1 ' ' /* Stay at highest DTE rate */
    Dim xmdm_init As String
    Dim xmdm_spec As String
    Dim xmdm_term As String
    Dim xmdm_dial As String
    Dim xmdm_offh As String
    Dim xmdm_answ As String
    Dim xmsr As ULong
    Dim xtotal_xtrns As Integer
    Dim xuser_flags1 As String
    Dim xuser_flags2 As String
    Dim xuser_exempt As String
    Dim xuser_rest As String
    Dim xuser_expire As Long
    Dim xuser_address As String
    Dim xuser_location As String
    Dim xuser_postcode As String
    Dim xuser_flags3 As String
    Dim xuser_flags4 As String
    Dim xTime_Slice As String
    Dim xuser_realname As String
    Dim xuser_dce As Long
    Dim xexec_dir As String
    Dim xtext_dir As String
    Dim xtemp_dir As String
    Dim xsys_id As String
    Dim xnode_misc As Long
    Dim xclient_socket As Integer

    ' Door.sys Additional Fields
    Dim xcom_parity As String
    Dim xcom_19200 As String ' Boolean Y/N
    Dim xuser_screen_display As String ' Boolean Y/N
    Dim xuser_printer_toggle As String = "Y" ' Printer Toggle - Y=On N=Off(Default To Y)
    Dim xuser_page_bell As String = "Y" ' Page Bell - Y=On N=Off(Default to Y)
    Dim xuser_caller_alarm As String
    Dim xuser_phone_work As String ' Work/Data Phone
    Dim xuser_password As String
    Dim xuser_total_logins As Integer
    Dim xuser_last_date As String
    Dim xuser_seconds_remain As Integer
    Dim xuser_minutes_remain As Integer
    Dim xuser_graphics_mode As String
    Dim xuser_mode As String = "Y" ' User Mode - Y = Expert, N = Novice
    Dim xuser_conf As String ' Conferences/Forums Registered In(ABCDEFG)
    Dim xuser_conf_from As String
    Dim xuser_protocol As String = "Z" ' Default Protocol - X, C, Y, G, I, N, Etc.
    Dim xuser_total_uploads As Integer ' Total Uploads
    Dim xuser_total_downloads As Integer ' Total Downloads
    Dim xuser_daily_Down_Ktotal As Integer ' Daily Download "K" Total
    Dim xuser_daily_Down_maxKlimit As Integer ' Daily Download Max. "K" Limit
    Sub getDoorDoorSys()
    Dim i As Integer

    Dim Node_Dir As String
    Node_Dir = "/sbbs/node1"
    'Node_Dir = Environ("SBBSNODE") ' /* Sets node_dir to node directory environment variable defined by synchronet. */
    If Node_Dir.Length < 2 Then Node_Dir = "."
    Dim Xtrn As String
    Xtrn = Node_Dir & "/" & "Door.sys"
    Dim Str As String()
    Try
    Str = File.ReadAllLines(Xtrn)
    Catch ex As System.IO.FileNotFoundException
    Console.WriteLine(ex.Message)
    Exit Sub
    Catch ex As Exception
    Console.WriteLine(ex.Message)
    Exit Sub
    End Try


    xcom_port = Trim(Str(0)) ' COM1: or COM0: if local mode xcom_rate = Val(Trim(Str(1))) ' BAUD rate - 300 - 38400 xcom_parity = Val(Str(2)) ' 7 or 8
    xnode_num = Val(Str(3)) ' Current Node Number(Default to 1) xcom_19200 = Trim(Str(4)) ' 19200 Flag - Host/Modem LOCKED at 19200(Default to N)
    xuser_screen_display = Trim(Str(5)) ' Screen Display - Y=On N=Off(Default to Y)
    xuser_printer_toggle = Trim(Str(6)) ' Printer Toggle - Y=On N=Off(Default to Y)
    xuser_page_bell = Trim(Str(7)) ' Page Bell - Y=On N=Off(Default to Y)
    xuser_caller_alarm = Trim(Str(8)) ' Caller Alarm - Y=On N=Off(Default to Y)
    xuser_name = Trim(Str(9)) ' User Full Name (Can be whole line)
    xuser_location = Trim(Str(10)) ' User's location (city, state) (Calling From)
    xuser_phone = Trim(Str(11)) ' Home Phone (take 20 characters to accomodate international codes etc)
    xuser_phone_work = Trim(Str(12)) ' Work/Data Phone
    xuser_password = Trim(Str(13)) ' Password
    xuser_level = Val(Trim(Str(14))) ' Security Level xuser_total_logins = Val(Str(15)) ' Total Logins/Times on xuser_last_date = Trim(Str(16)) ' Last Date Called
    xuser_seconds_remain = Val(Str(17)) ' Seconds Remaining THIS call xuser_minutes_remain = Val(Str(18)) ' Minutes Remaining THIS call xuser_graphics_mode = Trim(Str(19)) ' Graphics Mode - GR=Graph, NG=Non-Graph, 7E=7,E Caller
    xuser_rows = Val(Trim(Str(20))) ' Page Length
    xuser_mode = Trim(Str(21)) ' User Mode - Y = Expert, N = Novice xuser_conf = Trim(Str(22)) ' Conferences/Forums Registered In(ABCDEFG)
    xuser_conf_from = Trim(Str(23)) ' Conference Exited To DOOR From(G) xuser_expire = Val(Trim(Str(24))) ' User Expiration Date xuser_number = Val((Trim(Str(25)))) ' User File's Record Number xuser_protocol = Trim(Str(26)) ' Default Protocol - X, C, Y, G, I, N, Etc.
    xuser_total_uploads = Val(Trim(Str(27))) ' Total Uploads xuser_total_downloads = Val(Trim(Str(28))) ' Total Downloads xuser_daily_Down_Ktotal = Val(Trim(Str(29))) ' Daily Download "K" Total xuser_daily_Down_maxKlimit = Val(Trim(Str(30))) ' Daily Download Max. "K" Limit

    'Test
    Console.WriteLine("User Name: {0}", xuser_name)
    Console.WriteLine("xcom_port: {0}", xcom_port)
    Console.WriteLine("xcom_rate: {0}", xcom_rate)
    Console.WriteLine("xcom_parity: {0}", xcom_parity) Console.WriteLine("xnode_num: {0}", xnode_num)
    Console.WriteLine("xcom_19200: {0}", xcom_19200) Console.WriteLine("xuser_screen_display: {0}", xuser_screen_display) Console.WriteLine("xuser_printer_toggle: {0}", xuser_printer_toggle) Console.WriteLine("xuser_page_bell: {0}", xuser_page_bell) Console.WriteLine("xuser_caller_alarm: {0}", xuser_caller_alarm) Console.WriteLine("xuser_name: {0}", xuser_name) Console.WriteLine("xuser_location: {0}", xuser_location) Console.WriteLine("xuser_phone: {0}", xuser_phone) Console.WriteLine("xuser_phone_work: {0}", xuser_phone_work) Console.WriteLine("xuser_password: {0}", xuser_password) Console.WriteLine("xuser_level: {0}", xuser_level) Console.WriteLine("xuser_total_logins: {0}", xuser_total_logins) Console.WriteLine("xuser_last_date: {0}", xuser_last_date) Console.WriteLine("xuser_seconds_remain: {0}", xuser_seconds_remain) Console.WriteLine("xuser_minutes_remain: {0}", xuser_minutes_remain) Console.WriteLine("xuser_graphics_mode: {0}", xuser_graphics_mode) Console.WriteLine("xuser_rows: {0}", xuser_rows)
    Console.WriteLine("xuser_mode: {0}", xuser_mode)
    Console.WriteLine("xuser_conf: {0}", xuser_conf) Console.WriteLine("xuser_conf_from: {0}", xuser_conf_from) Console.WriteLine("xuser_expire: {0}", xuser_expire) Console.WriteLine("xuser_number: {0}", xuser_number) Console.WriteLine("xuser_protocol: {0}", xuser_protocol) Console.WriteLine("xuser_total_uploads: {0}", xuser_total_uploads) Console.WriteLine("xuser_total_downloads: {0}", xuser_total_downloads) Console.WriteLine("xuser_daily_Down_Ktotal: {0}", xuser_daily_Down_Ktotal) Console.WriteLine("xuser_daily_Down_maxKlimit: {0}", xuser_daily_Down_maxKlimit)
    End Sub
    End Module

    Boondock

    BoonDock
    Pedasi/Panama


    ... Universal suffrage is the government of a house by its nursery.

    ---
    þ Synchronet þ Sent from El Gato de Fuego * The Fire Cat * elgato.synchronetbbs.org
  • From Tracker1@VERT/TRN to Boondock on Sun Feb 28 19:00:52 2021
    On 2/28/2021 10:49 AM, Boondock wrote:

    Being able to use a .Net app means I can use it to
    do a variety of things with the BBS taking care of
    the user management and connection etc. I can use
    Databases, for example, and various other things.

    Are you using .Net Core or .Net 5 by chance?

    .Net Console apps from windows have some rather
    interesting issues from what I recall... having to
    change the input mode from line based, to single
    character regardless of the input command, etc.

    I also found it was easier to write a C shim to
    be able to use a Socket handle directly (door32).
    But it's been since roughly 2004 since I last even
    tried.

    With .Net Core, console apps should be more terminal
    friendly. For sync, you can just use the standard
    i/o option. Not sure what other BBS softwares being
    worked on support now.

    I would suggest installing the new Windows Terminal
    from the windows store, if you have a recent version
    of windows 10 installed. Since they now have psuedo-
    terminal (pty) support, and it can be better for
    working against. Not to mention ansi color code
    support, though that's also in the regular terminal
    for win10 as of 1904 iirc.
    --
    Michael J. Ryan - tracker1@roughneckbbs.com
    ---
    þ Synchronet þ Roughneck BBS - roughneckbbs.com
  • From Boondock@VERT/ELGATO to Tracker1 on Mon Mar 1 05:27:22 2021
    Re: Re: VB.Net - read Xtrn.dat
    By: Tracker1 to Boondock on Sun Feb 28 2021 19:00:52

    Are you using .Net Core or .Net 5 by chance?
    Actually, no. .net framework 4.8.
    Compiling with the mono compiler puts me back a little. All stills works though.

    I also found it was easier to write a C shim to
    be able to use a Socket handle directly (door32).

    Haven't been able to test the modem functionality as I haven't owned a modem in years... only the telnet/Rlogin/SSH

    I would suggest installing the new Windows Terminal
    from the windows store, if you have a recent version
    of windows 10 installed. Since they now have psuedo-
    terminal (pty) support, and it can be better for
    working against. Not to mention ansi color code
    support, though that's also in the regular terminal
    for win10 as of 1904 iirc.

    Got windows terminal. App works with that, and even with the command propmt. Colours are a little off, but still work.

    So far so good anyway

    Boondock

    BoonDock
    Pedasi/Panama


    ... Hypochondriac: someone who enjoys bad health.

    ---
    þ Synchronet þ Sent from El Gato de Fuego * The Fire Cat * elgato.synchronetbbs.org
  • From Tracker1@VERT/TRN to Boondock on Wed Mar 3 08:22:19 2021
    On 3/1/2021 2:27 AM, Boondock wrote:
    Are you using .Net Core or .Net 5 by chance?

    Actually, no. .net framework 4.8.
    Compiling with the mono compiler puts me back a little. All
    stills works though.

    Might be worth trying to build/port to .Net 5, you'll see fewer
    issues.

    I also found it was easier to write a C shim to
    be able to use a Socket handle directly (door32).

    Haven't been able to test the modem functionality as I
    haven't owned a modem in years... only the telnet/Rlogin/SSH

    Nod... I mean for passing the terminal socket for door32
    mode. Though it's probably easier just to use the stdio
    option.

    Got windows terminal. App works with that, and even with the
    command propmt. Colours are a little off, but still work.

    You can customize the default color palette to match DOS colors
    if you want to.

    So far so good anyway

    Good to hear.
    --
    Michael J. Ryan - tracker1@roughneckbbs.com
    ---
    þ Synchronet þ Roughneck BBS - roughneckbbs.com