moo.sdk.output.send_gmcp
- moo.sdk.output.send_gmcp(obj, module, data=None)
Send a GMCP event to
obj’s SSH channel.GMCP (Generic MUD Communication Protocol) is the canonical OOB channel for structured MUD events. Clients that negotiated GMCP receive
IAC SB GMCP <module> <json> IAC SE; clients that did not see it as zero bytes on the wire (the SSH server skips the emit if the capability flag is false).Example:
send_gmcp(player, "Char.Vitals", {"hp": 50, "maxhp": 100}) send_gmcp(player, "Room.Info", {"num": 12, "name": "A dim hall"}) send_gmcp(player, "Core.Ping") # no payload
- Parameters:
obj – the Object (player avatar) to send the GMCP event to
module (
str) – GMCP module/package name, e.g."Char.Vitals"data – JSON-serializable value, or
Nonefor an empty event