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

Gammon Forum

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

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Suggestions
. . -> [Subject]  gui interface for plugin xml
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

gui interface for plugin xml

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


Posted by Victorious   (85 posts)  [Biography] 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?
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] 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
[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.


2,482 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

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

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]