Having issues with mxp in gmcp

Post Reply
Dracunos
Posts: 4
Joined: Fri Oct 19, 2012 5:23 am

Having issues with mxp in gmcp

Post by Dracunos »

I'm trying to move map data from gmcp into a separate window.. But as I understand it the only way to do that is to use ansi2decho and convert the escape codes before decho-ing into that new window? And that doesn't touch the mxp code.. Trying to filter out the mxp code, store where the clickable links are supposed to be, go back through the buffer to those stored locations and apply a clickable link to that character is proving to be a nightmare for me. Essentially my question is, is there any way to get the functionality of paste() via raw data in gmcp?


Here's a sample of that raw data:

Code: Select all

"   [39;49m[0m-[39;49m[0m[32m[4zMXP<send href="goto 3b"MXP>$[4zMXP</sendMXP>[39;49m[0m-[39;49m[0m    
    [39;49m[0m|[39;49m[0m [39;49m[0m|[39;49m[0m   
   [39;49m[0m[31m+[39;49m[0m[1;33m[4zMXP<send href="goto 3c"MXP>@[4zMXP</sendMXP>[39;49m[0m-
[39;49m[0m[32m[4zMXP<send href="goto 4c"MXP>$[4zMXP</sendMXP>[39;49m[0m   
    [39;49m[0m[31m+[39;49m[0m [39;49m[0m[31m+[39;49m[0m\[39;49m[0m  
        [39;49m[0m[36m[4zMXP<send href="goto 5d"MXP>*[4zMXP</sendMXP>[39;49m[0m 
"
Namely the issue is the

Code: Select all

[4zMXP<send href="goto 3c"MXP>@[4zMXP</sendMXP>
part. Replacing that line with just the @ between the mxp tags, and then applying setLink to it seems like overkill. Is there no way to print into another buffer while keeping all this data directly from gmcp?

Here's the regex for capturing the mxp lines

Code: Select all

"%[4zMXP\<send href=\"goto .+\"MXP>.%[4zMXP\</sendMXP\>"
Although I think the escape character is being stripped out here..

But it seems doable and there are probably easier ways than what I'm thinking right now, but seems like there should be a much much easier way to simply paste() this data in directly from gmcp and have the client parse it just like it parses everything else normally.. I feel like I'm missing something really simple.

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

Re: Having issues with mxp in gmcp

Post by Vadi »

This is a known issue: https://github.com/Mudlet/Mudlet/issues/650 that requires someone's attention and care to fix :)

Post Reply