mIRC Homepage
Posted By: Joe_Dean FTP File Management (sockets?) - 05/05/08 05:40 AM
I'm basically trying to make my bot so that when someone types "!unbanplayer <name>", the bot will connect to an FTP server, find a file, edit it, save it, etc.

This is just an example to give you an idea of what I'm trying to do. This obviously doesn't work, and the variables don't exist, just note that it is an example!:

http://www.paste.mircscripting.info/index.php?id=2762

------------

So basically someone in IRC types "!unbanplayer <name>". Then the bot connects to an FTP server, finds a file in a directory named "<name>.txt", opens it, searches for an instance of "banned=1" and changes it to "banned=0" (this unbans a player).

Is this possible? I'm sorta new with scripting, but it sounds like I'd need to use some sockets, and I have no clue how to use them. Any support is appreciated. smile
Posted By: Lpfix5 Re: FTP File Management (sockets?) - 05/05/08 12:51 PM
How about you start by giving the FTP address, a guest account to login temporarly then I will be more then willing to write something up :P
Posted By: Joe_Dean Re: FTP File Management (sockets?) - 05/05/08 01:44 PM
Sorry, but I don't think so.

You absolutely NEED my information, or can't I add that later?
Posted By: firefox Re: FTP File Management (sockets?) - 05/05/08 03:49 PM
for login and getting to a dir http://dogus.free.fr/ftprush/RushAppFTP_all.htm

for edit I guess you need to dl the file, edit it and then re-upload it
Posted By: Lpfix5 Re: FTP File Management (sockets?) - 05/05/08 09:00 PM
Originally Posted By: Joe_Dean
Sorry, but I don't think so.

You absolutely NEED my information, or can't I add that later?


Fine then I don't think so I can help sorry.
Posted By: Joe_Dean Re: FTP File Management (sockets?) - 07/05/08 03:52 AM
Originally Posted By: Lpfix5
Originally Posted By: Joe_Dean
Sorry, but I don't think so.

You absolutely NEED my information, or can't I add that later?


Fine then I don't think so I can help sorry.


Hostname: ftp.lvrcr.com
Username: test@lvrcr.com
Password: mypass123
Posted By: Joe_Dean Re: FTP File Management (sockets?) - 08/05/08 05:12 AM
This is exactly why I didn't want to do this... Those test account details haven't been published for even a day yet, and already we have idiots uploading shit to my webspace.

I'd kindly like to ask if you could make this a bit quicker. I don't mean to sound rude and I don't want to rush you, but I can't have people uploading shit and using my space...
Posted By: argv0 Re: FTP File Management (sockets?) - 08/05/08 05:15 AM
Feel free to change your login info and give the new info to him *privately*. No one really required you to make it public.. though I question why any details should have been given in the first place.. it should definitely not have been necessary.

Anytime someone threatens to stop helping you unless you give them sensitive security information (especially passwords), you should ignore them outright. No one here should ever ask that of you.
Posted By: Joe_Dean Re: FTP File Management (sockets?) - 08/05/08 06:34 AM
That's what I thought, but apparently it was essential to have a test account. I don't see how it's necessary as he could've used his own server or something, but whatever.

By the time he reads this, he probably won't help anyways. Meh, I'll keep the test account active for 24 more hours, then I'll delete it.
Posted By: Kol Re: FTP File Management (sockets?) - 08/05/08 10:52 AM
http://forum.swiftirc.net/viewtopic.php?t=15791

The author is considered a god on our network ^^
Posted By: Joe_Dean Re: FTP File Management (sockets?) - 09/05/08 02:12 AM
Thanks, but that's not exactly what I'm looking for.

I don't want anything downloaded to my computer, and I don't want to have to upload anything from my computer either. Basically I just want the script to search for a string in the specified file on the FTP server, then edit it & save the file.
Posted By: starbucks_mafia Re: FTP File Management (sockets?) - 09/05/08 02:44 AM
There's no way to edit a file on a remote FTP server in-place. You would need to download it, edit it, and then upload it over the old file.
Posted By: Joe_Dean Re: FTP File Management (sockets?) - 09/05/08 04:03 PM
Ah, ok. Thanks wink
© mIRC Discussion Forums