how to get "The FTP client name" and use string manipulation

You can share your Lua Scripts with everybody here.
Post Reply
kirikou
Posts: 9
Joined: Wed Aug 07, 2013 9:20 am

how to get "The FTP client name" and use string manipulation

Post by kirikou »

Hello everybody,

i have two questions
first one:
I want to get the "The FTP client name" but "%ClientVersion" server variable doesn't !!!

second one:
I have a string like this: " XXXXXX_XXXXXXX " and I want to obtain substring before "_", and i want also to get the substring after "_"
How could I do for those two topics?

Thanks you for your future response,
FTP
Site Admin
Posts: 2072
Joined: Tue Sep 29, 2009 6:09 am

Re: how to get "The FTP client name" and use string manipula

Post by FTP »

1. Not all the events can get "%ClientVersion", such as "OnUserLoggedIn", because client does not send the command "CLNT xxx" when the event is triggered.

2. You can use the string library, please have a look on the Lua help manual:
http://www.lua.org/manual/5.2/manual.html#6.4" rel="nofollow
kirikou
Posts: 9
Joined: Wed Aug 07, 2013 9:20 am

Re: how to get "The FTP client name" and use string manipula

Post by kirikou »

Hello everybody,

Please i want to get the "The FTP client name" when on SSH event "OnFileUploaded" in lua script.

I don't know how to do ...

Your Welcome
FTP
Site Admin
Posts: 2072
Joined: Tue Sep 29, 2009 6:09 am

Re: how to get "The FTP client name" and use string manipula

Post by FTP »

The variable "%ClientVersion" is only for the FTP client.
Post Reply