[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Bug reports
. . -> [Subject]  OnPluginTelnetRequest always called with SENT_DO
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

OnPluginTelnetRequest always called with SENT_DO

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


Posted by Twisol   USA  (2,257 posts)  [Biography] bio
Date Mon 25 Oct 2010 06:42 AM (UTC)

Amended on Mon 25 Oct 2010 07:08 AM (UTC) by Twisol

Message
I'm having a strange issue where OnPluginTelnetRequest is called with "SENT_DO" even if no plugin anywhere has responded true to a "WILL". Furthermore, it falls into an infinite subnegotiation sequence with the server, as I get an infinite sequence of WILL calls followed by SENT_DO calls. Here's the code I'm using:

function OnPluginTelnetRequest (opt, data)
  if opt ~= codes.GMCP then
    return
  end
  
  if data == "WILL" then
    return true
  elseif data == "SENT_DO" then
    Note("GMCP enabled.\n")
    
    SendGMCP("Core.Hello ", CLIENT_ID)
    SendGMCP("Core.Supports.Set ", GMCP_options)
  end
end


The SENT_DO branch is still called even if I remove the WILL branch. No other plugins are installed. I'm using v4.65, updated from v4.50. (A wide gap, I know.) My previous version didn't have this problem; I figure it's probably from the plugin callback changes.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Mon 25 Oct 2010 07:20 AM (UTC)
Message
For which option code? Some are responded to automatically, you don't necessarily have to have plugins installed to have them acknowledged.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Twisol   USA  (2,257 posts)  [Biography] bio
Date Reply #2 on Mon 25 Oct 2010 07:34 AM (UTC)
Message
GMCP, which is 201. This wasn't a problem previously.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Twisol   USA  (2,257 posts)  [Biography] bio
Date Reply #3 on Mon 25 Oct 2010 07:43 AM (UTC)

Amended on Mon 25 Oct 2010 07:45 AM (UTC) by Twisol

Message
*sigh* Well, aren't I an imbecile? SendGMCP() was wrapping the message with IAC DO(253) GMCP, rather than IAC SB(250) GMCP. Sorry about that...

local SB_GMCP = "\255\253\201%s\255\240"
function SendGMCP(--[[...]])
  -- ...
  SendPkt(SB_GMCP:format(message))
  -- ...
end

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Worstje   Netherlands  (899 posts)  [Biography] bio
Date Reply #4 on Mon 25 Oct 2010 03:51 PM (UTC)
Message
That's a bright booboo to make. I smiled. :)

Glad you figured it out.
[Go to top] 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.


4,287 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]