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

Gammon Software Solutions forum

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

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Using GetPluginName() with OnPluginEnable

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Using GetPluginName() with OnPluginEnable

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by Seriley   (42 posts)  [Biography] bio
Date Fri 12 Nov 2010 01:03 AM (UTC)  quote  ]
Message
Lua

function OnPluginEnable()
Note(GetPluginName() .. " has just been enabled")
end

I found this example (in VBScript, I believe) in the Help file discussion for EnablePlugin. I set one up for OnPluginDisable() too.

What I see is ' has just been enabled'. GetPluginName() is returning "" I believe.

The Help file on GetPluginName says it will return the name of the plugin that is executing.

I know my plugin is executing as I see the note ' has just been enabled' output.

Why does GetPluginName not return the name of my plugin here?

I'm using 4.69 now but noticed it when running 4.67.
[Go to top] top

Posted by Nick Gammon   Australia  (18,772 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Fri 12 Nov 2010 02:35 AM (UTC)  quote  ]
Message
You found a bug!

This was introduced during all the "refactoring" improvements in version 4.62.

Fixed in version 4.70, so that during the OnPluginEnable callback, the plugin knows who it is.

- Nick Gammon

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

Posted by Seriley   (42 posts)  [Biography] bio
Date Reply #2 on Fri 12 Nov 2010 02:44 AM (UTC)  quote  ]
Message
Thanks for your prompt response, Nick
[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.


922 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

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

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]