I have just finished evaluating
lua , and it seems to be perfect replacement for both cookies and hardcoded protocol specific commands.
Lua compiles code to platform independent bytecode like java/php & tcl , but is much less bloated and far more optimized, and therefore it's able to provide outstanding performance. Following script executes in 0.0000046seconds (10000 executions in 46msecs):
Code:
a = 1
b = 2
c = a+b
a = b
c = a