This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

dcc send on text

Old posts that have not been replied to for several years.
Locked
C
CosmicD
Op
Posts: 102
Joined: Sat Dec 11, 2004 3:46 pm

dcc send on text

Post by CosmicD »

i'd like to implement a small gag that my "female" bot sends a picture on a certain text, how would such a script look ?
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

Code: Select all

bind msgm - *have*pic* foo
proc foo {n u h t} {
  puthelp "privmsg $n :sure, grab it"
  dccsend $n fakepic.jpg
}
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

of course, adding some random delay won't hurt:

Code: Select all

bind msgm - *have*pic* foo
proc foo {n u h t} {
  set d [expr 20+[rand 20]]
  utimer $d [list puthelp "privmsg $n :sure, grab it"]
  utimer [expr 20+$d] [list dccsend $n fakepic.jpg]
} 
C
CosmicD
Op
Posts: 102
Joined: Sat Dec 11, 2004 3:46 pm

Post by CosmicD »

that pic has to be in the /eggdrop dir ?
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

no, it can be elsewhere; for example, if it's in your webdir, its location relatively to the botdir would be something like ../public_html/fakepic.jpg
C
CosmicD
Op
Posts: 102
Joined: Sat Dec 11, 2004 3:46 pm

Post by CosmicD »

hmm doesnt seem to work, and i don even see a failed message in mirc or so :(...

I wonder if it's really that simple, can an eggdrop just send files out of its account in the homedir ?
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

yep, it's really THAT simple
C
CosmicD
Op
Posts: 102
Joined: Sat Dec 11, 2004 3:46 pm

Post by CosmicD »

i guess ther are firewall problems it doesn't seem to send out anything , what ports should be open ?
C
CosmicD
Op
Posts: 102
Joined: Sat Dec 11, 2004 3:46 pm

Post by CosmicD »

btw i was looking into the console and it reports invalid command name "dccsend"
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

choose whatever ports you can afford to open in the firewall, and reflect that by appropriately setting reserved-portrange in bot's config
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

CosmicD wrote:btw i was looking into the console and it reports invalid command name "dccsend"
...and make sure you have transfer and filesys modules loaded
C
CosmicD
Op
Posts: 102
Joined: Sat Dec 11, 2004 3:46 pm

Post by CosmicD »

hmm somehow i think it's not going to be that simple :(
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

you think dcc'ing files is rocket science?
C
CosmicD
Op
Posts: 102
Joined: Sat Dec 11, 2004 3:46 pm

Post by CosmicD »

especially when you see no evidence of a file being sent, or when netstat doesn't even show any clue as of what port is being used, i almost have to remove all my firewall rules and disconnect my router in order to try and test this

if i go into .files mode and then type .get filename, then i 'm getting something on my mirc, at least i get a dialog that the bot is going to send something but when I try to accept it just times out, when I pm my bot for the above mentioned script to function, i don't even get this file dialog ....

thats what makes me all confused
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

if you were a little bit less lazy and bothered to double-check my script instead of just passively waiting to get what you want, you could have noticed that I've inadvertently misplaced the arguments of [dccsend] - filename should be first, nickname second - fix that and it will work (or at least try to send the file; your firewall problems have nothing to do with eggdrop)
Locked