Commit graph

1 commit

Author SHA1 Message Date
Mike Conley
50dc0b2c95
Add: MXP EXPIRE tag support for expiring links (#8383)
<!-- Keep the title short & concise so anyone non-technical can
understand it,
     the title appears in PTB changelogs -->
#### Brief overview of PR changes/additions

Implements support for the MXP (Mud eXtension Protocol) EXPIRE tag,
which allows MUD servers to automatically deactivate clickable links
when they're no longer relevant. For example, when you move to a new
room, the exit links from the previous room are deactivated so you can't
accidentally click them.

The EXPIRE tag can be used in two ways:
- Standalone: `<EXPIRE name>` deactivates all links tagged with that
name
- As an attribute: `<SEND href="..." EXPIRE="name">` tags a link to be
expired later

Expired links remain visible in scrollback for historical reference but
become non-functional when clicked.

#### Motivation for adding to Mudlet

This feature was requested by @mfontani in [Discord
comments](https://discord.com/channels/279748146316312576/1393998251786768384/1429244386541178911)
to improve the MUD playing experience by preventing accidental clicks on
outdated navigation links. The MXP v1.0 specification includes EXPIRE
tag support, and implementing it brings Mudlet closer to full MXP
compliance.

StickMUD (stickmud.com:7680) has already implemented server-side support
for this feature and uses it to expire room exit links when players move
to new rooms.

#### Other info (issues closed, discussion etc)

- Tested extensively with StickMUD's MXP implementation
- All existing unit tests pass
- No breaking changes to existing functionality
- Links are deactivated but remain visually unchanged in scrollback to
preserve historical context

---

Video of MXP tags expiring. Clicking on prior room links does nothing,
while clicking on existing room links functions.


https://github.com/user-attachments/assets/417bb1e7-458a-459b-9529-ca7749744cc5
2025-10-21 10:02:34 +01:00