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

You can share your Lua Scripts with everybody here.

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

Postby kirikou » Mon Aug 26, 2013 4:42 pm

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,
kirikou
 
posts 9
 
joined Wed Aug 07, 2013 9:20 am

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

Postby FTP » Tue Aug 27, 2013 5:21 pm

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
FTP
Site Admin
 
posts 1212
 
joined Tue Sep 29, 2009 6:09 am

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

Postby kirikou » Fri Aug 30, 2013 12:03 pm

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
kirikou
 
posts 9
 
joined Wed Aug 07, 2013 9:20 am

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

Postby FTP » Mon Sep 02, 2013 3:33 pm

The variable "%ClientVersion" is only for the FTP client.
FTP
Site Admin
 
posts 1212
 
joined Tue Sep 29, 2009 6:09 am


Return to Lua scripts

Who is online

Users browsing this forum: No registered users and 3 guests

cron