Integration with DBus signals.
Listen for signals
Register a signal
I'd like to see this implemented basically, like the current script-events are done. I would register a dbus signal in the scripts, which Mudlet would then 'listen' for:
Match: 'im.pidgin.purple.ImMessageRecieved'
Script: <write some lua code to execute on DBus signal>
I found lua Dbus bindings from github ( http://github.com/esmil/simpledbus ) , and successfully included it with Mudlet loadup (just printing out the dbus connections. However, when trying to initiate the mainloop() to LISTEN for a signal, it locks up Mudlet.
I am suggesting that native support be added in Mudlet, for DBus or perhaps coroutines to prevent a signal lockup.
Mudlet + DBUS
Mudlet + DBUS
Didn't get a reply for this in another (admittedly probably the wrong ) thread, so repeating the request here:
Re: Mudlet + DBUS
coroutines are already available in Mudlet, though they won't help your issue. You'd want to install Lua Lanes or some other threading library for that to work.
I don't think given the Linux userbase we have that putting effort into DBUS support is worth it at the moment - though a patch would be welcome.
I don't think given the Linux userbase we have that putting effort into DBUS support is worth it at the moment - though a patch would be welcome.
Re: Mudlet + DBUS
Checkout our spawn() function
Re: Mudlet + DBUS
Thank you for the responses.
Vadi: I was under the impression that coroutines in lua could be used ala threads in Python. I'll look into it and the lua Lanes more though, if this is not the case.
Heiko: Where can I read more of the 'spawn()' function?? Reading over the Mudlet manual doesn't show any examples thus far for such.
Vadi: I was under the impression that coroutines in lua could be used ala threads in Python. I'll look into it and the lua Lanes more though, if this is not the case.
Heiko: Where can I read more of the 'spawn()' function?? Reading over the Mudlet manual doesn't show any examples thus far for such.