Gammon Forum
Entire forum
MUSHclient
Plugins
Fully enabled ATCP plugin
Fully enabled ATCP plugin
|
It is now over 60 days since the last post. This thread is closed.
  Refresh page
Pages: 1
2
Posted by
| Twisol
USA (2,257 posts) bio
|
Date
| Reply #15 on Wed 22 Apr 2009 11:08 PM (UTC) Amended on Thu 23 Apr 2009 01:09 AM (UTC) by Twisol
|
Message
| Uploaded a new version to http://www.jonathan.com/atcp/atcp.xml, to fix a bug related to enabling modules more than once. (Would appreciate it if your mushclient.com version was replaced, too?)
EDIT: oops, -now- it's uploaded. |
'Soludra' on Achaea
Blog: http://jonathan.com/
GitHub: http://github.com/Twisol | top |
|
Posted by
| Nick Gammon
Australia (22,975 posts) bio
Forum Administrator |
Date
| Reply #16 on Mon 27 Apr 2009 03:08 AM (UTC) |
Message
| Uploaded now.
Suggest in future you update the version number in the plugin, like this:
<muclient>
<plugin
name="ATCP"
author="Soludra"
id="7c08e2961c5e20e5bdbf7fc5"
language="Lua"
purpose="ATCP data"
date_written="2008-09-18"
date_modified="2009-04-23 12:15"
requires="4.35"
version="2.0"
>
</plugin>
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
Posted by
| Twisol
USA (2,257 posts) bio
|
Date
| Reply #17 on Mon 27 Apr 2009 03:13 AM (UTC) |
Message
| Oops, yes, thanks. >_> |
'Soludra' on Achaea
Blog: http://jonathan.com/
GitHub: http://github.com/Twisol | top |
|
Posted by
| Twisol
USA (2,257 posts) bio
|
Date
| Reply #18 on Fri 15 Jan 2010 07:54 AM (UTC) |
Message
| I'm proud to release ATCP v2.0! This version replaces the old interface with a PPI-exposed pair of methods, allowing client code to register method callbacks. It also requires MUSHclient v4.46, in preparation for the public release of PPI, but you could get PPI separately and change the version requirement if you really wanted.
The full ATCP plugin is posted in the next post due to length. I've pasted my Roomname plugin here, as an example of how to use the new ATCP interface.
<!DOCTYPE muclient>
<muclient>
<plugin
name="roomname"
author="Soludra"
id="e94f6bd8509a2b00d10cb226"
language="Lua"
purpose="Adds a Nexus room name to the status bar"
date_written="2008-08-23"
date_modified="2010-01-15 12:27:00"
requires="4.35"
version="2.0"
>
</plugin>
<script><![CDATA[
-- Used to load the ATCP interface
PPI = require("ppi")
-- Will contain the ATCP interface
atcp = nil
-- Executed when you get an ATCP message!
OnRoomBrief = function(message, content)
SetStatus(content .. ".")
end
-- Use this to load the ATCP library
OnPluginListChanged = function()
local atcp, reloaded = PPI.Load("7c08e2961c5e20e5bdbf7fc5")
if not atcp then
-- Normally, you might put an error or a warning note here.
-- Roomname won't do anything if ATCP isn't available, so
-- it's safe to leave it running until ATCP comes online.
elseif reloaded then
-- Registers a function to call when Room.Brief is received.
atcp.Listen("Room.Brief", OnRoomBrief)
-- Sets the local 'atcp' variable to the global created before.
_G.atcp = atcp
end
end
]]></script>
</muclient>
|
'Soludra' on Achaea
Blog: http://jonathan.com/
GitHub: http://github.com/Twisol | top |
|
Posted by
| Twisol
USA (2,257 posts) bio
|
Date
| Reply #19 on Fri 15 Jan 2010 07:57 AM (UTC) |
Message
| Well, the plugin is too large for the 6000-character maximum even on its own, so here's a pastebin link:
http://mushclient.pastebin.com/fe1d0a12 |
'Soludra' on Achaea
Blog: http://jonathan.com/
GitHub: http://github.com/Twisol | top |
|
Posted by
| Nick Gammon
Australia (22,975 posts) bio
Forum Administrator |
Date
| Reply #20 on Fri 15 Jan 2010 09:45 AM (UTC) |
Message
|
Twisol said:
Well, the plugin is too large for the 6000-character maximum even on its own, so here's a pastebin link:
The length restriction on your posts has been removed. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
Posted by
| Twisol
USA (2,257 posts) bio
|
Date
| Reply #21 on Fri 15 Jan 2010 09:52 AM (UTC) |
Message
| Thank you, I appreciate it! |
'Soludra' on Achaea
Blog: http://jonathan.com/
GitHub: http://github.com/Twisol | top |
|
Posted by
| Nick Gammon
Australia (22,975 posts) bio
Forum Administrator |
Date
| Reply #22 on Tue 02 Feb 2010 06:01 AM (UTC) |
Message
|
Worstje said:
Technically, everything is in the same stream of bits and bytes. The only method to get at said data in MUSHclient is through OnPluginPacketReceived, where you can filter it out also.
Out of curiosity, is there any limit on the amount of data that can appear (from server to client) inside the telnet negotiation sequence? I saw a reference to 2048 bytes, but that was from client to server. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | top |
|
Posted by
| Twisol
USA (2,257 posts) bio
|
Date
| Reply #23 on Tue 02 Feb 2010 06:35 AM (UTC) |
Message
| I can't find an explicit limit, although I admit I didn't look too hard (looking through [1]). I do imagine that there would be a 'sensible' limit of 1024, or 2048 based on what you said.
[1]: http://www.omnifarious.org/~hopper/telnet-rfc.html |
'Soludra' on Achaea
Blog: http://jonathan.com/
GitHub: http://github.com/Twisol | 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.
57,923 views.
This is page 2, subject is 2 pages long:
1
2
It is now over 60 days since the last post. This thread is closed.
  Refresh page
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.