Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ GMCP Help

GMCP Help

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Kevnuke   USA  (145 posts)  Bio
Date Sat 25 Aug 2018 03:40 AM (UTC)
Message
Can anyone confirm that IRE.Rift.Request on Achaea is not getting a response from the server, or am I just not doing it right?

http://nexus.ironrealms.com/GMCP under IRE.Rift

I'm using the following:


<alias
    match="^rift$"
    enabled="y"
    regexp="y"
    ignore_case="y"
    send_to="12"
    script="IRERiftRequest"
/>

local SB_GMCP = "\255\250\201" .. "%s" .. "\255\240"

function IRERiftRequest ()
	SendPkt(SB_GMCP:format("IRE.Rift.Request"))
end


I also tried this with the same alias:


function SendGMCP(message, content)
	if type(message) ~= "string" then
		return nil, "Message name must be a string."
	end
  
	if content ~= nil then
		content = json.encode({content})
		if content == nil then
			return nil, "Invalid input."
		end
		message = ("%s %s"):format(message, content:sub(2, #content-1))
	end
  
	SendPkt(SB_GMCP:format(message))
	return true
end

function IRERiftRequest ()
	SendGMCP("IRE.Rift.Request", "")
end


I also tried putting a space after IRE.Rift.Request, but that made no difference.
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #1 on Sat 25 Aug 2018 09:37 PM (UTC)
Message
Is this in a context where everything else works in GMCP (eg. room info, etc.)?

If so, maybe they didn't implement that message.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Sondayga   (8 posts)  Bio
Date Reply #2 on Sat 25 Aug 2018 10:30 PM (UTC)
Message
Make sure you have IRE.Rift in you core.supports.
http://www.ironrealms.com/gmcp-doc
Top

Posted by Kevnuke   USA  (145 posts)  Bio
Date Reply #3 on Sun 26 Aug 2018 12:34 AM (UTC)
Message
Sondayga said:

Make sure you have IRE.Rift in you core.supports.
http://www.ironrealms.com/gmcp-doc


That was the first thing I did.

Nick Gammon said:

Is this in a context where everything else works in GMCP (eg. room info, etc.)?

If so, maybe they didn't implement that message.


It's the same context as the others, and it's implemented. I know someone on Mudlet that tested it and got a response but I guess they used IRE.Rift, instead of IRE.Rift.Request. I tried it both ways and still nothing. They got an object back like the example they give on the GMCP site.

I mainly just wanted to see if anyone on MUSHclient had done it successfully before saying anything to IRE about it.

I was thinking maybe it has something to do with how the function I'm using doesn't like content = nil, for the messages that don't have any content following them.

maybe this would work?


function SendGMCP(message, content)
	if type(message) ~= "string" then
		return nil, "Message name must be a string."
	end
  
	if content ~= nil then
		content = json.encode({content})
		message = ("%s %s"):format(message, content:sub(2, #content-1))
	end
  
	SendPkt(SB_GMCP:format(message))
	return true
end
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #4 on Sun 26 Aug 2018 01:01 AM (UTC)
Message
Your first alias looked OK to me, however this would be less confusing:


SendPkt("\255\250\201" .. "IRE.Rift.Request" .. "\255\240")


Or even:


SendPkt("\255\250\201IRE.Rift.Request\255\240")


That string.format stuff is unnecessary when it is all constant data. Also the JSON encoding doesn't really apply here.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #5 on Sun 26 Aug 2018 01:03 AM (UTC)
Message
Did you do what Sondayga suggested in reply #2?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Sondayga   (8 posts)  Bio
Date Reply #6 on Sun 26 Aug 2018 02:15 AM (UTC)
Message
Not sure if it helps, but this is what I have.


function gmcp_sendpkt(data)
	SendPkt(string.char(IAC, SB, GMCP)..string.gsub(data, "\255", "\255\255")..string.char(IAC, SE))
end



function get_rift()
	gmcp_sendpkt('IRE.Rift.Request')
end
Top

Posted by Kevnuke   USA  (145 posts)  Bio
Date Reply #7 on Sun 26 Aug 2018 07:07 AM (UTC)
Message
Nick Gammon said:

Did you do what Sondayga suggested in reply #2?


Yes, I replied in Reply #3.

This is my supported modules table. The only thing I can think of is maybe the version number is wrong for IRE.Rift?


local GMCP_options = {
  "Char 1",
  "Char.Afflictions 1",
  "Char.Defences 1",
  "Char.Items 1",
  "Char.Skills 1",
  "Comm.Channel 1",
  "Room 1",
  "IRE.Rift 1",
  "IRE.Target 1",
  "IRE.Time 1"
}


I've tried sending IRE.Time.Request and Comm.Channel.Players as well just to see if any of them worked and Comm.Channel.Players worked if I put Send("") after the SendPkt. For some reason certain messages don't send a response without some extra input from the client.

The only thing I can think of is that either MUSHclient is intercepting the messages before the client can ColourNote them to the screen or IRE has something against MUSHclient lol

I'm not sending the wrong message because when I have before I get this response from the server:

WARNING: Your client sent an erroneous GMCP message - ire.rift. If you are using one of the IRE clients, please file a BUG in-game, otherwise please check your client settings.
Top

Posted by Sondayga   (8 posts)  Bio
Date Reply #8 on Mon 27 Aug 2018 08:33 PM (UTC)

Amended on Mon 27 Aug 2018 08:36 PM (UTC) by Sondayga

Message
Did you get any head way on this? I'm able to get a response while on Achaea.


[05:30:23|100%h|91%m|100%en|100%will|Level]  ex- 
[debug]: Received GMCP message: IRE.Time.Update.
[debug]: Data: { "daynight": "48" }

[debug]: Received GMCP message: Char.Vitals.
[debug]: Data: { "hp": "3095", "maxhp": "3095", "mp": "2899", "maxmp": "3190", "ep": "14375", "maxep": "14375", "wp": "13400", "maxwp": "13400", "nl": "1", "bal": "1", "eq": "1", "string": "H:3095/3095 M:2899/3190 E:14375/14375 W:13400/13400 NL:1/100 ", "charstats": [ "Bleed: 0", "Rage: 0", "Spirits: 0" ] }
[debug]: gmcp.Char.Vitals updated.
[05:31:24|100%h|91%m|100%en|100%will|Level]  ex- 
[debug]: Received GMCP message: IRE.Rift.List.
[debug]: Data: [ { "name": "bayberry", "amount": "46", "desc": "bayberry bark" }, { "name": "mending", "amount": "625", "desc": "a salve of mending" }, { "name": "pear", "amount": "100", "desc": "prickly pear" }, { "name": "echinacea", "amount": "50", "desc": "echinacea" }, { "name": "elm", "amount": "148", "desc": "slippery elm" }, { "name": "ginger", "amount": "50", "desc": "ginger root" }, { "name": "myrrh", "amount": "48", "desc": "myrrh gum" }, { "name": "bellwort", "amount": "150", "desc": "bellwort flower" }, { "name": "cohosh", "amount": "150", "desc": "black cohosh" }, { "name": "kola", "amount": "100", "desc": "kola nut" }, { "name": "valerian", "amount": "98", "desc": "valerian" }, { "name": "skullcap", "amount": "196", "desc": "skullcap" }, { "name": "ginseng", "amount": "99", "desc": "ginseng root" }, { "name": "epidermal", "amount": "389", "desc": "an epidermal salve" }, { "name": "mana", "amount": "2000", "desc": "an elixir of mana" }, { "name": "caloric", "amount": "199", "desc": "a caloric salve" }, { "name": "health", "amount": "592", "desc": "an elixir of health" }, { "name": "bloodroot", "amount": "73", "desc": "bloodroot leaf" }, { "name": "rope", "amount": "22", "desc": "rope" }, { "name": "cloth", "amount": "2", "desc": "cloth" }, { "name": "immunity", "amount": "400", "desc": "an elixir of immunity" }, { "name": "restoration", "amount": "660", "desc": "a salve of restoration" }, { "name": "goldenseal", "amount": "50", "desc": "goldenseal root" }, { "name": "hawthorn", "amount": "50", "desc": "hawthorn berry" }, { "name": "kelp", "amount": "49", "desc": "kelp" }, { "name": "ash", "amount": "50", "desc": "prickly ash bark" }, { "name": "sileris", "amount": "130", "desc": "sileris" }, { "name": "frost", "amount": "400", "desc": "an elixir of frost" }, { "name": "lobelia", "amount": "60", "desc": "lobelia seed" }, { "name": "wood", "amount": "20", "desc": "wood" }, { "name": "steel", "amount": "10", "desc": "steel" }, { "name": "speed", "amount": "60", "desc": "an elixir of speed" } ]
[debug]: Received GMCP message: IRE.Time.Update.
[debug]: Data: { "daynight": "51" }
[debug]: Received GMCP message: Comm.Channel.Text.
[debug]: Data: { "channel": "ct", "talker": "Auld", "text": "\u001b[0;32m(Eleusis): Auld says, \"Bye!\"\u001b[0;37m" }
[debug]: Received GMCP message: Comm.Channel.Start.
[debug]: Data: ["ct"]

(Eleusis): Auld says, "Bye!"
[debug]: Received GMCP message: Comm.Channel.End.
[debug]: Data: ["ct"]


Are you getting rift change messages when you outr or inr?
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #9 on Mon 27 Aug 2018 08:38 PM (UTC)
Message

What’s the problem exactly? You are getting IRE.Rift.List messages.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Sondayga   (8 posts)  Bio
Date Reply #10 on Mon 27 Aug 2018 09:02 PM (UTC)
Message
I am getting the messages yes. Kevnuke was not able to get them and I was checking if they had got it fixed. Thanks!
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #11 on Tue 28 Aug 2018 12:23 AM (UTC)
Message
Sorry, I got the two of you confused. :)

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Kevnuke   USA  (145 posts)  Bio
Date Reply #12 on Mon 03 Sep 2018 10:14 PM (UTC)

Amended on Mon 03 Sep 2018 10:15 PM (UTC) by Kevnuke

Message
Not sure how I got unsubscribed from this thread, but anyway I got a reply from IRE staff earlier.


Message #12         Sent by Anytus
2018/9/03/13:32 Greetings! Regarding issue #83520: Our head coder and user of Mushclient has tested the rift request GMCP function and it appears to be working fine. If you are continuing to have problems with this, please file a BUG or another ISSUE and we will look into it further.


I know it's working, I just wasn't doing something right.
So I took the alias and function I was using to send IRE.Rift.Request and stuck it in your GMCP_handler_NJG plugin.
BAM started getting IRE.Rift.List. Something in my plugin is interfering, probably in the OnPluginTelnetSubnegotiation. I'm not sure how or why since I'm doing the ColourNote before I change the "data" in anyway. but here's the entire plugin.

https://pastebin.com/SAGz0uPr
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


26,851 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.