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.
Old posts that have not been replied to for several years.
CosmicD
Op
Posts: 102 Joined: Sat Dec 11, 2004 3:46 pm
Post
by CosmicD » Thu Dec 23, 2004 4:45 pm
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 ?
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Thu Dec 23, 2004 4:58 pm
Code: Select all
bind msgm - *have*pic* foo
proc foo {n u h t} {
puthelp "privmsg $n :sure, grab it"
dccsend $n fakepic.jpg
}
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Thu Dec 23, 2004 5:01 pm
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]
}
CosmicD
Op
Posts: 102 Joined: Sat Dec 11, 2004 3:46 pm
Post
by CosmicD » Thu Dec 23, 2004 5:08 pm
that pic has to be in the /eggdrop dir ?
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Thu Dec 23, 2004 5:12 pm
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
CosmicD
Op
Posts: 102 Joined: Sat Dec 11, 2004 3:46 pm
Post
by CosmicD » Thu Dec 23, 2004 5:17 pm
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 ?
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Thu Dec 23, 2004 5:21 pm
yep, it's really THAT simple
CosmicD
Op
Posts: 102 Joined: Sat Dec 11, 2004 3:46 pm
Post
by CosmicD » Thu Dec 23, 2004 5:28 pm
i guess ther are firewall problems it doesn't seem to send out anything , what ports should be open ?
CosmicD
Op
Posts: 102 Joined: Sat Dec 11, 2004 3:46 pm
Post
by CosmicD » Thu Dec 23, 2004 5:32 pm
btw i was looking into the console and it reports invalid command name "dccsend"
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Thu Dec 23, 2004 5:33 pm
choose whatever ports you can afford to open in the firewall, and reflect that by appropriately setting reserved-portrange in bot's config
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Thu Dec 23, 2004 5:35 pm
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
CosmicD
Op
Posts: 102 Joined: Sat Dec 11, 2004 3:46 pm
Post
by CosmicD » Thu Dec 23, 2004 6:02 pm
hmm somehow i think it's not going to be that simple
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Thu Dec 23, 2004 6:24 pm
you think dcc'ing files is rocket science?
CosmicD
Op
Posts: 102 Joined: Sat Dec 11, 2004 3:46 pm
Post
by CosmicD » Thu Dec 23, 2004 8:26 pm
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
demond
Revered One
Posts: 3073 Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:
Post
by demond » Thu Dec 23, 2004 10:28 pm
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)