Mudlet + DBUS

Post Reply
User avatar
Rakon
Posts: 350
Joined: Tue Feb 16, 2010 7:41 pm
Contact:

Mudlet + DBUS

Post by Rakon »

Didn't get a reply for this in another (admittedly probably the wrong ) thread, so repeating the request here:
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.

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: Mudlet + DBUS

Post by Vadi »

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.

User avatar
Heiko
Site Admin
Posts: 1548
Joined: Wed Mar 11, 2009 6:26 pm

Re: Mudlet + DBUS

Post by Heiko »

Checkout our spawn() function :)

User avatar
Rakon
Posts: 350
Joined: Tue Feb 16, 2010 7:41 pm
Contact:

Re: Mudlet + DBUS

Post by Rakon »

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.

Post Reply