Anyone use MUSHclient to update website?

Posted by RichKK on Tue 13 Jan 2009 11:31 AM — 3 posts, 17,657 views.

#0
I thought it would be a pretty neat idea to have MUSHclient update a website with data from a MUD. For example a ranking table, a players online list, uptime etc. It seems so simple to do but I'm stuck on which way to go.

Would be awesome to have a few plain text fields on a website that could receive input from MUSHclient.

Anybody ever do anything like that or have tips?


Was thinking having MUSHclient open, write and save a local XML or HTML file with data from the MUD but that doesn't seem very elegant relative to MUSHclient's capabilities.
Amended on Tue 13 Jan 2009 11:33 AM by RichKK
#1
You could use something like LuaSQL to connect to a remote database and update some records.
Russia #2
Alternatively, you could send the data via UDP, as long as you have enough control over the web server to allow it to capture the UDP packets.

I've done something like that a couple of years ago. A Lua script inside Mushclient was capturing output through the OnPluginScreendraw callback and sending it with UDPSend() to the server. The server was running locally, was written in Python, using Twisted, and upon receiving a packet resent it to all connected web clients via an Ajax hack known as "Comet", which was implemented with the Twisted-based Athena library.

All of it took about an hour to put together, most of which time was spent on figuring out the correct way of grabbing screen output in Mushclient. So it's definitely doable.