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 ➜ Plugins ➜ GetPluginInfo Question

GetPluginInfo Question

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


Posted by WillFa   USA  (525 posts)  Bio
Date Sat 13 Jun 2009 07:32 AM (UTC)
Message
What's the point of GetPluginInfo( id , 7 ) ?

You have that value already, because you pass it in as the first parameter to GetPluginInfo.


Or is there something subtle and tricky going on that I haven't realized?
Top

Posted by Worstje   Netherlands  (899 posts)  Bio
Date Reply #1 on Sat 13 Jun 2009 09:03 AM (UTC)

Amended on Sat 13 Jun 2009 09:05 AM (UTC) by Worstje

Message
Heh, funny find! :)

The only use I can imagine is checking whether or not a plugin is installed since it will return nil in that case... but IsPluginInstalled() does that in a way more logical sense.

Either way, it is quite amusing.

Edit: I reckon Nick implemented it while holding the struct with plugin information right next to him, and logically the plugin ID is one of many fields part of that structure. While mass-producing return values like those, you easily miss such a simple oversight.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #2 on Sun 14 Jun 2009 09:21 PM (UTC)
Message
Worstje is right, I would have just quickly returned everything in the structure. It will, of course, always return the ID you supplied, if the plugin exists.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
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.


13,431 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.