finally figured out how i'm going to do nesting/recursive parsing.. using ^().. ^() will substitue the resulting string, whereever it is used.. unlimited nesting, anywhere in a line.
previously, you could only use pipes or the alias command..
ie
^echo hi my name is |^echo Mike
or to modify the name mike:
^echo hi my name is |^:|^caps mike
so the issue there is 'separators', the ^: command.. it works but, you can't nest and you always have to pipe..
with this, i'll be able to do..
^echo hi my name is ^(^echo mike)
or for the second example
first level nesting:
^echo hi my name is ^(^caps mike)
2nd level nesting:
^echo hi my name is ^(^echo ^(^caps mike))
that's a very basic example, but as you can see, much more versatile.. i can now substitue text into the function parameter of the trigger, such as:
^sort(^(^rand forc backc randc)) hi my name is mike
which will sort "hi my name is mike" randomly, forward, backward, or random, (per char)..
end trainer-mike example.
just wrote this func up real quick, pretty cool too, ^rf = random function
06:52 <@z> ^e hello bro what the hell is up|^rf(^echo:::^sort:::^leet(3):::^reverse:::^moby)
06:52 < KoC> hello bro what the hell is up
06:52 <@z> ^e hello bro what the hell is up|^rf(^echo:::^sort:::^leet(3):::^reverse:::^moby)
06:52 < KoC> nod bro what the lower world is distend
06:52 <@z> ^e hello bro what the hell is up|^rf(^echo:::^sort:::^leet(3):::^reverse:::^moby)
06:52 < KoC> h31|_() ]3/2() \\'}{4+ +h3 ]-[31|_ !$ |_|p
06:52 <@z> ^e hello bro what the hell is up|^rf(^echo:::^sort:::^leet(3):::^reverse:::^moby)
06:52 < KoC> pu si lleh eht tahw orb olleh
06:52 <@z> ^e hello bro what the hell is up|^rf(^echo:::^sort:::^leet(3):::^reverse:::^moby)
06:52 < KoC> pu si lleh eht tahw orb olleh
06:52 <@z> ^e hello bro what the hell is up|^rf(^echo:::^sort:::^leet(3):::^reverse:::^moby)
06:52 < KoC> pu si lleh eht tahw orb olleh
06:52 <@z> ^e hello bro what the hell is up|^rf(^echo:::^sort:::^leet(3):::^reverse:::^moby)
06:52 < KoC> hello bro what the hell is up
06:52 <@z> ^e hello bro what the hell is up|^rf(^echo:::^sort:::^leet(3):::^reverse:::^moby)
06:52 < KoC> smile bro what the noise is prefer
small example.. picks a random func based on the list wthin the parameter brackets ().
ok other than that.. fixed alot of little bugs today.. started a slight framework for a more robust mongodb add/get system, using stdarg..
bot_mongo_add(bot, "name", "ADARQ", "age", 50, "vert", 51.5) ... this creates structures inside the mongodb in a more dynamic manner, much more versatile.. i need this because i need to use mongodb more, for storing info that module need.. i have a bunch of modules storing info, but, they have their own routines for the most part.. now i can just use one function.
ok finally, i need to figure out how to sift through stack frames/arguments/local variables, there must be a way.. im compiling with -ggdb after all.. so there must be some sort of api/library i can use to access that data, i want to print it out with the ^frame or ^stack or ^reg or ^examine triggers.
peace