mIRC Home    About    Download    Register    News    Help

Topic Options
#198837 - 05/05/08 06:40 AM FTP File Management (sockets?)
Joe_Dean Offline
Vogon poet

Registered: 04/05/08
Posts: 127
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

Top
#198848 - 05/05/08 01:51 PM Re: FTP File Management (sockets?) [Re: Joe_Dean]
Lpfix5 Offline
Hoopy frood

Registered: 10/08/05
Posts: 1052
Loc: Canada
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
_________________________
Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }

Top
#198854 - 05/05/08 02:44 PM Re: FTP File Management (sockets?) [Re: Lpfix5]
Joe_Dean Offline
Vogon poet

Registered: 04/05/08
Posts: 127
Sorry, but I don't think so.

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

Top
#198858 - 05/05/08 04:49 PM Re: FTP File Management (sockets?) [Re: Joe_Dean]
firefox Offline
Fjord artisan

Registered: 11/09/07
Posts: 202
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

Top
#198874 - 05/05/08 10:00 PM Re: FTP File Management (sockets?) [Re: Joe_Dean]
Lpfix5 Offline
Hoopy frood

Registered: 10/08/05
Posts: 1052
Loc: Canada
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.
_________________________
Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }

Top
#198953 - 07/05/08 04:52 AM Re: FTP File Management (sockets?) [Re: Lpfix5]
Joe_Dean Offline
Vogon poet

Registered: 04/05/08
Posts: 127
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

Top
#199044 - 08/05/08 06:12 AM Re: FTP File Management (sockets?) [Re: Joe_Dean]
Joe_Dean Offline
Vogon poet

Registered: 04/05/08
Posts: 127
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...

Top
#199045 - 08/05/08 06:15 AM Re: FTP File Management (sockets?) [Re: Joe_Dean]
argv0 Offline
Planetary brain

Registered: 13/10/03
Posts: 3918
Loc: Montreal, QC, Canada
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.
_________________________
- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"

Top
#199046 - 08/05/08 07:34 AM Re: FTP File Management (sockets?) [Re: argv0]
Joe_Dean Offline
Vogon poet

Registered: 04/05/08
Posts: 127
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.

Top
#199051 - 08/05/08 11:52 AM Re: FTP File Management (sockets?) [Re: Joe_Dean]
Kol Offline
Ameglian cow

Registered: 31/12/07
Posts: 48
http://forum.swiftirc.net/viewtopic.php?t=15791

The author is considered a god on our network ^^

Top
#199109 - 09/05/08 03:12 AM Re: FTP File Management (sockets?) [Re: Kol]
Joe_Dean Offline
Vogon poet

Registered: 04/05/08
Posts: 127
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.

Top
#199112 - 09/05/08 03:44 AM Re: FTP File Management (sockets?) [Re: Joe_Dean]
starbucks_mafia Offline
Hoopy frood

Registered: 09/12/02
Posts: 2962
Loc: Norwich, UK
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.
_________________________
Spelling mistakes, grammatical errors, and stupid comments are intentional.

Top
#199147 - 09/05/08 05:03 PM Re: FTP File Management (sockets?) [Re: starbucks_mafia]
Joe_Dean Offline
Vogon poet

Registered: 04/05/08
Posts: 127
Ah, ok. Thanks wink

Top