• MPL Question

    From Mike Fenton@1:229/310 to All on Fri Aug 4 14:46:08 2017
    Can somebody give me an example of some MPL code for the following.

    From the menu I'd like to have the following keyword sent into the MPL
    program. Then the MPL program will look for it and launch the keyword procedure.

    I just need the MPL code to look for that keyword.


    Hotkey: T
    Command: GX (execute MPL)
    Data: program keyword

    --- Mystic BBS v1.12 A34 (Linux/32)
    * Origin: Clutch BBS * telnet://clutch.darktech.org (1:229/310)
  • From mark lewis@1:3634/12.73 to Mike Fenton on Fri Aug 4 15:31:38 2017

    On 2017 Aug 04 14:46:08, you wrote to All:

    From the menu I'd like to have the following keyword sent into the MPL program. Then the MPL program will look for it and launch the keyword procedure.

    i don't have code but it should be as easy as sending this keyword as a command
    line option and then just parse the command line to go do what you want to do...

    )\/(ark

    Always Mount a Scratch Monkey
    Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong...
    ... I've visited reality, there were dirty dishes there.
    ---
    * Origin: (1:3634/12.73)
  • From Mike Fenton@1:229/310 to mark lewis on Fri Aug 4 15:51:04 2017
    i don't have code but it should be as easy as sending this keyword as a command line option and then just parse the command line to go do what
    you want to do...

    Darn, I need to see an example..

    --- Mystic BBS v1.12 A34 (Linux/32)
    * Origin: Clutch BBS * telnet://clutch.darktech.org (1:229/310)
  • From mark lewis@1:3634/12.73 to Mike Fenton on Fri Aug 4 16:39:50 2017

    On 2017 Aug 04 15:51:04, you wrote to me:

    i don't have code but it should be as easy as sending this keyword as
    a command line option and then just parse the command line to go do
    what you want to do...

    Darn, I need to see an example..

    look at automessage.mps in your scripts directory... for that matter, look at all of the mps files in there... but here's something real quick off the top of
    my head... no testing at all... there may be syntax errors...

    ----->8 snip ShowOptions.mps snip 8<-----
    Procedure Do_Option1;
    Begin
    WriteLn('This is Option1');
    End;

    Procedure Do_Option2;
    Begin
    WriteLn('This is Option2');
    End;

    Procedure Do_Option3;
    Begin
    WriteLn('This is Option3');
    End;

    Begin
    Case Upper(ParamStr(1)) of
    'OPTION1' : Do_Option1;
    'OPTION2' : Do_Option2;
    'OPTION3' : Do_Option2;
    Else
    WriteLn('Invalid command line option.');
    End;
    WriteLn('|CR|PA');
    End.
    ----->8 snip 8<-----


    use it like this...


    Hotkey: P
    Command: GX (execute MPL)
    Data: ShowOptions option1

    Hotkey: D
    Command: GX (execute MPL)
    Data: ShowOptions option2

    Hotkey: Q
    Command: GX (execute MPL)
    Data: ShowOptions option3



    )\/(ark

    Always Mount a Scratch Monkey
    Do you manage your own servers? If you are not running an IDS/IPS yer doin' it wrong...
    ... Take the law into your own hands and choke a lawyer today.
    ---
    * Origin: (1:3634/12.73)
  • From Mike Fenton@1:229/310 to mark lewis on Fri Aug 4 21:05:14 2017
    Darn, I need to see an example..

    look at automessage.mps in your scripts directory... for that matter,
    look at all of the mps files in there... but here's something real quick off the top of my head... no testing at all... there may be syntax errors...

    ----->8 snip ShowOptions.mps snip 8<-----
    Procedure Do_Option1;
    Begin
    WriteLn('This is Option1');
    End;

    Procedure Do_Option2;
    Begin
    WriteLn('This is Option2');
    End;

    Procedure Do_Option3;
    Begin
    WriteLn('This is Option3');
    End;

    Begin
    Case Upper(ParamStr(1)) of
    'OPTION1' : Do_Option1;
    'OPTION2' : Do_Option2;
    'OPTION3' : Do_Option2;
    Else
    WriteLn('Invalid command line option.');
    End;
    WriteLn('|CR|PA');
    End.
    ----->8 snip 8<-----


    use it like this...


    Hotkey: P
    Command: GX (execute MPL)
    Data: ShowOptions option1

    Hotkey: D
    Command: GX (execute MPL)
    Data: ShowOptions option2

    Hotkey: Q
    Command: GX (execute MPL)
    Data: ShowOptions option3




    thanks. im going to try this out.

    --- Mystic BBS v1.12 A34 (Linux/32)
    * Origin: Clutch BBS * telnet://clutch.darktech.org (1:229/310)
  • From Mike Fenton@1:229/310 to mark lewis on Fri Aug 4 21:30:50 2017
    Worked perfect.

    Thanks for the help!

    --- Mystic BBS v1.12 A34 (Linux/32)
    * Origin: Clutch BBS * telnet://clutch.darktech.org (1:229/310)
  • From Black Panther@1:317/3 to g00r00 on Tue Apr 5 10:33:14 2022
    Hello g00r00!

    Just a quick question. When trying to use the 'local' function in MPL, it doesn't seem to ever return true. I'm actually logging into Mystic from the command line, './mystic -l' and that function returns false.

    Here is a snippet of how I'm trying to use it:

    If Local Then SysopLog('Local Caller')
    Else SysopLog(Int2Str(Callers.RServerType));

    This is returning '0' to the log file when logging in from the command line. I wonder if possibly adding a servertype for local login might be simpler than doing the 'local' boolean. Perhaps adding servertype of 3 for local.

    Has something changed with it, that hasn't made it's way into my documentation yet? ;)

    Thank you,

    Black Panther

    ... When I'm good, I'm great--when I'm bad, you're breathless
    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: Exploring other frontiers! (1:317/3)
  • From g00r00@1:129/215 to Black Panther on Tue Apr 5 13:00:55 2022
    This is returning '0' to the log file when logging in from the command line. I wonder if possibly adding a servertype for local login might be simpler than doing the 'local' boolean. Perhaps adding servertype of 3
    for local.

    I don't know what OS or version you're using but it seems to be working from here I just tested it in Windows A48 and Linux. The simple test I did was logged in and tried to download the BBS list and on both OSes it says "Local mode:" and asked me to save.

    Are you sure you're logging in with -L? Make sure you're not setting the value of Local anywhere in any MPL anywhere, otherwise that will change it for the entire connection.

    The ServerType that is used internally by Mystic for terminal services does have a Local mode value. They should be (as of A48 current releases):

    0=telnet,1=rlogin,2=ssh,3=modem,4=local,5=other

    5 is left open broadly so (for example) someone could use that as a packet radio type if they wanted to and configure server type 5 to show up as "RADIO" in the callers list (or whatever else they want).

    ... No honey, I can't eat with the family. My computer gets lonely!

    --- Mystic BBS v1.12 A48 2022/04/03 (Windows/64)
    * Origin: Sector 7 * Mystic WHQ (1:129/215)
  • From Black Panther@1:317/3 to g00r00 on Wed Apr 6 00:14:18 2022
    Hello g00r00!

    05 Apr 22 13:00, you wrote to me:

    This is returning '0' to the log file when logging in from the
    command line. I wonder if possibly adding a servertype for local
    login might be simpler than doing the 'local' boolean. Perhaps
    adding servertype of 3 for local.

    I don't know what OS or version you're using but it seems to be
    working from here I just tested it in Windows A48 and Linux. The
    simple test I did was logged in and tried to download the BBS list and
    on both OSes it says "Local mode:" and asked me to save.

    My test system is running Manjaro Linux 64-bit, with Kernel 5.15.28-1-MANJARO x86_64.

    Let me run a test using the bbs listing as see if that is any different.

    Are you sure you're logging in with -L? Make sure you're not setting
    the value of Local anywhere in any MPL anywhere, otherwise that will change it for the entire connection.

    Yes, logging in either is -L or running the mpl from a command prompt with the './mystic -Uuser_Name -Ppassword -X'basicmpl test' format. Neither one will show the local as being true. Also, the variable is not being changed anywhere else in the code.

    The ServerType that is used internally by Mystic for terminal services does have a Local mode value. They should be (as of A48 current releases):

    0=telnet,1=rlogin,2=ssh,3=modem,4=local,5=other

    Ooooo. Didn't know about the others on here. So, when it's a local connection the servertype should also be showing as 4. Looks like I have some more playing to do. :)

    Thank you,


    Black Panther

    ... C:\DOS;C:\WIN;C:\WIN\SCREW\UP;C:\ME\DEL\WIN;C:\ME\RUN\OS2
    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: Exploring other frontiers! (1:317/3)
  • From g00r00@1:129/215 to Black Panther on Wed Apr 6 12:08:22 2022
    Yes, logging in either is -L or running the mpl from a command prompt
    with the './mystic -Uuser_Name -Ppassword -X'basicmpl test' format. Neither one will show the local as being true. Also, the variable is not being changed anywhere else in the code.

    The second one is not a local login because you're not telling it its a local login with that command line. There is no -L

    sudo ./mystic -l -ug00r00 -pMyPassword "-xbbslist bbslist"

    Tested this again in Linux since I know thats what you're using with A48 and it works for me. If I include -l it says local mode, if I don't it doesn't.

    Ooooo. Didn't know about the others on here. So, when it's a local connection the servertype should also be showing as 4. Looks like I have some more playing to do. :)

    Probably depends on the version you're using but yes I think so.

    ... No one knows what's next, but everybody does it.

    --- Mystic BBS v1.12 A48 2022/04/03 (Windows/64)
    * Origin: Sector 7 * Mystic WHQ (1:129/215)
  • From Black Panther@1:317/3 to g00r00 on Thu Apr 7 20:18:30 2022
    Hello g00r00!

    06 Apr 22 12:08, you wrote to me:

    Yes, logging in either is -L or running the mpl from a command
    prompt with the './mystic -Uuser_Name -Ppassword -X'basicmpl
    test' format. Neither one will show the local as being true.
    Also, the variable is not being changed anywhere else in the
    code.

    The second one is not a local login because you're not telling it its
    a local login with that command line. There is no -L

    That was a error when typing it into the message... I do use the -L in the command to run from the command line. They say the mind is the second thing to go... I'll be damned if I remember what the first was... ;)

    I just upgraded to a48, at least for my test system here, and it seems to be working now. It was strange that it wasn't in a47.

    I threw together a quick little mpl to test it, as I've modified my bbslist.mps. :)

    Begin
    ClrScr;
    WriteLn('|CR');
    If Local Then WriteLn('Local Login');
    Else WriteLn('Remote Login');
    End.

    Now it shows 'Local Login'.

    sudo ./mystic -l -ug00r00 -pMyPassword "-xbbslist bbslist"

    You use the same password that I do!! ;) BTW, I don't run Mystic with sudo.

    Ooooo. Didn't know about the others on here. So, when it's a
    local connection the servertype should also be showing as 4.
    Looks like I have some more playing to do. :)

    Probably depends on the version you're using but yes I think so.

    I've edited some code here, but haven't tested it to see if it does. I'll let you know. :)

    Thank you,

    Black Panther

    ... Sometimes I think line noise is deliberate.
    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: Exploring other frontiers! (1:317/3)
  • From g00r00@1:129/215 to Black Panther on Fri Apr 8 11:14:40 2022
    I just upgraded to a48, at least for my test system here, and it seems
    to be working now. It was strange that it wasn't in a47.

    Could very well be broken in A47. I think I did change some stuff surrounding the server types between A46 and A47 which could have broke it.

    Now you'll have access to MysticScript also :)

    ... There are three kinds of people: Those who can count, and those who can't

    --- Mystic BBS v1.12 A48 2022/04/03 (Windows/64)
    * Origin: Sector 7 * Mystic WHQ (1:129/215)