Communication Window
We have updated the GMCP for communication so that it actually works. Here is my trigger for putting all communication into it's own window for CMUD.
<trigger type="GMCP" priority="1540" newline="false" id="154">
<pattern>Comm.Channel.Text</pattern>
<value>#WIN Communication %gmcp.Comm.Channel.Text.text</value>
</trigger>
Info that is sent:
%gmcp.Comm.Channel.Text.channel - This is the title on the channel such as Antioch, Market, Newbie, Say, Tell, etc
%gmcp.Comm.Channel.Text.talker - Who is talking - Jeremy, Garryn, etc
%gmcp.Comm.Channel.Text.text - The whole unedited line.
6
Comments
sendGMCP("Comm.Channel.Players")
serves a similar function. Gets you a list of all the players in the realm with a table including any channels they have in common with you. Parsing that list for only people with the channel you're looking for should be trivial(in Lua =P).
Also, anyone more familiar with GMCP on Mudlet know how to properly tell Imperian you support Comm.Channel.Text and enable its use in Mudlet? I can write the function to parse the data just fine, but I'm either not receiving a "Comm.Channel.Text", or it's blank.
With debugging on and using "display(gmcp.Comm.Channel.Text)" when receiving "Comm.Channel.Text", I get the following:
System Message:
GMCP event <gmcp.Comm.Channel.Text> display(gmcp) to see the full content
nil
the claims are stated - it's the world I've created
the claims are stated - it's the world I've created
obviously, at some stage, Azefel did 'snub world'
System Message:
GMCP event <gmcp.Comm> display(gmcp) to see the full content
System Message:
GMCP event <gmcp.Comm.Channel> display(gmcp) to see the full content
nil
System Message:
GMCP event <gmcp.Comm.Channel.Text> display(gmcp) to see the full content
nil
System Message:
GMCP event <gmcp.Comm> display(gmcp) to see the full content
System Message:
GMCP event <gmcp.Comm.Channel> display(gmcp) to see the full content
nil
System Message:
GMCP event <gmcp.Comm.Channel.Start> display(gmcp) to see the full content
System Message:
GMCP event <gmcp.Comm> display(gmcp) to see the full content
System Message:
GMCP event <gmcp.Comm.Channel> display(gmcp) to see the full content
nil
System Message:
GMCP event <gmcp.Comm.Channel.End> display(gmcp) to see the full content
System Message:
GMCP event <gmcp.Char> display(gmcp) to see the full content
System Message:
GMCP event <gmcp.Char.Vitals> display(gmcp) to see the full content
You say, "Blah."
<321/303h 220/231m 0b <eb db>> 27.72 [None]
Hmm. Part of my problem might be that I've been using says since I don't feel like bothering a million people testing on channels. =/
the claims are stated - it's the world I've created
First of all, you don't need to register a user, merely sending the Comm request is sufficient. Personally, I am being lazy and triggering on 'Password correct. Welcome....'
Now, as for actually capturing the data. There's a couple of ways, but the easiest to digest is to just hook onto gmcp.Comm.Channel.Start - For this, I have the following code:
p, li { white-space: pre-wrap; } Start event
As you see, this enables a trigger for us. The patterns I use to capture the channels are as follows. (Excuse my laziness in editing these properly for Imperian, but they do work fine):
^[A-Za-z\s\'\,\`\-\.]+ (?:says?|asks?|exclaims?|roars?|whispers?)(?: you| to you| to .+?| .+?)?\, \".+?\"$
^(\[Covenant\] )?([\(\<]+[A-Za-z'\- ]+[\)\>]+\: )?\w+ (?:\([A-Za-z'\-, ]+\) )?says?,( in \w+,)? \".+\"$
Select your text and copy it over with appendBuffer() then just have the trigger disable itself.
*** WARNING *** -- I am not sure what the cause is, but DO NOT try and echo the contents of gmcp.Comm.Channel.Text.text. Bad things happen.
Finally, for the channel types, I just store them in a table like so: Clicky.
While not working as-is, I am sure that will help a bit.
Systems & Coding Support: support@pharanyx.com
Saracen Combat & Utility system: (All IRE games): saracen@pharanyx.com