Go Back   FlashFXP Forums > > > >

NeoXed's scripts nxAutoNuke, nxTools, etc.

Reply
 
Thread Tools Rate Thread Display Modes
Old 09-30-2007, 11:37 AM   #1
gerard
Junior Member
FlashFXP Registered User
 
Join Date: Jul 2005
Posts: 16
Default

yep, that was it :-) now my users are being synced. a few questions though: if i wanted to write a quota script for your db, could i simply read out the monthup value from mysql? since its binary i would have to decode it somehow. and also, if i wanted to delete the user - could i just delete it from the mysql or would that cause him to be readded by the sites syncing?

Last edited by gerard; 09-30-2007 at 01:46 PM.
gerard is offline   Reply With Quote
Old 09-30-2007, 02:51 PM   #2
neoxed
Too much time...
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: May 2003
Posts: 1,326
Default

Create, rename and delete operations are handled incrementally through the changes tables. Incremental syncs performed continually depending what you have the Sync_Interval set as.

If you want to create/rename/delete/change a user or group, it's best you do it through ioFTPD - not with the database directly.
neoxed is offline   Reply With Quote
Old 10-01-2007, 02:32 AM   #3
gerard
Junior Member
FlashFXP Registered User
 
Join Date: Jul 2005
Posts: 16
Default

okay. this leaves me a bit in the rain ;x
if i wanted to implement a quota script on a remote box...
1) is there a way i can convert those binary month/weekup values into numbers?
2) if i by all means want to delete a user via the db - what is the exact command you are issuing from site? so i could maybe emulate it. i really dont want to have a multi site environment and still use one site as hub.

ADD:
neoxed: do you think you could give me a bit of inside-view on this topic? i'm really interested in the script - i just need to figure out a way to add a quota/trial script to your brilliant piece of scripting :-(

Last edited by gerard; 10-04-2007 at 11:01 AM.
gerard is offline   Reply With Quote
Old 10-06-2007, 07:02 AM   #4
gerard
Junior Member
FlashFXP Registered User
 
Join Date: Jul 2005
Posts: 16
Default

i guess neoxed is working on something, so maybe someone else can help me..
some values in the mysql db are from type binary - now ive read that normaly you can convert those for viewing via the CHAR() function of sql - it doesnt work properly for me though. any idea on how i can convert e.g. the monthup field to a string that i can work with from tcl/bash? any help is appreciated!
gerard is offline   Reply With Quote
Old 10-06-2007, 01:30 PM   #5
neoxed
Too much time...
FlashFXP Beta Tester
ioFTPD Scripter
 
Join Date: May 2003
Posts: 1,326
Default

I guess my subtle hint wasn't blatant enough.

Quote:
Originally Posted by neoxed View Post
If you want to create/rename/delete/change a user or group, it's best you do it through ioFTPD - not with the database directly.
You should never access the database directly. You can just as easily use one of ioFTPD's many available interfaces (shared memory, Tcl, module etc.).

I'm not condoning this because I don't want applications making internal changes for compatibility reasons. I reserve the right to change the way nxMyDB functions and I do not want to deal with third party scripts leaving disastrous errors all over the place.

The integers for credits and statistics arrays are stored in binary form (low order endianness). As far as I know, MySQL does not make a function available for reading binary integer values. The best you could do is write a stored procedure that would extract the number of bytes and use CAST to convert to integer or write a MySQL UDF in C/C++.
neoxed is offline   Reply With Quote
Old 10-08-2007, 11:46 AM   #6
gerard
Junior Member
FlashFXP Registered User
 
Join Date: Jul 2005
Posts: 16
Default

okay, i understand your point. thanks for the reply.
gerard is offline   Reply With Quote
Reply

Tags
database, decode, delete, mysql, wanted

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 07:27 AM.

Parts of this site powered by vBulletin Mods & Addons from DragonByte Technologies Ltd. (Details)