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 ➜ Bug reports ➜ Plugin issue with world.addtimer

Plugin issue with world.addtimer

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


Posted by Shadowfyr   USA  (1,791 posts)  Bio
Date Sun 23 May 2004 10:36 PM (UTC)
Message
I recently had someone tell me one of my plugins didn't work, but previously had no problem with it. The plugin can be found at:

http://www.magma.ca/~magnumsw/muds/rebtimer.zip

If it shows version 1.1, then Magnum will have uploaded the patch and that one works. The problem is with the version 1.0 copy. It is supposed to capture a line like:

The next reboot is scheduled for 02:49 CEST (GMT+1) on Wednesday (in 2d 1h 59m 56s).

and store the amount of time until reboot, then create a timer that fires once a second to report how long is left. In the 1.0 version, there is only a single trigger and the script itself. This version never updates the time, since the timer is apparently never created at all by the script. I fixed this in version 1.1 by adding in the timer as part of the plugin, but there is an obvious bug in the current version of Mushclient if it won't create timers from inside of plugin scripting without it existing in the XML already (which is redudant).

(Obviously if by the time of reading this the plugin has been updated to 1.1 on Magnum's site, you will have to delete the timer from inside the XML file and the save state file as well to test the bug.)
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #1 on Sun 23 May 2004 11:21 PM (UTC)
Message
Aha, you have found a bug in AddTrigger, AddTimer and AddAlias. When attempting to check the script sub name, it checked if scripting was active in the *main* world file, not the plugin.

Thus, if the person using the plugin had not enabled scripting, the AddTimer would fail. This will be fixed in version 3.50.

As a workaround, enable scripting in the main world file. However it might still call the script in the wrong address space, so I would be cautious about it. If it previously worked for you, perhaps this is not a problem. You probably had scripting enabled in your main file, the other user not.

- Nick Gammon

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

Posted by Shadowfyr   USA  (1,791 posts)  Bio
Date Reply #2 on Mon 24 May 2004 01:01 AM (UTC)
Message
Well. I actually don't use the plugin myself, so I have no idea if this is a recent glitch. Most of the plugins I have created have been ripped out of the monolythic main script I use. ;) lol Usually I need to modify them heavilly to work, but this one was simple enough I didn't bother until someone mentioned it wasn't working.
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #3 on Mon 24 May 2004 01:19 AM (UTC)
Message
It is actually a bit strange this bug wasn't detected earlier, but I suppose most scripters would have scripting enabled in the main world configuration, and thus the problem would not apply to them.

- Nick Gammon

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

Posted by Magnum   Canada  (580 posts)  Bio
Date Reply #4 on Mon 31 May 2004 11:38 AM (UTC)
Message
As of this posting, Shadowfyr's plugin "rebtimer" is now 1.1 on my site.

In the event I move my site at some point in the future, you should still be able to locate my webpage via my domain name:

http://www.magnumsworld.com/muds/

(Which redirects to my ISP hosted page).

Get my plugins here: http://www.magnumsworld.com/muds/

Constantly proving I don't know what I am doing...
Magnum.
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.


16,874 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.