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
➜ Using GetPluginName() with OnPluginEnable
Using GetPluginName() with OnPluginEnable
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Seriley
(42 posts) Bio
|
Date
| Fri 12 Nov 2010 01:03 AM (UTC) |
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. | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #1 on Fri 12 Nov 2010 02:35 AM (UTC) |
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 | Top |
|
Posted by
| Seriley
(42 posts) Bio
|
Date
| Reply #2 on Fri 12 Nov 2010 02:44 AM (UTC) |
Message
| Thanks for your prompt response, Nick | 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.
11,008 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top