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 ➜ Finding the MUSHclient version number from the server

Finding the MUSHclient version number from the server

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


Posted by KaVir   Germany  (117 posts)  Bio
Date Sat 08 May 2010 02:47 PM (UTC)
Message
Is there any way for the server to find out which version of MUSHclient a particular player is using? Perhaps some sort of negotiation option? Or maybe even a plugin?

The plugins I'm working on require the latest version of MUSHclient, but some players have tried to use them on older versions, and it would make it easier to troubleshoot if I could see at my end which version they're using.
Top

Posted by forral   USA  (79 posts)  Bio
Date Reply #1 on Sat 08 May 2010 03:52 PM (UTC)
Message
I think a simple solution would just be, when you're making your plugin, have the version set to 3.0 or something like that. That way, any player who tries to use it will be able to. Also, make an announcement when you post your plugin advising users to upgrade. There is never harm in upgrading :)

Regards,
Forra
Top

Posted by KaVir   Germany  (117 posts)  Bio
Date Reply #2 on Sat 08 May 2010 04:28 PM (UTC)

Amended on Sat 08 May 2010 04:29 PM (UTC) by KaVir

Message
forral said:
I think a simple solution would just be, when you're making your plugin, have the version set to 3.0 or something like that. That way, any player who tries to use it will be able to.

My plugins are built around the new subnegotiation callback functions, so any version of MUSHclient prior to 4.48 isn't going to work. I'm not sure what would happen if I set the version to 3.0, presumably the callback functions just wouldn't get called?

forral said:
Also, make an announcement when you post your plugin advising users to upgrade. There is never harm in upgrading :)

Oh I do tell them to upgrade, the problem is sometimes they don't fully read the announcement, and then I have to work out what they've done wrong. I was just wondering if there was a way to quickly see which version they're using, so that if they complain about it not working I can check in-game. I could even tie it into a "troubleshooting" dynamic help file then.
Top

Posted by Worstje   Netherlands  (899 posts)  Bio
Date Reply #3 on Sat 08 May 2010 08:51 PM (UTC)
Message
I still don't see why you would want that. If you set the version attribute in your plugin to the minimum version needed, MUSHclient will complain if a user tries to load the plugin, saying a newer version of MUSHclient is needed to use the plugin.

How is that not enough?

I would rather not have my MUSHclient version queryable, simply because that is a disaster waiting to happen. For one, servers with malicious intentions (or people compromising servers, for that matter) can then use version-specific exploits without a problem. Or you'll get other ugly stuff going on like the debacle that once happened (and still does) on the web regarding the useragent string.

Nope, server knowing the client is the most that should happen, specific versions are a no imo.
Top

Posted by KaVir   Germany  (117 posts)  Bio
Date Reply #4 on Sat 08 May 2010 09:20 PM (UTC)
Message
It's a version number, that's all. How on earth can that possibly compromise security?

If there's some huge security exploit in an earlier version of MUSHclient then a malicious server could just guess - knowing the version wouldn't make ANY difference whatsoever.

However when it comes to helping the user, the version number comes in useful. It would allow me to better tailor the hints and help files to each individual user.

Besides which, I'm not asking for it to be added, I'm asking if it can be done. It may be that it can be done via a plugin that works on most versions of MUSHclient, in which case the player could add that plugin as part of the package, and at least that one plugin should work even if the others don't.

If you don't like it, don't add it. That's the beauty of plugins.
Top

Posted by Twisol   USA  (2,257 posts)  Bio
Date Reply #5 on Sat 08 May 2010 09:33 PM (UTC)
Message
KaVir said:
Besides which, I'm not asking for it to be added, I'm asking if it can be done. It may be that it can be done via a plugin that works on most versions of MUSHclient, in which case the player could add that plugin as part of the package, and at least that one plugin should work even if the others don't.


You can try using the older OnPluginTelnetOption, which uses a specific option (102). Then implement a small protocol over that option to ask the client what its version is. It's available from version 4.31, which was released July 2008.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
Top

Posted by KaVir   Germany  (117 posts)  Bio
Date Reply #6 on Sat 08 May 2010 09:50 PM (UTC)
Message
Thanks Twisol, good idea. But can the plugin actually find the version number? Is it stored as some sort of world variable?

Although even if not, maybe that'd be enough - a single plugin that checks for both protocol 102 and MSDP. If the plugin handshakes for 102 but not MSDP, that's a pretty good indication that they've added the plugin correctly but are using an older version of MUSHclient.
Top

Posted by Twisol   USA  (2,257 posts)  Bio
Date Reply #7 on Sat 08 May 2010 09:56 PM (UTC)

Amended on Sat 08 May 2010 09:57 PM (UTC) by Twisol

Message
KaVir said:
Thanks Twisol, good idea. But can the plugin actually find the version number? Is it stored as some sort of world variable?


It sure can: the Version() function. When I run it, I get "4.51" back. You also have GetInfo(72), which does the same.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #8 on Sat 08 May 2010 10:02 PM (UTC)
Message
First step, add the "required version" to the plugin header. Then they can't even install the plugin if they have an early version. That is why it is there.

Next step, if you want to, use telnet negotiation to send the version back to the server, so the server can know that a) they have the plugin installed; and b) which version of MUSHclient they have (maybe add the plugin version as well).

I'm not totally sure why you need this, since when you release new versions of the plugin you simply upgrade the required version number if necessary.

And if something is added now that somehow (how?) tells every server the MUSHclient version, that won't be there for old versions anyway, so it doesn't achieve a huge amount.

- Nick Gammon

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

Posted by KaVir   Germany  (117 posts)  Bio
Date Reply #9 on Sat 08 May 2010 10:54 PM (UTC)

Amended on Sat 08 May 2010 11:19 PM (UTC) by KaVir

Message
Twisol said:
It sure can: the Version() function.

Excellent, thanks.

Nick Gammon said:
First step, add the "required version" to the plugin header. Then they can't even install the plugin if they have an early version. That is why it is there.

I tested it previously by changing the version number on one of my plugins, closing the world and reopening it - the plugin seemed to simply disappear. But trying it again and looking more closely I see that it did also give an error message (but behind my session window).

Nick Gammon said:
And if something is added now that somehow (how?) tells every server the MUSHclient version, that won't be there for old versions anyway, so it doesn't achieve a huge amount.

Well it would at least let me see if they were using the latest version or not. If there was no response to the query I could just mark them as "old", and the dynamic help files could inform them in big red text that they need to update to the latest version of MUSHclient before downloading the custom plugins.

I'll probably just add it as a simple plugin though. Once I've got enough plugins I'll likely distribute a copy of MUSHclient with all of them preinstalled (along with the soundpack and graphical images) - but no doubt I'll continue adding further plugins in the future that'll require newer versions of MUSHclient, so it'll become increasingly useful to know which version people are using.


EDIT: I also just noticed that MXP has a version tag, so I guess that would be another option.
Top

Posted by KaVir   Germany  (117 posts)  Bio
Date Reply #10 on Mon 10 May 2010 10:42 PM (UTC)
Message
Just as a quick followup, I tried the MXP option and it works fine - all you need to do is send <VERSION> to the client, and it responds with:

<VERSION MXP="0.5" CLIENT=MUSHclient VERSION="4.51" REGISTERED=YES>

So basically it's already built into the client, as long as the server supports MXP.
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.


30,103 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.