• python function reference for mystic

    From Ragnarok@21:2/151 to FSXNet.FSX_MYS on Fri Oct 1 16:48:27 2021
    Does anyone have a python script function reference with its parameters
    for mystic, since the wiki is empty and not useful?

    I want to try to make some scripts in python, but I can't find any other documentation

    Graciela!
    --- SBBSecho 3.14-Linux
    * Origin: Dock Sud BBS - bbs.docksud.com.ar - Argentina (21:2/151)
  • From xqtr@21:1/111 to Ragnarok on Sat Oct 2 18:27:11 2021
    Does anyone have a python script function reference with its parameters for mystic, since the wiki is empty and not useful?

    You can use this:

    http://andr01d.zapto.org:8080/Files/xqtr_tools/xq-mpy.txt.htm

    It is also available via gopher and also you will find it in FSX file areas ;)

    .
    :: XQTR :: Another Droid BBS :: andr01d.zapto.org:9999 :: xqtr@gmx.com

    --- Mystic BBS v1.12 A47 2020/11/23 (Raspberry Pi/32)
    * Origin: Another Droid BBS # andr01d.zapto.org:9999 (21:1/111)
  • From Ragnarok@21:2/151 to xqtr on Sat Oct 2 21:06:25 2021
    El 2/10/21 a las 14:27, xqtr escribió:
    Ra> Does anyone have a python script function reference with its parameters
    Ra> for mystic, since the wiki is empty and not useful?

    You can use this:

    http://andr01d.zapto.org:8080/Files/xqtr_tools/xq-mpy.txt.htm

    It is also available via gopher and also you will find it in FSX file areas ;)

    .
    thanks! very useful!

    do you know if are possible to write info to active node from scripts or external programs? sort of IPC communication with the mystic process ?

    thanks!
    --- SBBSecho 3.14-Linux
    * Origin: Dock Sud BBS - bbs.docksud.com.ar - Argentina (21:2/151)
  • From xqtr@21:1/111 to Ragnarok on Mon Oct 4 19:19:55 2021

    do you know if are possible to write info to active node from scripts o external programs? sort of IPC communication with the mystic process ?|

    Not quite sure if i understood what you want to do... you want to send Node Messages? this is possible, yes. You can also send global node messages (to all connected users at once). To send a node message you can use the NS mci code.

    .
    :: XQTR :: Another Droid BBS :: andr01d.zapto.org:9999 :: xqtr@gmx.com

    --- Mystic BBS v1.12 A47 2020/11/23 (Raspberry Pi/32)
    * Origin: Another Droid BBS # andr01d.zapto.org:9999 (21:1/111)
  • From Ragnarok@21:2/151 to xqtr on Wed Oct 6 21:34:11 2021
    El 4/10/21 a las 15:19, xqtr escribió:

    Ra> do you know if are possible to write info to active node from scripts o
    Ra> external programs? sort of IPC communication with the mystic process ?|

    Not quite sure if i understood what you want to do... you want to send Node Messages? this is possible, yes. You can also send global node messages (to all connected users at once). To send a node message you can use the NS mci code.


    Hi! thanks for reply!

    I want to make a mystic module in python to connect with Synchronet's
    InterBBS Message System (sbbsimsg)

    This uses some tcp ports to send and receive messages.

    First use case: "send messages .."
    I can already do this using sockets to send to the remote bbs (easy part).

    Second use case "receive messages"
    Here I am stuck, I can write a python daemon that receives the messages,
    but I can't find a way to inject them to the mystic user (if it is logged)

    But that daemon runs in its context separate from the mystic process. Therefore I do not have access to the user's session.

    How can I send this kind of message to the user from python?

    Can I tell mystic to listen on a port and what it receives to pipe to a
    python script? (SBBS have a "services concept" that do this job) like
    inetd unix service..

    Can you give me a simple snippet of how to use that mci code from ptyhon?

    thanks!
    --- SBBSecho 3.14-Linux
    * Origin: Dock Sud BBS - bbs.docksud.com.ar - Argentina (21:2/151)
  • From xqtr@21:1/111 to Ragnarok on Thu Oct 7 16:38:58 2021
    Second use case "receive messages"
    Here I am stuck, I can write a python daemon that receives the messages, but I can't find a way to inject them to the mystic user (if it is
    logged)
    But that daemon runs in its context separate from the mystic process. Therefore I do not have access to the user's session.
    How can I send this kind of message to the user from python?

    Make the server/daemon, to store the incoming messages to a file, like a queue. Then you can make another Mystic script, MPS or MPY to read that file and display the info on the user, for example when he logs in, when he enters a menu etc. It's very simple this way, i think.

    Also, instead of storing all the incoming data to one file, you can use a directory and each incoming packet, be stored in a separate file. This way, you will avoid any file access problems, while both mystic and the daemon, need to use the same file. Each time, you process a file/packet, the mystic (local) script, can delete it.

    Can you give me a simple snippet of how to use that mci code from ptyhon?

    No need for that, if you do it like i say above :)

    .
    :: XQTR :: Another Droid BBS :: andr01d.zapto.org:9999 :: xqtr@gmx.com

    --- Mystic BBS v1.12 A47 2020/11/23 (Raspberry Pi/32)
    * Origin: Another Droid BBS # andr01d.zapto.org:9999 (21:1/111)
  • From bcw142@21:1/145 to Ragnarok on Sun Nov 28 17:50:25 2021
    On 01 Oct 2021, Ragnarok said the following...

    Does anyone have a python script function reference with its parameters for mystic, since the wiki is empty and not useful?

    The information is in the whatsnew.txt which should end up in mystic/docs.
    It is as things were added and changed, but it is the only real documentation on Python and updates to MPL there is.

    ... Intelligence tests are biased toward the literate.

    --- Mystic BBS v1.12 A47 2021/09/07 (Raspberry Pi/32)
    * Origin: Mystic Pi BBS bcw142.zapto.org:23 (21:1/145)
  • From bcw142@21:1/145 to Ragnarok on Sun Nov 28 17:58:48 2021
    On 02 Oct 2021, Ragnarok said the following...

    El 2/10/21 a las 14:27, xqtr escribió:
    do you know if are possible to write info to active node from scripts or external programs? sort of IPC communication with the mystic process ?

    I suspect your looking for interactive communications, so no. The reason is security, Gooroo tries to keep Mystic hard to hack and add viruses and such
    to and so limits things to outgoing only mostly. If the hackers can't change outgoing information they can't hack it. If they could Mystic would be a problem and email feeds would be taken over to send spam.

    ... I'd love to help you out. Which way did you come in?

    --- Mystic BBS v1.12 A47 2021/09/07 (Raspberry Pi/32)
    * Origin: Mystic Pi BBS bcw142.zapto.org:23 (21:1/145)