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.
 Entire forum ➜ MUSHclient ➜ Suggestions ➜ gui interface for plugin xml

gui interface for plugin xml

Posting of new messages is disabled at present.

Refresh page


Posted by Victorious   (89 posts)  Bio
Date Fri 13 Dec 2013 01:18 PM (UTC)
Message
Hi Nick

How difficult will it be to port the gui that you see when editing a trigger/alias/timer etc in world files so that it can edit plugin files?
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #1 on Fri 13 Dec 2013 08:15 PM (UTC)
Message
I've thought about this a few times, but the answer is that there is a problem. Plugins can have XML entities in them, like this:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE muclient [
  <!ENTITY socials_command "socials" > 
  <!ENTITY end_socials_regexp "\&gt;" > 
  <!ENTITY timer_interval "30" > 
]>



These are substituted into things like triggers, aliases, timers at load time, for example:


<timers>
  <timer 
	  name="RandomSocial" 
	  script="DoRandomSocial" 
	  enabled="y" 
	  second="&timer_interval;" 
	>
  </timer>
</timers>
<script>


So by the time the client sees that timer it would read:


<timers>
  <timer 
	  name="RandomSocial" 
	  script="DoRandomSocial" 
	  enabled="y" 
	  second="30" 
	>
  </timer>
</timers>
<script>


Now if that got saved back after editing it no longer uses "&timer_interval;" but uses "30" instead as the number of seconds to wait.

If this aspect doesn't bother you, a work-around would be to copy the thing you want to edit back into the main world (eg. between <timers> ... </timers> ) and then edit it in the GUI, then copy that timer, and paste back over the one in the plugin.

Failing that, the source code is publicly available, if you want to write your own. The format is pretty straight-forward (XML like above). You could write your own editor using whatever GUI interface you like.

- 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.


10,640 views.

Posting of new messages is disabled at present.

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.