[available] GMCP in Mudlet

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

Re: GMCP in Mudlet

Post by Heiko »

There have been several issues with gmcp. I've fixed a few of them in order to get Ardwolf gmcp support working.
Grab the latest git head here: http://mudlet.git.sourceforge.net/git/g ... EAD;sf=tgz

You don't have to change the telnet code. You can simply run this Lua code within Mudlet to enable all Ardwolf modules:
Code: [show] | [select all] lua
sendGMCP("Core.Supports.Set [ \"Char 1\", \"Comm 1\", \"Room 1\", \"core 1\", \"debug 1\"]")
display(gmcp) gets you all gmcp messages

Mudlet prefixes gmcp events with a "g" i.e. in case of a room.info event you need to add a script item called onRoomInfo, add the event handler groominfo and add this code:
Code: [show] | [select all] lua
function onRoomInfo( event )
	display(gmcp.roominfo)
end
For more info on event handler scripts -> manual.

You can turn on debug mode in Mudlet (->lady bug button) + error view (->red ! botton on the left in the trig editor) to get more information. Then you'll get system messages for all gmcp related events that are raised by Mudlet.

I've come across following problem with Ardwolf: If you enable the comm module, Ardwolf sends broken JSON code as the channel message contains ANSI color sequences. This causes an error and needs to be fixed on their server.

dorwardv
Posts: 15
Joined: Sat Jul 24, 2010 11:02 am

Re: GMCP in Mudlet

Post by dorwardv »

Code: [show] | [select all] lua
sendGMCP("Core.Supports.Set [ \"Char 1\", \"Comm 1\", \"Room 1\", \"core 1\", \"debug 1\"]")
nice. this works for me.
I've come across following problem with Ardwolf: If you enable the comm module, Ardwolf sends broken JSON code as the channel message contains ANSI color sequences. This causes an error and needs to be fixed on their server.
this can be fix by using rawcolors instead of using pure ANSI.
it can be toggle with aardwolf command "protocol gmcp rawcolor"

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

Re: GMCP in Mudlet

Post by Heiko »

dorwardv wrote:
I've come across following problem with Ardwolf: If you enable the comm module, Ardwolf sends broken JSON code as the channel message contains ANSI color sequences. This causes an error and needs to be fixed on their server.
this can be fix by using rawcolors instead of using pure ANSI.
it can be toggle with aardwolf command "protocol gmcp rawcolor"
This doesn't work as well as all other protocol gmcp commands that are listed on the wiki. It's either not implemented yet or broken.

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

Re: GMCP in Mudlet

Post by Heiko »

In any case the current GMCP implementation does not work correctly at all. The problem is that it is basically a copy of the ATCP implementation and this simply does not work for GMCP because the ATCP implementation assumes a flat table architecture, while GMCP is all about addressing complex table structures. Consequently, as soon as the server sends an update of a sub table the data is not written in the appropriate sub table where it belongs, but written in the root table as a new key. This is a structural bug that needs a very different solution.

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

Re: GMCP in Mudlet

Post by Vadi »

That issue is a minor one and is easily solved. I'll be working on it in the next few days.

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

Re: GMCP in Mudlet

Post by Heiko »

The problem is minor in as far as it can be solved quickly, but the changes are substantial:

1. We need new gmcp message + data separation code and a Lua table element parser.
2. Then we need to check if the requested sub table already exists and instantiate all missing keys/tables if it doesn't.
3. Then we need to push the correct sub table on the stack and hand it to the JSON decoder & Lua table generator library.
4. Event names will need to change from gfoobar to gmcp.foo.bar
5. Raise parent events in case child events are raised i. e. gmcp.foo must be raised on all changes to gmcp.foo such as gmcp.foo.bar

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

Re: GMCP in Mudlet

Post by Vadi »

Yep pretty much.

dorwardv
Posts: 15
Joined: Sat Jul 24, 2010 11:02 am

Re: GMCP in Mudlet

Post by dorwardv »

Heiko wrote:
dorwardv wrote:
I've come across following problem with Ardwolf: If you enable the comm module, Ardwolf sends broken JSON code as the channel message contains ANSI color sequences. This causes an error and needs to be fixed on their server.
this can be fix by using rawcolors instead of using pure ANSI.
it can be toggle with aardwolf command "protocol gmcp rawcolor"
This doesn't work as well as all other protocol gmcp commands that are listed on the wiki. It's either not implemented yet or broken.
sorry i forgot to mention im working on testport at the moment to get the most out of gmcp testing.

aardmud.net:6555

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

Re: GMCP in Mudlet

Post by Vadi »

1 ✔. We need new gmcp message + data separation code and a Lua table element parser.
2 ✔. Then we need to check if the requested sub table already exists and instantiate all missing keys/tables if it doesn't.
3 ✔. Then we need to push the correct sub table on the stack and hand it to the JSON decoder & Lua table generator library.
4 ✔. Event names will need to change from gfoobar to gmcp.foo.bar
5. Raise parent events in case child events are raised i. e. gmcp.foo must be raised on all changes to gmcp.foo such as gmcp.foo.bar

I don't agree with #5, it seems like a silly design to encourage. Instead, it'd be nice to be able to make gmcp.foo.* event handlers.

All changes pushed to bzr - Aardwolf people, please test that the incremental updares are working, IRE people, please test that GMCP is still working! (you'll need to adjust your event handlers for the change. Sorry, happens with in-development testing stuff.)

User avatar
tsuujin
Posts: 695
Joined: Fri Feb 26, 2010 12:59 am
Location: California
Contact:

Re: GMCP in Mudlet

Post by tsuujin »

Some of the tables within the GMCP table really should be renamed. For example, right now there is gmcp.List, which lists all of your current channels. This is a bit confusing for naming, and worse I've had it populate with seemingly random things, probably from one of the other gmcp.*.List tables (like gmcp.Char.List)

Post Reply