PDA

View Full Version : Transfer thingy - Credit transfer ioFTPD&glFTPD


cez
11-19-2003, 12:15 AM
OK my first public script =)

Transfers credits between multiple sites both, ioFTPD & glFTPD. It works from irc, users has to have same login on both sites, and transfer from leech is not accepted. Command is like this:

!transfer login from to amount

Since it's my first script I wouldn't be suprised if some bugs exists so please try out and report =)

Requirments for IOFTPD is ioa installed since it need give&take commands. Of course for both the bot need permisson to login and execute give, take and user/uinfo commands.

You'll need ftp.tcl and log.tcl, just load em up in windrop/eggdrop before the script. Like this:

source scripts/log.tcl
source scripts/ftp.tcl
source scripts/transfer-thingy.tcl

Hmm think thats all for now

edit:: it creates a debug.log in bot directory.
edit2:: iobanana also uses ftp.tcl & log.tcl you only need to load em once
edit3:: it won't like if you have messed with the uinfo.msg file

:: 06:15am 19/11 version 0.1
:: 12:25pm 19/11 0.1b forget one small debuglog detail
:: 02:01am 20/11 version 0.2 small bug fix
:: 23/11 v0.3 Another few bugs swept away
:: 21/12 v0.4 Works with ioA 1.04
:: 30/12 v0.5 1 bug less (thx rage2001), better error messages

Jog
11-20-2003, 02:50 PM
this script suppose that a user had to have the exact nickname in channel and on the site ... mumble ... not always is possible ... 4 example on efnet where u can't register the nickname :(

i'll try asap !!

cez
11-20-2003, 03:31 PM
No same nick in channel and on site is not required, only same login on both sites.

CrAcKeR
12-13-2003, 09:12 AM
How does it check the nick who type !transfer command

against username on site, can a user change for another user??

and if nick is blabla and username is albbla .does it makeit then ??

gonna try it

cez
12-13-2003, 02:25 PM
!transfer cez site1 site2 1000 will transfer for user cez on both site. nick on irc doesn't matter so anyone could transfer for another user, but since all transfers are logged and transfers are made in public I don't think that's a problem

doenna
12-13-2003, 03:42 PM
Why dont u trigger your script with /msg bot !transfer
and check username/passwd like those invites scripts do? Ie /msg fonkybot !transfer User passwd transferblabla

cez
12-13-2003, 07:48 PM
Originally posted by doenna
Why dont u trigger your script with /msg bot !transfer...
Cause I like it this way, no need to remeber/lookup password. But sure if there is a demand for it I might come up with another script.

MaistroX
12-14-2003, 01:09 AM
Originally posted by cez
Cause I like it this way, no need to remeber/lookup password. But sure if there is a demand for it I might come up with another script.

would be appreciated :)

rage2001
12-29-2003, 11:17 PM
Excellent script cez!!! Good job on you first public script.... Just a few things i noticed... maybe you could fix:

Both sites running ioa 1.04, iob v 19, ioftpd 5.3.9r

1. After doing: !transfer rage test1 test2 1000 , I get the following message from my sitebot:

[00:35] <***> Connected to both sites.
[00:35] <***> After transfer test1 - 4000 MB -> test2 - -1 MB

Basically, the msg isnt returning the right amount... If i go on the sites and do site uinfo rage ... it takes the right amount of creds away, and gives the correct amount of creds.... but the msg returns -1 MB .... which should be whataver the amount is on the site....

2. If a user has 3000 MB creds on a site, and tries to transfer 4000.... then maybe can you change the message it gives from:

[00:41] <***> Connected to both sites.
[00:41] <***> Failed to take credits from rage

to something like:

Connected to both sites.
Sorry, you do not have enough credits to transfer ...

Just so the user knows why it failed?

Thanks man and keep up the good work,

rage2001

cez
12-30-2003, 11:40 AM
Finally some bugs and fixes to fix, thx rage =)

1. Bug fixed, small typo think that will fix your problem.

2. As you wish =)

New version 0.5 available in first post

Mouton
12-30-2003, 11:41 AM
1. You probably changed the uinfo.msg. Put back the default one and it will work.

rAWfOX
12-30-2003, 03:50 PM
awsome... good work dude...

Alpinex
12-31-2003, 01:55 PM
Only problem seems to be that you can transfer credits on someone elses account... but I guess if it's an irc based command it doesn't matter too much. As it's all monitored.
Nice script anyway, very useful. thx

rAWfOX
01-01-2004, 12:46 PM
is it possible to get it to announce in the admin channel? ;)

Mouton
01-01-2004, 12:48 PM
You could use a script that announce all sysop and error msg in the admin chan...
ioB for example. Surely there are others.
dzs ?

cez
01-01-2004, 12:54 PM
Originally posted by rAWfOX
is it possible to get it to announce in the admin channel? ;) Guess I could make that optional. How much output is necessary, msg for each transfer, only when something goes wrong?

rAWfOX
01-01-2004, 04:23 PM
Originally posted by cez
Guess I could make that optional. How much output is necessary, msg for each transfer, only when something goes wrong?

when something go wrong and when someone uses !sitetransfer

rAWfOX
01-02-2004, 06:21 PM
Think i found a minor bug... when some users use !transfer site1 site2 1000 the sitebot of some reason changes pw on it self..

site error ::- 01-02-2004 23:55:06 User 'sitebot' (*@site) tried to login with invalid password.

and it cant connect to the server again. but when i login and changes the sitebots pw it work again to the user try again... then we're back with pw error :D

im using ioB 19, ioftpd 5.4.3 and ioA 1.04.....

cez
01-02-2004, 09:21 PM
hmm I really doubt that could be because of the script. Any other scripts running?

rAWfOX
01-03-2004, 05:10 AM
wierd.. cuz when i disabled the script the bot works without any probs....

Orangey
01-05-2004, 07:41 PM
Some Odd Reason I Have the Same Exact Problem.


Connection to site2 failed
Connection to site1 failed

Both Sites are Setup Correctly and I've Triple Checked the Password. :confused:


Running ioA, ioFTPD 5.2.13 and ioZS

Mouton
01-05-2004, 07:54 PM
there's a bunch of puts "..." lines commented out in the script i think.
Try un-commenting them and retry. then see in the debug file what it says.

Orangey
01-05-2004, 08:01 PM
I've Looked Thru and I coudn't find any "puts" that were commented , gonna keep trying...


:o

Mouton
01-05-2004, 08:55 PM
was updated apparently.
set debug and check the debug file.