Twisol said:
If you're getting into tweaking trigger options at runtime, you might want to check out my Reflex library.
http://www.gammon.com.au/forum/?id=10073
There are examples of how to use it there, as well as the source so you can save it to your MUSHclient/lua/ folder and use it yourself.
Yes. That looks like exactly what I'm doing in Python. I built a more "pythonic" interfaces for the trigger/alias/timer on top of mushclient's interfaces.
"Reflex" is one of the features - allows users to access mushclient items' options using dictrionaries:
Items are created by instantiating the corresponding python classes, and using python's *keyword* argument feature:
aTrig = Trigger("aPattern", name="bla", group="bla", script="some")
As I said, some more pythonic ways are also used, too. Like decorators:
@Trigger.decorate("aPattern", name="bla", group="bla")
def call_back_function(line, name, wildcards):
# do something
pass
The above piece of code defines a trigger and use "call_back_function" as the "script" option of that trigger. Very convenient.
There are some other things I'm building currently. Like Gammon's "wait" module (I was inspired by the other post about Python coroutines:
http://www.gammon.com.au/forum/?id=8277); Convenient logging utilities by which the normal stdout or other string streams can be directed to mushclient's notepads.
I may want to put those stuff on line so that others can test and use soon...