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
➜ GetWorld, GetWorldByID from plugin... returns plugin 'world' object.
GetWorld, GetWorldByID from plugin... returns plugin 'world' object.
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Pages: 1
2
Posted by
| Isthiriel
(113 posts) Bio
|
Date
| Reply #15 on Thu 10 Jan 2008 03:59 AM (UTC) |
Message
| On the topic, as I understand it ExportXML and ImportXML are only applicable to the world triggers/timers/aliases so addxml.lua can't be used in a plugin to modify the plugins own triggers/timers/aliases?
Does this leave an opening for an ExportPluginXML/ImportPluginXML function pair? | Top |
|
Posted by
| Nick Gammon
Australia (23,140 posts) Bio
Forum Administrator |
Date
| Reply #16 on Thu 10 Jan 2008 04:21 AM (UTC) |
Message
| You are probably right, however I am inclined to think that actually having one plugin exporting another plugin's triggers is going too far. Why would you want to do that? You can always find the plugin's source file name, and then simply read the plugin in (as XML) which gives you effectively the same thing (except for dynamically-generated items).
Quote:
I guess I'm not the only numbers freak then, eh?
Well I *do* like to measure things. :)
As you will have noticed, MUSHclient provides all sorts of timers and counters.
They help to evaluate the performance of scripts, trigger evaluation and so on.
An interesting thing is that the worst-case scenario for triggers (and aliases too) is if *none* match, as that means they all have to be evaluated, before you are sure that none will match.
There is an argument for disabling groups of triggers, where possible, if you don't expect them to fire at certain times, to improve speed. For example, if you know you aren't in combat, you could disable combat-oriented triggers.
However having said that, MUSHclient has pretty fast trigger evaluation. A test I did a while ago (http://www.gammon.com.au/mushclient/benchmarks.htm) shows that it processed over 5,000 lines of incoming text with ANSI colours, with 10 triggers which didn't match, in 3.8 seconds. In practice you wouldn't receive text that fast, as it would be difficult to read.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Worstje
Netherlands (899 posts) Bio
|
Date
| Reply #17 on Thu 10 Jan 2008 07:38 AM (UTC) |
Message
| Isthiriel: I seem to recall ImportXML couldn't be used in a plugin, however that certainly isn't the case anymore as I have used it heavily in my runtime addition of 1300 triggers.
Nick Gammon: What harm can it do to have the information available anyhow? While I mean absolutely no offense, if it is leaks or people with bad plugin-writing intents, they'll find far more destructive ways to go about their thing. In the meanwhile, having the feature(tm) to check the data during runtime only opens up possibilities. | 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.
54,749 views.
This is page 2, subject is 2 pages long:
1
2
It is now over 60 days since the last post. This thread is closed.
Refresh page
top