ID:136246
 
I've entered into a situation where it would be convenient for me to have access to all text after it is generated but before it is streamed to the client.

I'm curious if we could have access to some kind of client functions that allow us this luxury -- right now, there is no way of trapping output to the client, which means that people designing projects need to surround text that they wish to modify with various procs, forcing a lot of work onto them.

So, I propose the following command:

client/Output(text)

The client.Output proc receives any text that is being sent to that client, and, by default, simply returns that same string, which is then sent on its way. (By default, the client.Output() process would be skipped to save CPU time/etc. if the designer didn't define it.) However, as desired by the designer, the string can be modified before it is actually transmitted to the client. This would be a very convenient place to stick hooks for language filters, etc.


(Eventually, I'd also love a client-side client.Input() proc, which is processed by the client before it is sent to the server (thereby being a convenient way to prevent DoS attacks), but that isn't possible with the current server-side architecture.)
Spuzzum wrote:
I've entered into a situation where it would be convenient for me to have access to all text after it is generated but before it is streamed to the client.

I've suggested this before. In the end, I realized it really is quite easy to just make your own.
In response to Ebonshadow
Ebonshadow wrote:
Spuzzum wrote:
I've entered into a situation where it would be convenient for me to have access to all text after it is generated but before it is streamed to the client.

I've suggested this before. In the end, I realized it really is quite easy to just make your own.

Not quite, because text output contains special characters that are interpreted at the time they're sent out to the client. So there is some considerable utility to the idea.

Lummox JR
In response to Ebonshadow
...which means that people designing projects need to surround text that they wish to modify with various procs, forcing a lot of work onto them.

I've suggested this before. In the end, I realized it really is quite easy to just make your own.

...which would require surrounding all text to be outputted with a proc, which defeats the purpose of my request in the first place. ;-)
I second this suggestion. It would be very handy for multiple reasons. (Parsing, mostly)

It would also be easier to make a time-stamp command, to timestap all output. :D


~>Volte