Craaaazy question…
Does this sound feeeeesable? Write a method called process like so…
public void process(string cmd, string parms) {
// get the cmd
// get the num of parms by parsing string by delimeter
// do something
}
Use the cmd string to find the a matching xml node in an xml doc. Then get the number of parameters by parsing the parms on a pre-determined delimeter. Check xml for matching parm count for the cmd node.
Then use this the parms to do some type of action on the parms and send results back to parent app.
How would one “do the action” based on data from the xml node for that cmd?
Example use: chat server where an admin might add a new xml node by sending the following string:
create @method wink @param-usera @param-target @action write[usera ‘winks at’ target]
the app would add an xml node like so:
<methods>
<method name="wink">
<paramCount>2</paramCount>
<param>user a</param>
<param>target</param>
<action>usera 'winks at' target ( to server out channel)</action>
</method>
</methods>
Then if a user, say kevgalss, types: wink blah3
room would get the result: kevglass winks at blah3
Where I am lost is the action part, how to get this to function.
Another example: drop blah3
result: the action would be to find the blah3 object and disconnect it.
Another example: poke blah3
result: the action may be to add one irritation point to blah3 and send: kevglass pokes blah3
if irritation points grow to over 20 for kevglass, blah3 would auto ignore kevglass
The goal here is to build a core for the chat server (or MUD that comes to mind as I write this) and then the person using the core could create his own emotes, actions, commands, etc…
My apologies for using members in the above theatrics.
There is no compensation as the play has no financial backing.
EDIT: the more I think about it, this could be a good mud core with action of attack, etc…that have to be pre-built by an admin/dev, etc…

;D