Help - Search - Members - Calendar
Full Version: Calling plugins from commandline
BatMUD > BatMUD forums > Batclient
Fitsio
Hi,

I couldn't figure out how to call a plugin from the commandline. The documentation says it should work like scripts ($pluginname) but how can I define a name for a plugin? For me, classnames did not work. Perhaps an example would shed some light to this problem?

Fitsio
Torc
You have to add 'void run()' to the script. That function will be called when you type $classname on the commandline.
Fitsio
Where did you get that information? It doesn't seem to work, but I haven't seen any reference to run method either, so perhaps you have more information than I do.

The javadoc mentions a void process(java.lang.Object data) method which I assume is the same with run() for scripts. Also, in the description of the method there are some words about calling the plugin from script, but there is no help at all in scripting section of the client about plugins.

Also, if it's not there already, I would like to see plugins being able to modify the strings one sends to the server.

Fiissio
Torc
This is from the inbuilt scripting guide:

QUOTE
void run()
This method is called when the script is evaluated from the commandline, a trigger or a macro. The variable arg is a reference to any arguments given when running the script. For example if you call the script from the commandline as: "$test_script arg1 arg2 arg3". The arg string will be "arg1 arg2 arg3". It is then up to your script to parse the arguments as you see fit.


And it does work, I have one script that uses it.
kuhi
Another dumb .... here unable to run plugin. Plugin loads fine, but I cannot run it.
Amarth
Seems to me that there's a bug in existence with this. Will be fixed in next release.

(The Batclient-team is on Christmas / New Year holidays at the moment.)
Fitsio
The plugins are now call-able in version 1.6, but the data Object given to the process(Object data) function seems to be always null.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2025 Invision Power Services, Inc.