mIRC Home    About    Download    Register    News    Help

Print Thread
FTP File Management (sockets?) #198837 05/05/08 05:40 AM
Joined: May 2008
Posts: 127
J
Joe_Dean Offline OP
Vogon poet
OP Offline
Vogon poet
J
Joined: May 2008
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

Re: FTP File Management (sockets?) [Re: Joe_Dean] #198848 05/05/08 12:51 PM
Joined: Aug 2005
Posts: 1,052
L
Lpfix5 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
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* }
Re: FTP File Management (sockets?) [Re: Lpfix5] #198854 05/05/08 01:44 PM
Joined: May 2008
Posts: 127
J
Joe_Dean Offline OP
Vogon poet
OP Offline
Vogon poet
J
Joined: May 2008
Posts: 127
Sorry, but I don't think so.

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

Re: FTP File Management (sockets?) [Re: Joe_Dean] #198858 05/05/08 03:49 PM
Joined: Sep 2007
Posts: 202
F
firefox Offline
Fjord artisan
Offline
Fjord artisan
F
Joined: Sep 2007
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

Re: FTP File Management (sockets?) [Re: Joe_Dean] #198874 05/05/08 09:00 PM
Joined: Aug 2005
Posts: 1,052
L
Lpfix5 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
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* }
Re: FTP File Management (sockets?) [Re: Lpfix5] #198953 07/05/08 03:52 AM
Joined: May 2008
Posts: 127
J
Joe_Dean Offline OP
Vogon poet
OP Offline
Vogon poet
J
Joined: May 2008
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

Re: FTP File Management (sockets?) [Re: Joe_Dean] #199044 08/05/08 05:12 AM
Joined: May 2008
Posts: 127
J
Joe_Dean Offline OP
Vogon poet
OP Offline
Vogon poet
J
Joined: May 2008
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...

Re: FTP File Management (sockets?) [Re: Joe_Dean] #199045 08/05/08 05:15 AM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
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"
Re: FTP File Management (sockets?) [Re: argv0] #199046 08/05/08 06:34 AM
Joined: May 2008
Posts: 127
J
Joe_Dean Offline OP
Vogon poet
OP Offline
Vogon poet
J
Joined: May 2008
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.

Re: FTP File Management (sockets?) [Re: Joe_Dean] #199051 08/05/08 10:52 AM
Joined: Dec 2007
Posts: 48
K
Kol Offline
Ameglian cow
Offline
Ameglian cow
K
Joined: Dec 2007
Posts: 48
http://forum.swiftirc.net/viewtopic.php?t=15791

The author is considered a god on our network ^^

Re: FTP File Management (sockets?) [Re: Kol] #199109 09/05/08 02:12 AM
Joined: May 2008
Posts: 127
J
Joe_Dean Offline OP
Vogon poet
OP Offline
Vogon poet
J
Joined: May 2008
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.

Re: FTP File Management (sockets?) [Re: Joe_Dean] #199112 09/05/08 02:44 AM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
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.
Re: FTP File Management (sockets?) [Re: starbucks_mafia] #199147 09/05/08 04:03 PM
Joined: May 2008
Posts: 127
J
Joe_Dean Offline OP
Vogon poet
OP Offline
Vogon poet
J
Joined: May 2008
Posts: 127
Ah, ok. Thanks wink