On Wed, Feb 24, 2010 at 2:32 AM, DevNull 43 <[email protected]> wrote: > I want to store in a session variable inside BaseUser, the amount of data > uploaded/downloaded on that particular session. > > I want to limit to 100M download and 10M upload per session. If user > disconnects and reconnects thats fine, he can upload/download again those. > > If user executes command "site sessioninfo" it will get the current > upload/download for this session. > > However I want to add the output after command does a "dir" or "nlist" or > STOR or RET.
Alright, this makes much more sense :-) First, BaseUser is not the right place to store session info, instead use getAttribute() and setAttribute() on FtpSession. Then, as Sai said, you want to change the reply messages. I would urge you to have a look at FtpReplyTranslator.getClientVariableValue() and patch in code for including any session attribute. As Sai mentioned, we would be interested in such a patch, so feel free to sharing it with us and we'll have a look at including it in 1.1.0. /niklas
